:root {
    --primary: #16a085;
    --dark: #1a2942;
    --light: #f5f7fa;
    --gray: #dfe4ea;
    --text: #2c3e50;
    --shadow: rgba(0, 0, 0, 0.1);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
    background-color: var(--light)!important;
    color: var(--text);
}

header {
    background-color: var(--dark);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h4 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.footer-column a:hover {
    color: white;
    padding-left: 5px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    background: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .user-actions {
        margin-top: 10px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}
/* Custom styles */
.rrbody {
    /*background: linear-gradient(0deg, rgb(17, 123, 10), rgb(185 3 7 / 93%)), url('../../public/assets/img/bg-masthead.jpg');*/
    background-image:  url('../bg3.jpg');
    background-color: rgb(65 75 65 / 60%);
    background-repeat: no-repeat;
    background-attachment: local;
    background-size: cover;
    background-position: center;
    /* min-height: calc(100vh - 177px); */
}

.navbar-brand{
    font-size: 1rem!important;
}
.req{
    color: red!important;
}
.form-group{
    padding-bottom: 5px!important;
}
.description-modal .modal-body .container{
    height: 300px;overflow-y: scroll
}
.card .img-fluid{
    height: 10em;
}
.stretched-link{
  text-decoration: none!important;
}
.card a{
    text-decoration: none;
}

.paf li::before{
    font-family: "Font Awesome 5 Free";
    content: "\f1c1";
    display: inline-block;
    padding-right: 5px;
    font-size: 20px;
    color: firebrick;
    vertical-align: middle;
    font-weight: 900;
}
.paf{
    text-align: start!important;
    list-style-type: none;
}
.lic{
    width: 20rem!important;
    height:8rem!important;
    background:#f8f8f8!important;
    border:1px solid #e2e2e2!important;
}

.card .img-fluid{
    height: 10em;
}
.stretched-link{
    text-decoration: none!important;
}

#pj-part td:first-child::before{
    font-family: "Font Awesome 5 Free";
    content: "\f1c1";
    display: inline-block;
    padding-right: 5px;
    font-size: 20px;
    color: firebrick;
    vertical-align: middle;
    font-weight: 900;
}
.pj .rpj li span::before{
    font-family: "Font Awesome 5 Free";
    content: "\f1c1";
    display: inline-block;
    padding-right: 5px;
    font-size: 20px;
    color: firebrick;
    vertical-align: middle;
    font-weight: 900;
}

.sp button{
    color: #212529 !important;
    border: 0.125rem solid #ced4da;
    background-color: white !important;
}

.spm button{
    color: #212529 !important;
    border: 0.125rem solid #ced4da;
    background-color: white !important;
}

select, select.form-control {
    color: #212529 !important;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-position: right 0.75rem center !important;
    background-repeat: no-repeat !important;
    background-size: 16px 12px !important;
    padding-right: 2.25rem !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.mainpanel{
    height: 100vh;
}

.notify {
    z-index: 9999;
}

.hidden {
    display: none;
}
.verif-label{
    background-color: #E8E8E8 !important;
    padding: 0.5rem !important;
    border-radius: 0.5rem!important;
}
.card.align-self-stretch{
    width: 300px;
}
.bs-stepper-content form .form-group label{
    font-weight: bold !important;
    color: #333 !important;
    font-size: 16px !important;
    margin-bottom: 5px !important;
}


div.bootstrap-select,
div.bootstrap-select.form-control,
.bootstrap-select,
.bootstrap-select.form-control,
.bootstrap-select.is-valid,
.bootstrap-select.is-invalid,
.bootstrap-select select,
.was-validated div.bootstrap-select,
.was-validated .bootstrap-select,
div.bootstrap-select.form-control,
.bootstrap-select.form-control {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    height: auto !important;
    min-height: auto !important;
    box-shadow: none !important;
}

div.bootstrap-select,
.bootstrap-select {
    width: 100% !important;
}

.bootstrap-select > .dropdown-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: calc(1.5em + 0.75rem + 0.25rem) !important;
    min-height: calc(1.5em + 0.75rem + 0.25rem) !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    background-color: #fff !important;
    color: #212529 !important;
    border: 0.125rem solid #ced4da;
    border-radius: 0.5rem !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.bootstrap-select > .dropdown-toggle .filter-option {
    display: flex !important;
    align-items: center !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    height: 100% !important;
}

.bootstrap-select > .dropdown-toggle::after {
    content: "" !important;
    display: inline-block !important;
    width: 16px !important;
    height: 12px !important;
    margin-left: 0.5rem !important;
    border: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 16px 12px !important;
    flex-shrink: 0 !important;
    transition: transform 0.15s ease-in-out !important;
}

.bootstrap-select.show > .dropdown-toggle::after {
    transform: rotate(180deg) !important;
}

/* ── Select désactivé : conserver fond grisé et bordure propre ── */
.bootstrap-select.disabled > .dropdown-toggle,
.bootstrap-select > .dropdown-toggle.disabled,
.bootstrap-select > .dropdown-toggle:disabled {
    background-color: #e9ecef !important;
    border: 0.125rem solid #ced4da !important;
    color: #495057 !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}

.bootstrap-select.disabled > .dropdown-toggle .filter-option,
.bootstrap-select > .dropdown-toggle.disabled .filter-option {
    color: #495057 !important;
    opacity: 1 !important;
}

/* ── Bootstrap Select & Inputs : Styles d'état (valide / invalide) ── */

/* 1. État Valide - bordure verte */
.form-control.is-valid,
input.is-valid,
textarea.is-valid,
select.is-valid,
.bootstrap-select.is-valid .dropdown-toggle,
.bootstrap-select.is-valid > .dropdown-toggle,
.bootstrap-select .dropdown-toggle.is-valid,
.was-validated .bootstrap-select:not(.is-invalid):has(select:valid:not(.is-invalid)):not(:has(select.is-invalid)):not(:has(select[required]:has(option[value=""]:checked))) .dropdown-toggle {
    border-color: #198754 !important;
}

.form-control.is-valid:focus,
input.is-valid:focus,
textarea.is-valid:focus,
select.is-valid:focus,
.bootstrap-select.is-valid .dropdown-toggle:focus,
.bootstrap-select.is-valid > .dropdown-toggle:focus {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25) !important;
}

/* 2. État Invalide - bordure rouge prioritaire */
.form-control.is-invalid,
input.is-invalid,
textarea.is-invalid,
select.is-invalid,
.bootstrap-select.is-invalid .dropdown-toggle,
.bootstrap-select.is-invalid > .dropdown-toggle,
.bootstrap-select .dropdown-toggle.is-invalid,
.error .bootstrap-select .dropdown-toggle,
.has-error .bootstrap-select .dropdown-toggle,
.was-validated .bootstrap-select.is-invalid .dropdown-toggle,
.was-validated .bootstrap-select.is-invalid > .dropdown-toggle,
.was-validated .bootstrap-select .dropdown-toggle.is-invalid,
.was-validated .bootstrap-select:has(select.is-invalid) .dropdown-toggle,
.was-validated .bootstrap-select:has(select:invalid) .dropdown-toggle,
.was-validated .bootstrap-select:has(.is-invalid) .dropdown-toggle,
.was-validated .bootstrap-select select:invalid + .dropdown-toggle {
    border-color: #dc3545 !important;
}

.form-control.is-invalid:focus,
input.is-invalid:focus,
textarea.is-invalid:focus,
select.is-invalid:focus,
.bootstrap-select.is-invalid .dropdown-toggle:focus,
.bootstrap-select.is-invalid > .dropdown-toggle:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

/* 3. Affichage du message d'erreur invalid-feedback pour bootstrap-select */
.was-validated .bootstrap-select:has(select:invalid) ~ .invalid-feedback,
.was-validated .bootstrap-select.is-invalid ~ .invalid-feedback,
.was-validated .bootstrap-select:has(.is-invalid) ~ .invalid-feedback,
.bootstrap-select.is-invalid ~ .invalid-feedback,
.was-validated .sp:has(> select:invalid) ~ .invalid-feedback,
.was-validated .sp.is-invalid ~ .invalid-feedback,
.was-validated .spm:has(> select:invalid) ~ .invalid-feedback,
.was-validated .spm.is-invalid ~ .invalid-feedback {
    display: block !important;
}

/* 4. Champs optionnels vides : neutraliser UNIQUEMENT s'ils sont vides et non invalides */
.was-validated .form-control:not([required]):placeholder-shown:not(.is-invalid),
.was-validated textarea.form-control:not([required]):placeholder-shown:not(.is-invalid),
.was-validated select.form-control:not([required]):has(option[value=""]:checked):not(.is-invalid),
.was-validated select.form-select:not([required]):has(option[value=""]:checked):not(.is-invalid) {
    border-color: #ced4da !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* ── Style unifié pour les cartes de sélection dans les préformulaires ── */
.option-card.selected {
    background-color: var(--color-success, #198754) !important;
    border-color: var(--color-success, #198754) !important;
    color: #ffffff !important;
}

.option-card.selected,
.option-card.selected *,
.option-card.selected .text-muted,
.option-card.selected .text-custom-success,
.option-card.selected .text-success,
.option-card.selected .text-secondary,
.option-card.selected .text-dark,
.option-card.selected small,
.option-card.selected p,
.option-card.selected span,
.option-card.selected div,
.option-card.selected h1,
.option-card.selected h2,
.option-card.selected h3,
.option-card.selected h4,
.option-card.selected h5,
.option-card.selected h6,
.option-card.selected i {
    color: #ffffff !important;
    --bs-text-opacity: 1 !important;
    fill: #ffffff !important;
}

.option-card.selected .text-muted,
.option-card.selected small {
    color: rgba(255, 255, 255, 0.92) !important;
    opacity: 0.95 !important;
}

/* ── Bloc Timbre fiscal dans les préformulaires ── */
.timbre-block {
    margin-top: 0.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-left: 4px solid #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
    padding: 0.5rem 1rem;
}

.timbre-icon-circle {
    width: 28px;
    height: 28px;
    background-color: #ffc107;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #212529;
}

.timbre-icon-circle i {
    font-size: 0.8rem;
}

.timbre-label {
    color: #212529;
    font-weight: 600;
    font-size: 0.72rem;
}

.timbre-amount {
    font-weight: 700;
    color: #212529;
    font-size: 0.85rem;
}

/* ── Bloc "Coût de la demande" compact dans les préformulaires ── */
.cost-icon-circle {
    width: 28px;
    height: 28px;
}

.cost-icon-size {
    font-size: 0.8rem;
}

.cost-amount {
    font-size: 0.85rem;
}

.cost-label-sm {
    font-size: 0.72rem;
}

.cost-value-sm {
    font-size: 0.85rem;
}

/* ── Bouton "Télécharger l'arrêté" dans les préformulaires ── */
.preform-btn-arrete {
    font-size: 0.82rem;
}

/* ── Bloc "Besoin d'aide ?" dans les préformulaires ── */
.preform-support-icon {
    width: 48px;
    height: 48px;
}

.preform-support-title {
    font-size: 0.85rem;
}

.preform-support-desc {
    font-size: 0.76rem;
}

.preform-support-empty {
    font-size: 0.74rem;
    font-style: italic;
}

/* ── Barre de progression fine dans les préformulaires ── */
.progress-h-8px {
    height: 8px;
}

.progress-w-half {
    width: 50%;
}

.initial-w-0 {
    width: 0%;
}

/* ── Bouton eTimbre DGI dans les préformulaires ── */
.btn-etimbre-dgi {
    background-color: #198754 !important;
    border: 1px solid #198754 !important;
    color: #ffffff !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border-radius: 50rem !important;
    padding: 0.25rem 0.85rem !important;
    display: inline-flex !important;
    align-items: center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.btn-etimbre-dgi:hover {
    background-color: #146c43 !important;
    border-color: #146c43 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12) !important;
}

.btn-etimbre-dgi * {
    color: #ffffff !important;
}