.bg-admin {
    position: relative;
    z-index: 1;
}

.bg-admin::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('home/img/3.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    z-index: -1;
}

.card-header h6, 
.card-header h3, 
.card-header h4,
.card-header h2 {
    color: white;
}	

.readonly-container {
    margin-top: 10px;
}

.readonly-field {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    height: 40px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.readonly-field i {
    font-size: 16px;
}

.readonly-field span {
    flex-grow: 1;
    text-align: left;
    font-family: 'Arial', sans-serif;
}

.readonly-field input[type="hidden"] {
    display: none;
}

#map {
    margin-top: 20px;
    z-index: 1;
    width: 100%;
    height: 400px;
}

#card-element {
    height: 50px;
    padding-top: 16px;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.login-content {
    flex: 1;
    display: flex;
}

.footer {
    padding: 4px;
    color: white;
    font-size: 14px;
    background-color: #A2845E;
    text-align: center;
}

/* ==================== BOUTONS PERSONNALISÉS - SOLUTION COMPLÈTE ==================== */

/* Style de base pour les boutons personnalisés */
.btn-custom {
    background-color: #00306B;
    color: white;
    border: none;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    width: fit-content;
    margin: 8px 0;
}

/* Style pour les boutons avec fond personnalisé */
.btn-back {
    background-color: #8C6735;
    color: white;
    border: none;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    width: 120px;
    margin: 8px 0;
}

/* ==================== GESTION ALIGNEMENT BOUTONS SEULS ==================== */

/* Par défaut (LTR) - quand btn-custom est seul */
.col .btn-custom:only-child {
    margin-left: auto;
    margin-right: 0;
}

/* Par défaut (LTR) - quand btn-back est seul */
.col .btn-back:only-child {
    margin-left: 0;
    margin-right: auto;
}

/* RTL pour l'arabe - quand btn-custom est seul */
body.ar .col .btn-custom:only-child {
    margin-left: 0;
    margin-right: auto;
}

/* RTL pour l'arabe - quand btn-back est seul */
body.ar .col .btn-back:only-child {
    margin-left: auto;
    margin-right: 0;
}

/* LTR explicite pour français et anglais - quand btn-custom est seul */
body.fr .col .btn-custom:only-child,
body.en .col .btn-custom:only-child {
    margin-left: auto;
    margin-right: 0;
}

/* LTR explicite pour français et anglais - quand btn-back est seul */
body.fr .col .btn-back:only-child,
body.en .col .btn-back:only-child {
    margin-left: 0;
    margin-right: auto;
}

/* ==================== CONTENEURS FLEXBOX POUR DEUX BOUTONS ==================== */

/* Conteneur Flexbox pour les boutons dans les étapes */
.col.d-flex.justify-content-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Quand les boutons sont dans un conteneur justify-content-between, annuler les marges auto */
.col.d-flex.justify-content-between .btn-custom,
.col.d-flex.justify-content-between .btn-back {
    margin-left: 0;
    margin-right: 0;
}

/* Alternative : Si vous voulez garder les boutons côte à côte avec alignement spécifique */
.button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.button-container .btn-back {
    margin-right: 0;
    margin-left: 0;
}

.button-container .btn-custom {
    margin-left: 0;
    margin-right: 0;
}

/* ==================== GESTION RTL/LTR POUR CONTENEURS AVEC DEUX BOUTONS ==================== */

/* En arabe (RTL) : btn-custom à gauche, btn-back à droite */
body.ar .button-container .btn-back {
    order: 1; /* Placer à droite en RTL */
}

body.ar .button-container .btn-custom {
    order: 2; /* Placer à gauche en RTL */
}

body.ar .col.d-flex.justify-content-between .btn-back {
    order: 1;
}

body.ar .col.d-flex.justify-content-between .btn-custom {
    order: 2;
}

/* En français/anglais (LTR) : btn-back à gauche, btn-custom à droite */
body.fr .col.d-flex.justify-content-between .btn-back,
body.en .col.d-flex.justify-content-between .btn-back {
    order: 1; /* btn-back à gauche */
}

body.fr .col.d-flex.justify-content-between .btn-custom,
body.en .col.d-flex.justify-content-between .btn-custom {
    order: 2; /* btn-custom à droite */
}

/* ==================== CLASSES ALTERNATIVES POUR BOUTONS SEULS ==================== */

/* Solution alternative avec classes spécifiques pour plus de contrôle */
.button-container-single {
    display: flex;
    width: 100%;
}

/* Bouton seul aligné à droite (LTR) */
.button-container-single.align-right {
    justify-content: flex-end;
}

/* Bouton seul aligné à gauche (LTR) */
.button-container-single.align-left {
    justify-content: flex-start;
}

/* En RTL, inverser les alignements */
body.ar .button-container-single.align-right {
    justify-content: flex-start;
}

body.ar .button-container-single.align-left {
    justify-content: flex-end;
}

/* ==================== SOLUTION MODERNE AVEC CSS LOGICAL PROPERTIES ==================== */

.btn-custom-logical {
    background-color: #00306B;
    color: white;
    border: none;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    width: fit-content;
    margin-block: 8px;
    margin-inline-start: auto; /* Equivalent à margin-left: auto en LTR, margin-right: auto en RTL */
    margin-inline-end: 0;
}

.btn-back-logical {
    background-color: #8C6735;
    color: white;
    border: none;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    width: 120px;
    margin-block: 8px;
    margin-inline-start: 0;
    margin-inline-end: auto; /* Equivalent à margin-right: auto en LTR, margin-left: auto en RTL */
}

/* ==================== STYLES COMMUNS ET RÉINITIALISATIONS ==================== */

/* Conservez les autres styles existants */
.text-custom { color: #00306B; }
.text-back { color: #8C6735; }
.btn-custom:hover { background-color: #8C6735; color: white; }
.btn-back:hover { background-color: #8C6735; color: white; }

/* Réinitialisation des marges dans form-group ou autres conteneurs */
.form-group .btn-custom,
.form-group .btn-back,
.col .btn-custom,
.col .btn-back {
    margin-bottom: 0;
}

/* ==================== BOUTON LOGIN ==================== */

.btn-custom-login {
    background-color: #00306B;
    color: white;
    font-size: 16px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

body.ar .btn-custom-login {
    margin-left: auto;
    margin-right: 0;
}

body.fr .btn-custom-login,
body.en .btn-custom-login {
    margin-right: 0;
    margin-left: auto;
}

.btn-custom-login i {
    margin-left: 10px;
}

.btn-custom-login:hover {
    background-color: #8A6C31;
    color: white;
    transform: translateY(-2px);
}

.btn-custom-login:active {
    background-color: #10172B;
    transform: translateY(2px);
}

/* ==================== AUTRES STYLES ORIGINAUX ==================== */

.nav-pills .nav-link.active {
    color: #fff;
    background-color: #00306B;
}

.nav .search-input.input-group:focus-within .input-group-text,
.dark .nav .search-input.input-group:focus-within .form-control {
    border-color: #00306B;
}

.nav .sidebar-toggle {
    background: #00306B;
}

a.nav-link {
    color: #00306B;
}

.iq-navbar-header.navs-bg-color .iq-header-img {
    background-color: #00306B;
}

.checkbox-with-image {
    width: 50px;
    height: 50px;
    appearance: none;
    background-image: url('assets/images/icons/discheck2.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-with-image:checked {
    background-image: url('assets/images/icons/check.jpg');
    background-color: transparent;
}

.checkbox-with-image:hover {
    transform: scale(1.1);
}

.agreement-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.agreement-container input[type="checkbox"] {
    width: 50px;
    height: 50px;
    margin: 0;
}

.agreement-container p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.icon-circle {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    align-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    color: #00306B;
    font-size: 20px;
    border: 2px solid #00306B;
}

/* Container centré */
.notify-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    width: 50%;
}

/* Notification */
.notify {
    position: relative;
    padding: 20px;
    border-radius: 8px;
    background-color: #f0f4ff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
    pointer-events: all;
    font-size: 16px;
    color: #333;
}

/* Close icon stylisée */
.notify-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
    z-index: 10001;
    transition: color 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notify-close:hover {
    color: #e00;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.blob {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 7px;
    border-radius: 50%;
    background-color: green;
    opacity: 1;
    filter: blur(12px);
    animation: blob-bounce 5s infinite ease;
}

@keyframes blob-bounce {
    0% {
        transform: translate(-100%, -100%) translate3d(0, 0, 0);
    }
    25% {
        transform: translate(-100%, -100%) translate3d(100%, 0, 0);
    }
    50% {
        transform: translate(-100%, -100%) translate3d(100%, 100%, 0);
    }
    75% {
        transform: translate(-100%, -100%) translate3d(0, 100%, 0);
    }
    100% {
        transform: translate(-100%, -100%) translate3d(0, 0, 0);
    }
}

.d-flex.align-items-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --------------------select-------------------- */
.custom-select-container {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.custom-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    background-color: #fff;
    cursor: pointer;
    color: #333;
    min-height: 38px;
    position: relative;
}

.custom-select-header:focus,
.custom-select-header:hover {
    border-color: #B78F42;
    outline: none;
}

.custom-select-arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #B78F42;
    transition: transform 0.2s ease;
}

.custom-select-arrow.open {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    max-height: 238px; /* Ajusté pour 7 options (7 * 34px, à vérifier) */
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.custom-select-options::-webkit-scrollbar {
    width: 8px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background-color: #B78F42;
    border-radius: 4px;
}

.custom-select-option {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.custom-select-option:hover,
.custom-select-option:focus {
    background-color: #f8f2e4;
}

.custom-select-option.selected {
    background-color: #f8f2e4;
    font-weight: bold;
    color: #B78F42;
}

.custom-select-selected {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* class for tabel */
.table-elegant {
    border-collapse: collapse; /* Changé de 'separate' à 'collapse' pour des bordures unifiées */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.table-elegant thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    border-top: 1px solid #dee2e6 !important;
    border-left: 1px solid #dee2e6 !important;
    border-right: 1px solid #dee2e6 !important;
}

.table-elegant tbody tr:hover {
    background-color: #f8f9fa;
}

.table-elegant td {
    border: 1px solid #e9ecef !important;
    vertical-align: middle;
}

.table-elegant th {
    border: 1px solid #dee2e6 !important;
}

/* Bordures arrondies pour la première ligne */
.table-elegant thead tr:first-child th:first-child {
    border-top-left-radius: 10px;
}

.table-elegant thead tr:first-child th:last-child {
    border-top-right-radius: 10px;
}

/* Bordures arrondies pour la dernière ligne */
.table-elegant tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.table-elegant tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

.status-badge {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}