/* © 2020-2026 YANOVA SAS (France, RCS 880584529) - Tous droits réservés */
/* Modern Login Page Styles - Secoya Auth V2 */

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    background: #f4f7f9;
    box-sizing: border-box;
    color: #444;
}

.login-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 420px;
    border: 1px solid #e1e8ed;
}

.login-card h2 {
    margin-top: 0;
    color: #469bbf;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid #d1d9e0;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #469bbf;
    box-shadow: 0 0 0 3px rgba(70, 155, 191, 0.15);
}

button {
    width: 100%;
    padding: 0.8rem;
    background: #2a7ea1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
}

button:hover {
    background: #236c8a;
}

:root {
    --border-color: #dbe4ea;
    --secondary-bg: #f8fafc;
    --bg-color: #f1f5f9;
    --text-muted: #64748b;
}

.btn-oauth {
    background: white;
    color: #444;
    border: 1px solid #d1d9e0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-oauth:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-oauth img {
    height: 20px;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    color: #94a3b8;
    position: relative;
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: #e2e8f0;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.error {
    color: #b91c1c;
    background: #fef2f2;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    display: none;
    font-size: 0.9rem;
    border: 1px solid #fee2e2;
}

.success {
    color: #15803d;
    background: #f0fdf4;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    display: none;
    font-size: 0.9rem;
    border: 1px solid #dcfce7;
}

.error-message-paragraph {
    margin: 0 0 0.75rem;
}

.error-message-emphasis {
    font-weight: 700;
}

.error-message-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}

.error-action-button {
    width: auto;
    min-width: 0;
    padding: 0.6rem 0.9rem;
}

.error-action-link {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.error-action-link:hover {
    text-decoration: none;
}

.mfa-setup-modal {
    display: none;
    background: white;
    padding: 0; /* Let the card handle padding */
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    margin: 0;
}

.mfa-setup-modal h3 {
    margin-top: 0;
    color: #469bbf;
    font-size: 1.25rem;
}

.qr-container {
    text-align: center;
    margin: 0.6rem 0;
}

.qr-container img {
    border: 1px solid #e1e8ed;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.manual-key {
    background: #f1f5f9;
    padding: 0.85rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    word-break: break-all;
    text-align: center;
    color: #334155;
    border: 1px dashed #cbd5e1;
}

.setup-steps {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0;
}

.setup-steps li {
    padding: 0.45rem 0.7rem;
    margin-bottom: 0.35rem;
    background: #f8fafc;
    border-left: 4px solid #469bbf;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.setup-steps li strong {
    color: #469bbf;
    display: inline;
    margin-right: 0.35rem;
}

.setup-steps small a {
    color: #469bbf;
    text-decoration: none;
    font-weight: 500;
}

.setup-steps small a:hover {
    text-decoration: underline;
}

.btn-secondary {
    background: #94a3b8;
}

.btn-secondary:hover {
    background: #64748b;
}

.btn-link {
    background: none;
    color: #469bbf;
    text-decoration: none;
    border: none;
    padding: 0.5rem;
    margin-top: 0.25rem;
    font-weight: 500;
    width: auto;
    display: inline-block;
}

.btn-link:hover {
    background: none;
    color: #3a8baa;
    text-decoration: underline;
}

.oauth-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.inline-link {
    font-size: 0.85rem;
    color: #003b5c;
    text-decoration: none;
}

.muted-inline-text {
    font-size: 0.9em;
    color: var(--text-muted);
}

.form-group-header {
    position: relative;
}

.form-group-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.btn-link-full {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

.btn-link-center {
    width: 100%;
    text-align: center;
}

.modal-body-copy {
    margin-bottom: 20px;
    text-align: center;
}

.button-group-stack {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.btn-link-spaced {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}

.muted-text {
    color: #5f6368;
    font-size: 0.9rem;
}

.button-top-gap {
    margin-top: 0.5rem;
}

.button-top-gap-lg {
    margin-top: 1.5rem;
}

.section-subtitle-left {
    text-align: left;
    margin-bottom: 0.5rem;
}

.qr-image {
    max-width: 150px;
    display: block;
    margin: 0 auto;
}

.manual-key-selectable {
    user-select: all;
    cursor: copy;
}

.manual-key-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 0.5rem;
}

.passkey-lost-link {
    text-align: right;
    padding-top: 0;
    margin-top: -8px;
    padding-right: 0;
}

.passkey-waiting-msg {
    text-align: center;
    color: var(--color-text-muted, #6b7280);
    font-size: 0.9rem;
    margin: 8px 0 4px;
}

.centered-panel {
    text-align: center;
}

#passkey-register-prompt {
    position: relative;
    transition: opacity 0.2s ease;
}

#passkey-register-prompt.is-submitting {
    opacity: 0.6;
    pointer-events: none;
}

#passkey-register-prompt.is-submitting::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.35);
}

#passkey-register-prompt.is-submitting button,
#passkey-register-prompt.is-submitting input {
    cursor: wait;
}

/* Step-up P1 : issues de secours sous le bouton clé (OTP d'enrôlement, code de secours). */
.stepup-fallbacks {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e4e4e7;
    text-align: center;
}

.stepup-fallback-intro {
    margin-bottom: 8px;
}

.stepup-fallbacks a {
    display: inline-block;
    margin: 4px 0;
}

.success-panel-message {
    margin-top: 20px;
    font-weight: bold;
    color: #2ecc71;
}

.recovery-codes-panel {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--secondary-bg);
}

.recovery-codes-title {
    margin-top: 0;
    color: #e74c3c;
}

.recovery-codes-notice {
    font-size: 0.9em;
    margin-bottom: 10px;
}

.recovery-codes-list {
    font-family: monospace;
    font-size: 1.1em;
    letter-spacing: 1px;
    font-weight: bold;
    background: var(--bg-color);
    padding: 10px;
    border-radius: 4px;
    text-align: left;
}

.button-full-top {
    margin-top: 15px;
    width: 100%;
}

.paragraph-spaced {
    margin-bottom: 20px;
}

.button-link-block {
    text-decoration: none;
    display: block;
}

.button-top-block {
    margin-top: 10px;
    width: 100%;
}

.manual-key-details {
    margin: 1.25rem 0;
}

.terms-content {
    max-height: 280px;
    overflow-y: auto;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #dbe4ea;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    line-height: 1.55;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
    font-size: 0.95rem;
    color: #334155;
}

.terms-checkbox input {
    width: auto;
    margin-top: 0.2rem;
}

.terms-checkbox input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.terms-checkbox.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.terms-checkbox.disabled span {
    color: #94a3b8;
}

.terms-scroll-hint {
    font-size: 0.85rem;
    color: #475569;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f1f5f9;
    border-radius: 4px;
}

.terms-scroll-hint.hidden {
    display: none;
}

/* ─────────────────────────────────────────────────────────────────
   Progressive Identifier-First Flow Styles
   ───────────────────────────────────────────────────────────────────  */

/* Universal hidden class */
.hidden {
    display: none !important;
}

.logout-inline-form {
    margin: 0;
}

/* Identifier Form - Step 1 */
#identifier-form {
    margin-bottom: 1.5rem;
}

#identifier-form .form-group {
    margin-bottom: 1.25rem;
}

#identifier-form button {
    width: 100%;
}

/* Continue Button */
#continue-btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Suggested Methods Container - Step 2a */
#suggested-methods-container {
    margin-bottom: 1.5rem;
}

#suggested-methods-container .verification-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

#suggested-methods-container .verification-header h3 {
    margin: 0 0 0.5rem;
    color: #469bbf;
    font-size: 1.1rem;
}

#suggested-methods-container .verification-header .brand-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #757575;
}

#suggested-methods-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1rem;
}

#suggested-methods-buttons .btn-oauth {
    width: 100%;
}

/* Other Method Button */
#other-method-btn {
    width: 100%;
    margin-top: 0.5rem;
}

#other-method-btn:not(.hidden) {
    display: block;
}

/* Login Form - Step 2b (hidden until needed) */
#login-form {
    margin-bottom: 1.5rem;
}

#login-form.hidden {
    display: none;
}

#login-form button[type="submit"] {
    width: 100%;
}

.manual-key-summary {
    cursor: pointer;
    color: #469bbf;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    list-style: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.manual-key-summary:hover {
    background: #f8fafc;
}

.manual-key-summary::-webkit-details-marker {
    display: none;
}

.info-section {
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.25rem 0;
}

.info-section p {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #334155;
}

.info-steps {
    padding-left: 1.25rem;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0.5rem 0;
}

.info-steps li {
    margin-bottom: 0.4rem;
}

/* =========================================================
   BRAND HEADER & FOOTER  (logo + SECOYA title + Yanova)
   ========================================================= */

.brand-header {
    background: #fff;
    /* bleed out of the card's 2rem padding for a full-width banner */
    margin: -2rem -2rem 1.5rem;
    padding: 1.5rem 2rem 0;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

.logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.logo-client {
    max-height: 45px;
    max-width: 120px;
    object-fit: contain;
}

.logo-secoya {
    max-height: 45px;
    max-width: 120px;
    object-fit: contain;
}

.brand-title {
    margin: 0.25rem 0 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.brand-instance {
    color: #469bbf;
}

.brand-subtitle {
    margin: 0.1rem 0 0.8rem;
    font-size: 0.7rem;
    color: #777;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-hr {
    border: none;
    height: 1px;
    background-color: #469bbf;
    width: 85%;
    margin: 0 auto;
}

/* gap between HR and first form element */
.brand-header + .error,
.brand-header + .success {
    margin-top: 1rem;
}

.brand-footer {
    /* bleed out of the card's 2rem padding for a full-width banner */
    margin: 1.5rem -2rem -2rem;
    padding: 0 2rem 1.5rem;
    text-align: center;
}

.brand-footer .brand-hr {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.logo-yanova {
    max-height: 28px;
    object-fit: contain;
    margin-bottom: 0.4rem;
    filter: grayscale(1);
    opacity: 0.6;
    transition: filter 0.2s, opacity 0.2s;
}

.logo-yanova:hover {
    filter: grayscale(0);
    opacity: 1;
}

.footer-text {
    font-size: 0.7rem;
    color: #999;
    line-height: 1.5;
}

.footer-text a {
    color: #469bbf;
    text-decoration: none;
    font-weight: 500;
}

.footer-text a:hover {
    text-decoration: underline;
}

.info-text {
    font-size: 0.9rem;
    color: #5f6368;
    margin-bottom: 1rem;
}

/* Keypad Styles */
.keypad-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 1.5rem auto;
    max-width: 320px;
}

.bouton, .boutonr, .boutonv {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdfdfd;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    color: #444;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.bouton:hover {
    background: #f4f7f9;
    border-color: #469bbf;
    color: #2f6f8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.bouton:active {
    transform: translateY(0);
}

.boutonr {
    background: #fffafa;
    color: #b91c1c;
    font-size: 0.9rem;
    font-weight: 500;
}

.boutonr:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.boutonv {
    background: #f0fdf4;
    color: #15803d;
    font-size: 0.9rem;
    font-weight: 600;
}

.boutonv:hover {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

/* Keypad input display */
input[readonly] {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #334155;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    letter-spacing: 0.5rem !important;
    text-align: center;
    cursor: default;
}

/* MFA Verification Improvements */
.verification-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-app-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
    font-size: 1.5rem;
    color: #469bbf;
}

.auth-app-icons .icon-svg {
    width: 1.5rem;
    height: 1.5rem;
    opacity: 0.8;
}

.verification-help {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #0369a1;
    line-height: 1.5;
}

.verification-help .icon-svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    margin-right: 0.5rem;
    color: #0ea5e9;
}

.display-block {
    display: block !important;
}

.display-flex {
    display: flex !important;
}

.display-inline-block {
    display: inline-block !important;
}

.offscreen-submit-form {
    position: absolute !important;
    left: -9999px !important;
    top: 0 !important;
    display: block !important;
}

/* MFA Method Selection */
.method-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
}

.method-card:hover {
    border-color: #469bbf;
    background: #f0f9ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.method-icon {
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #2f6f8a;
}

.method-icon .icon-svg {
    width: 1.25rem;
    height: 1.25rem;
}

.method-card:hover .method-icon {
    background: #2a7ea1;
    color: white;
}

.method-info {
    flex: 1;
}

.method-title {
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    font-size: 0.95rem;
}

.method-desc {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

/* ===================================================================== */
/* MFA — Modern OTP code entry (6 boxes) + clickable numeric keypad        */
/* ===================================================================== */

.otp-fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 0.5rem;
    min-width: 0;
}

.otp-legend {
    padding: 0;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #555;
}

.otp-input-group {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
}

.otp-box {
    width: 42px;
    height: 46px;
    padding: 0;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    background: #fff;
    border: 1px solid #d1d9e0;
    border-radius: 10px;
    box-sizing: border-box;
    caret-color: #2a7ea1;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s, background 0.15s;
}

.otp-box:focus {
    outline: none;
    border-color: #469bbf;
    box-shadow: 0 0 0 3px rgba(70, 155, 191, 0.18);
    transform: translateY(-1px);
}

.otp-box.filled {
    border-color: #2a7ea1;
    background: #f4f9fb;
}

.otp-input-group.error .otp-box {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
    animation: otp-shake 0.35s ease;
}

@keyframes otp-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.mfa-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    max-width: 260px;
    margin: 0.6rem auto 0.4rem;
}

.mfa-key {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    background: #fdfdfd;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.mfa-key:hover {
    background: #f4f7f9;
    border-color: #469bbf;
    color: #2f6f8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.mfa-key:active {
    transform: translateY(0);
}

.mfa-key-action {
    font-size: 1.15rem;
}

#mfa-key-back {
    color: #b45309;
    background: #fffbeb;
}

#mfa-key-back:hover {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.mfa-key-validate {
    color: #15803d;
    background: #f0fdf4;
}

.mfa-key-validate:hover {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

@media (max-width: 360px) {
    .otp-input-group { gap: 0.3rem; }
    .otp-box { width: 38px; height: 42px; font-size: 1.2rem; }
    .mfa-keypad { max-width: 230px; gap: 6px; }
    .mfa-key { height: 38px; font-size: 1.05rem; }
}

/* Keep the whole MFA step within a standard HD viewport so the error banner at
   the top stays visible while typing the code at the bottom. */
@media (max-height: 820px) {
    #mfa-form .verification-help { display: none; }
    #mfa-form .auth-app-icons { margin: 0.25rem 0; }
    .otp-box { height: 42px; }
    .mfa-key { height: 36px; }
    .mfa-keypad { margin-top: 0.4rem; }
}

/* ===================================================================== */
/* MFA recovery (backup) codes — display screen + 2FA fallback input      */
/* ===================================================================== */

/* The recovery-codes display uses a <ul>; override the shared block style. */
ul#mfa-recovery-list.recovery-codes-list {
    list-style: none;
    margin: 0.6rem 0;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 230px;
    overflow-y: auto;
}

ul#mfa-recovery-list.recovery-codes-list li {
    padding: 0.3rem 0.5rem;
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.recovery-codes-actions {
    display: flex;
    gap: 0.6rem;
    margin: 0.5rem 0 0.75rem;
}

.recovery-codes-actions .btn-secondary {
    flex: 1;
    margin: 0;
}

.recovery-codes-confirm {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
}

.recovery-codes-confirm input {
    width: auto;
}

#mfa-recovery-continue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#mfa-backup-section {
    margin-top: 0.5rem;
}

/* ============================================================
   Volet d'aide (documentation) — bouton flottant + panneau droit
   ============================================================ */
/* Bouton flottant simple, en haut à droite. */
.help-fab {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    width: 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    background: #1d6fb8;
    border: none;
    border-radius: 24px;
    box-shadow: 0 4px 14px rgba(13, 59, 102, 0.28);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.help-fab:hover { background: #0d3b66; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(13, 59, 102, 0.34); }
.help-fab:focus-visible { outline: 3px solid rgba(29, 111, 184, 0.55); outline-offset: 2px; }
.help-fab__icon { font-size: 1rem; line-height: 1; }

.help-overlay {
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(13, 30, 50, 0);
    transition: background 0.28s ease;
}
.help-overlay.is-open { background: rgba(13, 30, 50, 0.45); }

.help-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(480px, 94vw);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    box-shadow: -8px 0 28px rgba(13, 59, 102, 0.22);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    will-change: transform;
}
.help-overlay.is-open .help-drawer { transform: translateX(0); }

.help-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: #0d3b66;
    color: #fff;
}
.help-drawer__head h2 { margin: 0; font-size: 1.05rem; color: #fff; }
.help-drawer__actions { display: inline-flex; gap: 6px; }
.help-drawer__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 1rem;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    cursor: pointer;
}
.help-drawer__btn:hover { background: rgba(255, 255, 255, 0.28); }
.help-drawer__frame {
    flex: 1 1 auto;
    width: 100%;
    border: none;
    background: #f4f6f9;
}

body.help-drawer-locked { overflow: hidden; }

@media (max-width: 540px) {
    .help-drawer { width: 100vw; }
}
