/* ==========================================================================
   Chari Pay - Thème global du back-office
   Chargé sur toutes les pages (config/settings.php > KT_THEME_ASSETS.global.css),
   après style.bundle.css. Modernise les composants Metronic communs :
   fond, en-tête, barre de titre, cartes, tableaux, formulaires, boutons,
   badges, alertes, modales, menus, onglets, pages d'authentification.
   ========================================================================== */

/* ---------- Jetons de design (utilisables partout, pas seulement dans .cp-dash) ---------- */
:root,
[data-bs-theme="light"] {
    --cp-radius: 16px;
    --cp-radius-sm: 10px;
    --cp-card-bg: #ffffff;
    --cp-border: rgba(15, 23, 42, 0.07);
    --cp-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.05);
    --cp-shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 12px 28px rgba(15, 23, 42, 0.09);
    --cp-muted: #8a94a6;
    --cp-text: #0f172a;
    --cp-focus: 0 0 0 3px rgba(27, 132, 255, 0.16);
    --cp-accent: #ea6b4a;
}

/* Fond de page clair uniquement (":root" s'appliquerait aussi au mode sombre) */
[data-bs-theme="light"] {
    --bs-app-bg-color: #f4f6fa;
}

[data-bs-theme="dark"] {
    --cp-card-bg: #1b1c22;
    --cp-border: rgba(255, 255, 255, 0.07);
    --cp-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    --cp-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(0, 0, 0, 0.35);
    --cp-muted: #8b93a7;
    --cp-text: #f1f5f9;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- En-tête ---------- */
[data-kt-app-layout] .app-header {
    background-color: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--cp-border);
    box-shadow: none !important;
}

[data-bs-theme="dark"] [data-kt-app-layout] .app-header,
[data-bs-theme="dark"][data-kt-app-layout] .app-header {
    background-color: rgba(21, 22, 28, 0.82) !important;
}

/* Nom du site marchand dans l'en-tête */
.cp-site-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
    padding: 0.4rem 0.9rem 0.4rem 0.45rem;
    border-radius: 999px;
    background: var(--bs-gray-100, #f1f1f4);
    border: 1px solid var(--cp-border);
    color: var(--cp-text);
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 0;
}

.cp-site-chip__icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #60a5fa, #1d4ed8);
    color: #fff;
}

.cp-site-chip__icon i,
.cp-site-chip__icon span[class*="ki-"] {
    color: inherit;
    font-size: 0.95rem;
}

.cp-site-chip__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Avatar du menu utilisateur */
#kt_header_user_menu_toggle .symbol > .symbol-label,
#kt_header_user_menu_toggle .symbol > img {
    border-radius: 12px !important;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(27, 132, 255, 0.18);
    font-weight: 700;
}

/* ---------- Barre de titre (toolbar) ---------- */
.app-toolbar .page-heading {
    font-size: 1.45rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    color: var(--cp-text) !important;
}

.app-toolbar .breadcrumb {
    margin-top: 0.3rem;
    font-size: 0.85rem;
}

.app-toolbar .breadcrumb .breadcrumb-item,
.app-toolbar .breadcrumb .breadcrumb-item a {
    color: var(--cp-muted);
    font-weight: 500;
}

.app-toolbar .breadcrumb .breadcrumb-item a:hover {
    color: var(--bs-primary);
}

.app-toolbar .breadcrumb .breadcrumb-item:last-child {
    color: var(--bs-gray-700);
}

/* ---------- Cartes ---------- */
.app-content .card {
    border-radius: var(--cp-radius);
    border: 1px solid var(--cp-border);
    box-shadow: var(--cp-shadow);
}

.app-content .card > .card-header {
    border-bottom-color: var(--cp-border);
}

.app-content .card > .card-header .card-title,
.app-content .card > .card-header .card-title h2,
.app-content .card > .card-header .card-title h3 {
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--cp-text);
}

.app-content .card > .card-footer {
    border-top-color: var(--cp-border);
    background: transparent;
}

.app-content .separator {
    border-bottom-color: var(--cp-border);
}

/* ---------- Tableaux (DataTables et tableaux classiques) ---------- */
.app-content .table > thead > tr > th {
    background: var(--bs-gray-100, #f9f9f9);
    color: var(--bs-gray-600) !important;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    border-bottom: 0 !important;
}

.app-content .table > thead > tr > th:first-child {
    border-top-left-radius: var(--cp-radius-sm);
    border-bottom-left-radius: var(--cp-radius-sm);
    padding-left: 1rem;
}

.app-content .table > thead > tr > th:last-child {
    border-top-right-radius: var(--cp-radius-sm);
    border-bottom-right-radius: var(--cp-radius-sm);
    padding-right: 1rem;
}

.app-content .table > tbody > tr > td {
    color: var(--bs-gray-800);
    vertical-align: middle;
}

.app-content .table > tbody > tr > td:first-child {
    padding-left: 1rem;
}

.app-content .table > tbody > tr {
    transition: background-color 0.12s ease;
}

.app-content .table.dataTable > tbody > tr:hover > td,
.app-content .table-hover > tbody > tr:hover > td {
    background: var(--bs-gray-100, #f9f9f9);
}

.app-content .table.table-row-dashed > tbody > tr {
    border-bottom-color: var(--cp-border);
}

/* Tableaux "bordered/striped" de l'ancien style : on adoucit */
.app-content .table-bordered > :not(caption) > * > * {
    border-color: var(--cp-border);
}

/* Contrôles DataTables */
.app-content .dataTables_wrapper .dataTables_length select,
.app-content .dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
}

.app-content .dataTables_wrapper .dataTables_info {
    color: var(--cp-muted);
    font-size: 0.85rem;
}

.app-content .pagination .page-item .page-link {
    border-radius: 8px;
    min-width: 2.2rem;
    font-weight: 600;
}

.app-content .pagination .page-item.active .page-link {
    box-shadow: 0 4px 10px -4px rgba(27, 132, 255, 0.6);
}

.app-content .dataTables_processing {
    border-radius: var(--cp-radius-sm);
    box-shadow: var(--cp-shadow-hover);
    border: 1px solid var(--cp-border);
}

/* ---------- Formulaires ---------- */
.app-content .form-control,
.app-content .form-select,
.modal .form-control,
.modal .form-select {
    border-radius: var(--cp-radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.app-content .form-control:not(.form-control-flush):not(.form-control-transparent),
.app-content .form-select,
.modal .form-control,
.modal .form-select {
    min-height: 44px;
}

.app-content .form-control:focus,
.app-content .form-select:focus,
.modal .form-control:focus,
.modal .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: var(--cp-focus);
}

.app-content .form-control.form-control-solid,
.app-content .form-select.form-select-solid,
.modal .form-control.form-control-solid,
.modal .form-select.form-select-solid {
    border: 1px solid transparent;
}

.app-content .form-control.form-control-solid:focus,
.app-content .form-select.form-select-solid:focus,
.modal .form-control.form-control-solid:focus,
.modal .form-select.form-select-solid:focus {
    background-color: var(--cp-card-bg);
    border-color: var(--bs-primary);
}

.app-content .form-label,
.app-content label.fw-semibold.fs-6,
.app-content .col-form-label,
.modal .form-label {
    color: var(--bs-gray-700);
    font-weight: 600;
}

.app-content .form-text {
    color: var(--cp-muted);
}

.app-content .input-group > .input-group-text {
    border-radius: var(--cp-radius-sm);
}

.app-content .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.app-content .input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Select2 (utilisé par plusieurs formulaires) */
.app-content .select2-container--bootstrap5 .select2-selection {
    border-radius: var(--cp-radius-sm);
    min-height: 44px;
}

/* ---------- Boutons ---------- */
.btn {
    border-radius: var(--cp-radius-sm);
    font-weight: 600;
}

.btn.btn-sm {
    border-radius: 8px;
}

.btn.rounded-pill {
    border-radius: 999px !important;
}

.btn.btn-primary:not(.btn-active-light-primary) {
    box-shadow: 0 6px 16px -8px rgba(27, 132, 255, 0.7);
}

.btn.btn-primary:not(.btn-active-light-primary):hover {
    box-shadow: 0 8px 20px -8px rgba(27, 132, 255, 0.8);
}

/* ---------- Badges ---------- */
.app-content .badge {
    border-radius: 999px;
    font-weight: 600;
}

/* ---------- Alertes ---------- */
.alert {
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-success { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.alert-danger  { background: #fef3f2; color: #b42318; border-color: #fecdca; }
.alert-warning { background: #fffaeb; color: #b54708; border-color: #fedf89; }
.alert-info    { background: #eff8ff; color: #175cd3; border-color: #b2ddff; }

[data-bs-theme="dark"] .alert-success { background: rgba(23, 198, 83, 0.12); color: #75e0a7; border-color: transparent; }
[data-bs-theme="dark"] .alert-danger  { background: rgba(248, 40, 90, 0.12); color: #fda29b; border-color: transparent; }
[data-bs-theme="dark"] .alert-warning { background: rgba(246, 192, 0, 0.12); color: #fec84b; border-color: transparent; }
[data-bs-theme="dark"] .alert-info    { background: rgba(27, 132, 255, 0.12); color: #84caff; border-color: transparent; }

/* ---------- Modales ---------- */
.modal-content {
    border-radius: 18px;
    border: 0;
    box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.35);
}

.modal-header {
    border-bottom-color: var(--cp-border);
}

.modal-header .modal-title,
.modal-header h2 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.modal-footer {
    border-top-color: var(--cp-border);
}

.modal-backdrop.show {
    opacity: 0.45;
    backdrop-filter: blur(2px);
}

/* ---------- Menus déroulants ---------- */
.menu-sub-dropdown {
    border-radius: 14px;
    border: 1px solid var(--cp-border);
    box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.25) !important;
}

.menu-sub-dropdown .menu-item .menu-link {
    border-radius: 8px;
}

/* ---------- Onglets ---------- */
.app-content .nav-line-tabs .nav-item .nav-link {
    font-weight: 600;
    color: var(--bs-gray-600);
}

.app-content .nav-line-tabs .nav-item .nav-link.active,
.app-content .nav-line-tabs .nav-item .nav-link:hover {
    color: var(--bs-primary);
    border-bottom-color: var(--bs-primary);
}

.app-content .nav-pills .nav-link {
    border-radius: var(--cp-radius-sm);
    font-weight: 600;
}

/* ---------- Divers ---------- */
.scrolltop {
    border-radius: 12px;
    box-shadow: var(--cp-shadow-hover);
}

/* Bloc de code / clés (HMAC, API) */
.app-content pre,
.app-content code {
    border-radius: 8px;
}

/* ==========================================================================
   Composants partagés <x-cp.*>
   ========================================================================== */

/* Messages flash */
.cp-flash {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.cp-flash i,
.cp-flash span[class*="ki-"] {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: inherit;
}

.cp-flash ul {
    margin: 0;
    padding-left: 1.1rem;
}

/* Barre recherche + actions au-dessus d'un tableau */
.cp-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.cp-list-toolbar .cp-tx-search__field {
    flex: 1 1 280px;
    max-width: 440px;
}

.cp-list-toolbar__end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

@media (max-width: 767.98px) {
    .cp-list-toolbar .cp-tx-search__field { max-width: none; }
    .cp-list-toolbar__end { width: 100%; }
    .cp-list-toolbar__end .btn { flex: 1 1 auto; }
}

/* ==========================================================================
   Rafraîchissement en direct (public/assets/js/live.js)
   ========================================================================== */
.cp-live {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: var(--cp-card-bg);
    border: 1px solid var(--cp-border);
    box-shadow: var(--cp-shadow);
    color: var(--bs-gray-700);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.cp-live__dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #17c653;
    flex-shrink: 0;
}

/* Halo pulsé quand le direct est actif */
.cp-live[data-state="live"] .cp-live__dot::after,
.cp-live[data-state="loading"] .cp-live__dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(23, 198, 83, 0.45);
    animation: cp-live-pulse 2s ease-out infinite;
}

.cp-live[data-state="paused"] .cp-live__dot,
.cp-live[data-state="idle"] .cp-live__dot { background: var(--bs-gray-400, #b5b5c3); }
.cp-live[data-state="error"] .cp-live__dot { background: #f6c000; }
.cp-live[data-state="expired"] .cp-live__dot { background: #f8285a; }

.cp-live__time {
    color: var(--cp-muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.cp-live__time:empty {
    display: none;
}

.cp-live__resume {
    border: 0;
    background: transparent;
    color: var(--bs-primary);
    font-weight: 700;
    padding: 0 0 0 0.2rem;
    cursor: pointer;
}

.cp-live__resume:hover {
    text-decoration: underline;
}

/* Bouton "Actualiser" (tableau de bord en mode manuel) */
.cp-live-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--cp-card-bg);
    border: 1px solid var(--cp-border);
    box-shadow: var(--cp-shadow);
    color: var(--bs-primary, #1b84ff);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cp-live-refresh [class*="ki-"] { color: inherit; }

.cp-live-refresh:hover,
.cp-live-refresh:focus-visible {
    background: var(--bs-primary-light, #e9f3ff);
    border-color: rgba(27, 132, 255, 0.35);
    outline: none;
}

.cp-live-refresh:disabled {
    cursor: progress;
    opacity: 0.75;
}

.cp-live-refresh.is-loading [class*="ki-"] {
    animation: cp-live-spin 0.9s linear infinite;
}

@keyframes cp-live-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 575.98px) {
    .cp-live-refresh__label { display: none; }
    .cp-live-refresh { padding: 0.45rem; }
}

@keyframes cp-live-pulse {
    0%   { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Mise en évidence d'un bloc mis à jour */
.cp-live-flash {
    animation: cp-live-flash 1.6s ease-out;
    border-radius: var(--cp-radius);
}

@keyframes cp-live-flash {
    0%   { box-shadow: 0 0 0 0 rgba(27, 132, 255, 0.0); }
    20%  { box-shadow: 0 0 0 4px rgba(27, 132, 255, 0.25); }
    100% { box-shadow: 0 0 0 0 rgba(27, 132, 255, 0.0); }
}

/* Nouvelle ligne arrivée dans un tableau */
.app-content .table > tbody > tr.cp-row-new > td {
    animation: cp-row-new 6s ease-out;
}

.app-content .table > tbody > tr.cp-row-new > td:first-child {
    box-shadow: inset 3px 0 0 #17c653;
}

@keyframes cp-row-new {
    0%, 40% { background-color: rgba(23, 198, 83, 0.12); }
    100%    { background-color: transparent; }
}

/* Rechargement silencieux : pas d'overlay "Traitement en cours" toutes les 15 s */
.cp-live-silent .dataTables_processing {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .cp-live .cp-live__dot::after,
    .cp-live-flash,
    .app-content .table > tbody > tr.cp-row-new > td { animation: none; }
}

/* ==========================================================================
   Authentification (login, OTP, mot de passe)
   ========================================================================== */
.cp-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    background: var(--bs-app-bg-color, #f4f6fa);
}

.cp-auth__main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

.cp-auth__mobile-logo {
    display: none;
    margin-bottom: 2rem;
}

.cp-auth__mobile-logo img {
    height: 34px;
}

.cp-auth__card {
    width: 100%;
    max-width: 440px;
    background: var(--cp-card-bg);
    border: 1px solid var(--cp-border);
    border-radius: 22px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 24px 48px -24px rgba(15, 23, 42, 0.18);
    padding: 2.5rem 2.25rem;
}

.cp-auth__card h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--cp-text) !important;
}

.cp-auth__card .form-control {
    min-height: 50px;
    border-radius: 12px;
    background-color: var(--bs-gray-100, #f5f7fa) !important;
    border: 1px solid transparent;
    font-weight: 500;
}

.cp-auth__card .form-control:focus {
    background-color: var(--cp-card-bg) !important;
    border-color: var(--bs-primary);
    box-shadow: var(--cp-focus);
}

.cp-auth__card .btn-primary {
    min-height: 50px;
    border-radius: 12px;
    font-size: 1rem;
}

.cp-auth__card .btn-primary,
.cp-auth__card .btn-primary .indicator-label,
.cp-auth__card .btn-primary .indicator-progress {
    color: #fff !important;
}

.cp-auth__card .text-gray-500 {
    color: var(--cp-muted) !important;
}

.cp-auth__card input[name="otp"] {
    letter-spacing: 0.5em;
    font-variant-numeric: tabular-nums;
}

/* ---------- Inscription (demande d'ouverture de compte marchand) ---------- */
.cp-auth__card:has(.cp-reg) {
    max-width: 640px;
}

.cp-reg__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: #fff3ef;
    color: #c2410c;
    font-size: 0.78rem;
    font-weight: 700;
}

.cp-reg__badge [class*="ki-"] { color: inherit; }

/* Étapes */
.cp-reg-steps {
    display: flex;
    gap: 0.5rem;
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.cp-reg-steps li {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.7rem;
    border-radius: 12px;
    background: var(--bs-gray-100, #f5f7fa);
    color: var(--cp-muted);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
}

.cp-reg-steps li > span {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cp-card-bg);
    color: var(--cp-muted);
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid var(--cp-border);
}

.cp-reg-steps li > span [class*="ki-"] { color: inherit; }
.cp-reg-steps li.is-current { background: var(--bs-primary-light, #e9f3ff); color: var(--bs-primary, #1b84ff); }
.cp-reg-steps li.is-current > span { background: var(--bs-primary, #1b84ff); border-color: transparent; color: #fff; }
.cp-reg-steps li.is-done { background: #ecfdf3; color: #067647; }
.cp-reg-steps li.is-done > span { background: #17c653; border-color: transparent; color: #fff; }

/* Sections et champs */
.cp-reg__section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--cp-border);
}

.cp-reg__section-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cp-text);
}

.cp-reg__section-title [class*="ki-"] { color: var(--bs-primary, #1b84ff); }

.cp-reg .form-label {
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-gray-700);
}

.cp-reg__field {
    position: relative;
}

.cp-reg__icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-gray-500);
    pointer-events: none;
    z-index: 1;
}

.cp-reg__field .form-control {
    padding-left: 2.6rem;
}

.cp-auth__card .cp-reg__field .form-control.is-invalid {
    border-color: var(--bs-danger, #f8285a);
    background-color: var(--bs-danger-light, #ffeef3) !important;
}

.cp-reg__error {
    margin-top: 0.35rem;
    color: var(--bs-danger, #f8285a);
    font-size: 0.82rem;
    font-weight: 600;
}

/* Conditions + reCAPTCHA */
.cp-reg__terms {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: var(--bs-gray-100, #f5f7fa);
    color: var(--bs-gray-700);
    font-size: 0.9rem;
    cursor: pointer;
}

.cp-reg__terms .form-check-input { flex-shrink: 0; margin-top: 0.1rem; }
.cp-reg__terms.is-invalid { background: var(--bs-danger-light, #ffeef3); }

.cp-reg__captcha {
    display: flex;
    justify-content: center;
    margin: 1.25rem 0;
    min-height: 78px;
}

/* Demande envoyée */
.cp-reg-done {
    text-align: center;
}

.cp-reg-done__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf3;
    color: #17c653;
    box-shadow: 0 0 0 10px rgba(23, 198, 83, 0.08);
}

.cp-reg-done__icon [class*="ki-"] { color: inherit; font-size: 2.4rem !important; }

.cp-reg-done__text {
    margin: 0 auto 1.5rem;
    max-width: 440px;
    color: var(--cp-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.cp-reg-steps--done { text-align: left; }

@media (max-width: 575.98px) {
    .cp-reg-steps { flex-direction: column; }
}

.cp-auth__footer {
    margin-top: 1.75rem;
    color: var(--cp-muted);
    font-size: 0.85rem;
}

.cp-auth__aside {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 3.5rem;
    color: #fff;
    background:
        radial-gradient(900px 500px at 110% -10%, rgba(96, 165, 250, 0.5), transparent 60%),
        radial-gradient(600px 400px at -10% 110%, rgba(234, 107, 74, 0.28), transparent 60%),
        linear-gradient(150deg, #0b1533 0%, #13265f 55%, #1d4ed8 100%);
}

.cp-auth__aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
    pointer-events: none;
}

.cp-auth__aside > * {
    position: relative;
}

.cp-auth__logo img {
    height: 44px;
}

.cp-auth__pitch h2 {
    color: #fff;
    font-size: clamp(1.8rem, 2.6vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    max-width: 520px;
}

.cp-auth__pitch p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.05rem;
    max-width: 460px;
    margin-bottom: 2rem;
}

.cp-auth__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
    max-width: 460px;
}

.cp-auth__features li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.cp-auth__features i,
.cp-auth__features span[class*="ki-"] {
    color: #fdba74;
    font-size: 1.4rem;
}

.cp-auth__legal {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

@media (max-width: 991.98px) {
    .cp-auth { grid-template-columns: minmax(0, 1fr); }
    .cp-auth__aside { display: none; }
    .cp-auth__mobile-logo { display: block; }
}

@media (max-width: 575.98px) {
    .cp-auth__card { padding: 1.75rem 1.25rem; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .app-content .table > tbody > tr,
    .app-content .form-control,
    .app-content .form-select { transition: none; }
}
