/* Shared backoffice controls; also used by the Alpine select adapter. */
[x-cloak] { display: none !important; }
.backoffice-content { max-width: 1600px; margin-inline: auto; }
.backoffice-content h1 { font-size: clamp(1.5rem, 2vw, 1.875rem); line-height: 1.25; letter-spacing: -.025em; color: #0f172a; }
.backoffice-content :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]), textarea, select) { border-radius: .75rem; border: 1px solid #e2e8f0; background-color: #fff; color: #334155; font-size: .875rem; min-height: 46px; padding: .7rem .9rem; transition: border-color .15s, box-shadow .15s; }
.backoffice-content :is(input, textarea, select)::placeholder { color: #94a3b8; }
.backoffice-content :is(input, textarea, select):focus { outline: none; border-color: #0b8a4d; box-shadow: 0 0 0 4px #0b8a4d1a; }
.backoffice-content input[type=file]::file-selector-button { border: 0; border-radius: .5rem; background: #f1faf5; color: #075f35; padding: .4rem .65rem; margin-right: .75rem; font-weight: 600; cursor: pointer; }
.backoffice-content label { color: #334155; }
.backoffice-content :is(button, a)[class*="bg-sonaged-600"], .backoffice-content a[class*="border-slate-200"][class*="px-4"] { border-radius: .75rem; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.backoffice-content :is(button, a):focus-visible { outline: 2px solid #0b8a4d; outline-offset: 3px; }
.backoffice-content table { width: 100%; }
.backoffice-content thead th { padding: .9rem 1rem; font-size: .75rem; font-weight: 600; color: #64748b; background: #f8fafc; }
.backoffice-content tbody td { padding: 1rem; vertical-align: middle; }
.backoffice-content tbody tr { transition: background .15s; }
.backoffice-content tbody tr:hover { background: #f8fafc80; }
.bo-section { border: 1px solid #e2e8f0; border-radius: 1rem; background: white; padding: 1.5rem; box-shadow: 0 1px 3px #0f172a04; }
.bo-section-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.bo-section-number { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: .75rem; background: #f1faf5; color: #075f35; font-size: .875rem; font-weight: 700; }
.bo-section-heading h2 { font-size: 1rem; font-weight: 700; color: #0f172a; }
.bo-section-heading p { font-size: .75rem; color: #64748b; margin-top: .15rem; }
.bo-select { position: relative; min-width: 0; }
.backoffice-content select.bo-select-native { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.bo-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; min-height: 46px; padding: .7rem .9rem; border: 1px solid #e2e8f0; border-radius: .75rem; background: #fff; color: #334155; text-align: left; font-size: .875rem; }
.bo-select-trigger:hover { border-color: #0b8a4d; }
.bo-select-trigger:disabled { opacity: .5; cursor: not-allowed; }
.bo-select-trigger span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bo-select-panel { position: absolute; top: 100%; inset-inline: 0; z-index: 50; min-width: min(240px, calc(100vw - 3rem)); margin-top: .4rem; padding: .5rem; border: 1px solid #e2e8f0; border-radius: .8rem; background: #fff; box-shadow: 0 12px 30px #0f172a18; }
.bo-select-results { max-height: 240px; overflow-y: auto; }
.bo-select-option { display: flex; justify-content: space-between; gap: .5rem; width: 100%; border-radius: .5rem; padding: .65rem .75rem; text-align: left; color: #334155; font-size: .875rem; }
.bo-select-option:hover, .bo-select-option:focus, .bo-select-option[aria-pressed=true] { background: #f1faf5; color: #075f35; outline: none; }
.bo-select-option:disabled { opacity: .45; }
@media(max-width: 640px) {
    .bo-section { padding: 1rem; }
    .backoffice-content > .flex.items-center.justify-between { flex-wrap: wrap; gap: 1rem; }
}
@media(prefers-reduced-motion: reduce) { .backoffice-content * { transition: none !important; scroll-behavior: auto !important; } }

/* Profil et parcours de double authentification */
.profile-page { --profile-green: #17643e; }
.profile-page :is(section, article, aside)[id] { scroll-margin-top: 1.5rem; }
.profile-banner { overflow: hidden; border: 1px solid #e2e8f0; border-top: 4px solid var(--profile-green); border-radius: 1rem; background: #fff; box-shadow: 0 1px 3px #0f172a06; }
.profile-banner-main { display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem; }
.profile-avatar { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 76px; height: 76px; overflow: hidden; border: 1px solid #dcece2; border-radius: 1.25rem; background: #eef7f1; color: var(--profile-green); font-size: 1.75rem; font-weight: 700; }
.profile-eyebrow { margin-bottom: .25rem; color: #6b7a70; font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.profile-meta-badge { display: inline-flex; align-items: center; border: 1px solid #e8edf0; border-radius: .4rem; padding: .2rem .5rem; background: #f8fafc; color: #64748b; font-size: .7rem; font-weight: 500; overflow-wrap: anywhere; }
.profile-security-summary { flex-shrink: 0; padding-left: 1.5rem; border-left: 1px solid #e8edf0; text-align: right; }
.profile-state { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; border-radius: 2rem; padding: .35rem .65rem; font-size: .68rem; font-weight: 600; }
.profile-state::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ''; }
.profile-state.is-enabled { background: #eaf6ee; color: #17643e; }
.profile-state.is-pending { background: #fff6e4; color: #986317; }
.profile-section-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: .85rem 1.5rem; border-top: 1px solid #edf1f4; background: #fcfdfd; }
.profile-section-nav a { padding: .15rem 0; color: #64748b; font-size: .75rem; font-weight: 600; }
.profile-section-nav a:hover { color: var(--profile-green); }
.profile-columns { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(380px, 1fr); align-items: start; gap: 1.5rem; }
.profile-security-heading { display: flex; align-items: center; gap: .8rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid #edf1f4; background: #fcfdfd; }
.profile-security-icon, .profile-method-icon { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: .75rem; background: #edf6f0; color: var(--profile-green); }
.profile-steps { display: flex; gap: 1rem; padding: 0; list-style: none; }
.profile-steps li { display: flex; align-items: center; gap: .45rem; color: #94a3b8; font-size: .68rem; font-weight: 600; }
.profile-steps li span { display: flex; align-items: center; justify-content: center; width: 23px; height: 23px; border-radius: 50%; background: #f1f5f9; }
.profile-steps li.is-complete { color: var(--profile-green); }
.profile-steps li.is-complete span { background: #e7f3eb; }
.profile-method { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem; border: 1px solid #e2e8f0; border-radius: .8rem; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.profile-method input[type=radio] { width: 16px; height: 16px; min-height: 0; margin-top: .25rem; accent-color: var(--profile-green); flex-shrink: 0; }
.profile-method:has(input:checked) { border-color: #3d855a; background: #f5faf6; box-shadow: 0 0 0 1px #3d855a14; }
.profile-method:has(input:focus-visible) { outline: 2px solid #17643e; outline-offset: 3px; }
.profile-method.is-unavailable { background: #fafbfc; cursor: not-allowed; }
.profile-method.is-unavailable .profile-method-icon { background: #f0f2f5; color: #94a3b8; }
.profile-unavailable-badge { border-radius: .3rem; padding: .12rem .35rem; background: #f1f5f9; color: #64748b; font-size: .58rem; font-weight: 500; }
.profile-sms-help { margin: -.15rem 0 1rem; padding-left: .75rem; border-left: 2px solid #e8cc91; color: #85652e; font-size: .72rem; line-height: 1.6; }
.profile-primary-action { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; border-radius: .75rem; background: var(--profile-green); color: white; padding: .7rem 1rem; font-size: .8rem; font-weight: 600; }
.profile-primary-action:hover { background: #125232; }
.profile-method-details, .profile-recovery { padding: 1rem; border: 1px solid #e2e8f0; border-radius: .75rem; background: #fafcfc; }
.profile-qr-block { display: grid; grid-template-columns: 144px minmax(0, 1fr); align-items: center; gap: 1rem; }
.profile-qr-block img { width: 144px; height: 144px; }
.profile-page .profile-otp { letter-spacing: .4em; min-height: 52px; }
.profile-notice { border: 1px solid #e2e8f0; border-radius: .75rem; background: #f8fafc; padding: 1rem; color: #475569; font-size: .8rem; line-height: 1.6; }
.profile-notice.is-success { background: #f1f9f3; border-color: #d2e9d8; color: #17643e; }
@media(max-width: 1100px) { .profile-columns { grid-template-columns: minmax(0, 1fr); } .profile-security { grid-row: 1; } }
@media(max-width: 640px) {
    .profile-banner-main { flex-wrap: wrap; gap: 1rem; padding: 1.25rem; }
    .profile-avatar { width: 56px; height: 56px; border-radius: 1rem; }
    .profile-security-summary { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: .9rem 0 0; border-left: 0; border-top: 1px solid #edf1f4; text-align: left; }
    .profile-security-summary span.mt-2 { margin-top: 0; }
    .profile-section-nav { gap: .5rem 1rem; padding: .8rem 1.25rem; }
    .profile-security-heading { flex-wrap: wrap; padding: 1.25rem; }
    .profile-security-heading h2 { font-size: 1rem; }
    .profile-method { padding: .8rem; gap: .5rem; }
    .profile-method-icon { width: 30px; height: 30px; border-radius: .5rem; }
    .profile-qr-block { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
    .profile-steps { gap: .65rem; }
}

.bo-password-field { position: relative; width: 100%; min-width: 0; }
.backoffice-content .bo-password-field > input { width: 100%; padding-right: 5.5rem; }
.bo-password-toggle { position: absolute; top: 50%; right: .4rem; transform: translateY(-50%); min-height: 34px; padding: .35rem .6rem; border-radius: .5rem; color: #17643e; background: transparent; font-size: .72rem; font-weight: 600; }
.bo-password-toggle:hover { background: #edf6f0; }
.bo-password-toggle:disabled { opacity: .45; cursor: not-allowed; }
