/* ============================================================
   Force Ouvrière — Design System — Portail d'authentification
   Inspiré de la charte graphique de force-ouvriere.fr
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Couleurs FO */
    --fo-red: #e2001a;
    --fo-red-dark: #b80015;
    --fo-red-light: #ff1a33;
    --fo-navy: #1d1d3e;

    /* Surfaces */
    --bg-body: #f5f5f7;
    --bg-card: #ffffff;
    --bg-input: #f8f9fa;

    /* Texte */
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;

    /* Bordures */
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --border-focus: var(--fo-red);

    /* Feedback */
    --green: #2e7d32;
    --green-light: #43a047;
    --green-bg: #f0faf0;
    --green-border: #c8e6c9;
    --blue-bg: #eef6ff;
    --blue-border: #bbdefb;
    --blue-text: #1565c0;

    /* Misc */
    --radius: 10px;
    --radius-sm: 6px;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Body ---------- */
.fo-body {
    font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

/* Barre rouge supérieure — rappel du site FO */
.fo-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--fo-red);
    z-index: 100;
}

/* Corps pour les pages de gestion (non centrées) */
.fo-body--manage {
    justify-content: flex-start;
    padding-top: 48px;
}

/* ---------- Container ---------- */
.fo-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    animation: fo-fadeInUp 0.45s ease-out;
}

.fo-container--wide {
    max-width: 1000px;
}

@keyframes fo-fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Logo Section ---------- */
.fo-logo-section {
    text-align: center;
    margin-bottom: 28px;
}

.fo-logo {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--fo-red);
}

.fo-logo svg {
    width: 72px;
    height: 68px;
}

.fo-logo-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.fo-logo-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ---------- Card ---------- */
.fo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition);
}

.fo-card + .fo-card {
    margin-top: 16px;
}

/* ---------- Card Title / Desc ---------- */
.fo-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.fo-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ---------- App Banner (Login page) ---------- */
.fo-app-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 24px;
}

.fo-app-banner--neutral {
    background: var(--bg-input);
    border-color: var(--border-color);
}

.fo-app-banner-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.fo-app-banner-text {
    flex: 1;
}

.fo-app-banner-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    letter-spacing: 0.2px;
}

.fo-app-banner-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--fo-red);
}

.fo-app-banner-name--dark {
    color: var(--text-primary);
}

/* ---------- User Banner (Index page) ---------- */
.fo-user-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 24px;
}

.fo-user-avatar {
    width: 40px;
    height: 40px;
    background: var(--fo-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    color: white;
}

.fo-user-info-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.fo-user-info-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---------- Info Message (Index page) ---------- */
.fo-info-message {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.fo-info-message .fo-info-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.fo-info-message strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

/* ---------- Form Elements ---------- */
.fo-form-group {
    margin-bottom: 20px;
}

.fo-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: 0.1px;
}

.fo-form-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.fo-form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(226, 0, 26, 0.1);
    background: #fff;
}

.fo-form-input::placeholder {
    color: var(--text-muted);
}

/* Code input (6-digit OTP) */
.fo-form-input--code {
    font-size: 24px;
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    letter-spacing: 12px;
    padding: 14px 16px;
}

/* Phone hint */
.fo-form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ---------- Buttons ---------- */
.fo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    line-height: 1.4;
}

.fo-btn--primary {
    width: 100%;
    background: var(--fo-red);
    color: #fff;
    margin-top: 4px;
}

.fo-btn--primary:hover {
    background: var(--fo-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(226, 0, 26, 0.25);
}

.fo-btn--primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.fo-btn--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.fo-btn--accept {
    flex: 1;
    background: var(--green);
    color: #fff;
}

.fo-btn--accept:hover {
    background: var(--green-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.25);
}

.fo-btn--deny {
    flex: 1;
    background: #fff;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.fo-btn--deny:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.fo-btn--sm {
    padding: 7px 14px;
    font-size: 12px;
}

.fo-btn--outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.fo-btn--outline:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.fo-btn--danger {
    background: #fef2f2;
    color: var(--fo-red);
    border: 1px solid #fecaca;
}

.fo-btn--danger:hover {
    background: #fee2e2;
}

.fo-btn--success {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.fo-btn--success:hover {
    background: #e8f5e9;
}

/* ---------- Actions row (Consent) ---------- */
.fo-actions {
    display: flex;
    gap: 12px;
}

/* ---------- Error / Alert Messages ---------- */
.fo-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    color: #b91c1c;
    margin-bottom: 20px;
    line-height: 1.5;
}

.fo-alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.fo-alert--success {
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    color: var(--green);
}

.fo-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.fo-alert--info {
    background: var(--blue-bg);
    border: 1px solid var(--blue-border);
    color: var(--blue-text);
}

/* ---------- Footer Links ---------- */
.fo-footer-links {
    text-align: center;
    margin-top: 20px;
}

.fo-footer-links a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.fo-footer-links a:hover {
    color: var(--fo-red);
}

.fo-divider {
    color: var(--text-muted);
    margin: 0 8px;
}

/* ---------- Copyright ---------- */
.fo-copyright {
    text-align: center;
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- Back Link ---------- */
.fo-back-link {
    text-align: center;
    margin-top: 20px;
}

.fo-back-link a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.fo-back-link a:hover {
    color: var(--fo-red);
}

/* ---------- Page Header (Manage pages) ---------- */
.fo-page-header {
    margin-bottom: 28px;
}

.fo-page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.4px;
    margin-bottom: 4px;
}

.fo-page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ---------- MFA Method Items ---------- */
.fo-method-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
    transition: var(--transition);
}

.fo-method-item:hover {
    box-shadow: var(--shadow-card);
    border-color: #d0d0d0;
}

.fo-method-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.fo-method-info {
    flex: 1;
}

.fo-method-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fo-method-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

.fo-method-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ---------- Badges ---------- */
.fo-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fo-badge--default {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.fo-badge--disabled {
    background: var(--bg-input);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* ---------- Toggle Row ---------- */
.fo-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.fo-toggle-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---------- Switch Toggle ---------- */
.fo-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.fo-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.fo-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: var(--transition);
    border-radius: 34px;
}

.fo-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: #fff;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.fo-switch input:checked + .fo-slider {
    background-color: var(--fo-red);
}

.fo-switch input:focus + .fo-slider {
    box-shadow: 0 0 0 3px rgba(226, 0, 26, 0.25);
}

.fo-switch input:checked + .fo-slider::before {
    transform: translateX(22px);
}

.fo-switch input:disabled + .fo-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.fo-switch input:disabled + .fo-slider::before {
    cursor: not-allowed;
}


/* ---------- Add Method Cards ---------- */
.fo-add-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.fo-add-method-card {
    padding: 18px 16px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
    background: #fff;
}

.fo-add-method-card:hover {
    border-color: var(--fo-red);
    border-style: solid;
    background: #fef2f2;
    box-shadow: var(--shadow-card);
}

.fo-add-method-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.fo-add-method-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---------- Consent: Scopes ---------- */
.fo-scopes-list {
    list-style: none;
    margin-bottom: 24px;
}

.fo-scope-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
    transition: var(--transition);
}

.fo-scope-item:hover {
    background: var(--bg-input);
}

.fo-scope-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.fo-scope-info {
    flex: 1;
}

.fo-scope-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.fo-scope-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.fo-consent-message {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.6;
}

.fo-consent-app-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--fo-red);
    text-align: center;
    padding: 12px 16px;
    background: #fef2f2;
    border-radius: 8px;
    margin-bottom: 20px;
}

.fo-security-note {
    text-align: center;
    margin-top: 16px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ---------- MFA Challenge ---------- */
.fo-method-info-block {
    text-align: center;
    margin-bottom: 24px;
}

.fo-method-info-icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.fo-method-info-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.fo-method-info-target {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

/* ---------- Setup Pages ---------- */
.fo-setup-icon {
    font-size: 48px;
    display: block;
    text-align: center;
    margin-bottom: 16px;
}

.fo-setup-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.fo-email-display {
    text-align: center;
    margin-bottom: 24px;
}

.fo-email-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.fo-email-address {
    font-size: 16px;
    font-weight: 600;
    color: var(--fo-red);
    font-family: 'Courier New', monospace;
}

/* TOTP Steps */
.fo-step {
    margin-bottom: 24px;
}

.fo-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--fo-red);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    margin-right: 8px;
}

.fo-step-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.fo-qr-container {
    text-align: center;
    margin: 16px 0;
}

.fo-qr-container img {
    border-radius: 10px;
    background: white;
    padding: 12px;
    max-width: 200px;
    border: 1px solid var(--border-color);
}

.fo-secret-key {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: var(--bg-input);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-align: center;
    word-break: break-all;
    color: var(--fo-red);
    letter-spacing: 2px;
    border: 1px solid var(--border-color);
}

/* FIDO2 */
.fo-key-icon {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
    text-align: center;
}

.fo-instructions {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.fo-instructions ol {
    text-align: left;
    padding-left: 20px;
}

.fo-instructions li {
    margin-bottom: 8px;
}

.fo-status-message {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 16px;
    display: none;
}

.fo-status--success {
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    color: var(--green);
}

.fo-status--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.fo-status--waiting {
    background: #fffde7;
    border: 1px solid #fff9c4;
    color: #f9a825;
}

.fo-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(249, 168, 37, 0.3);
    border-top-color: #f9a825;
    border-radius: 50%;
    animation: fo-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes fo-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Error Page ---------- */
.fo-error-icon {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
    text-align: center;
}

.fo-error-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    color: var(--text-primary);
}

.fo-error-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: center;
}

.fo-error-id {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    background: var(--bg-input);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

/* ---------- LoggedOut Success ---------- */
.fo-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--green-bg);
    border: 2px solid var(--green-border);
    border-radius: 50%;
    margin: 0 auto 20px;
}

.fo-success-icon svg {
    width: 32px;
    height: 32px;
    color: var(--green);
}

.fo-success-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.fo-success-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ---------- Phone display (SMS setup) ---------- */
.fo-phone-display {
    text-align: center;
    margin-bottom: 20px;
}

.fo-phone-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.fo-phone-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--fo-red);
    font-family: 'Courier New', monospace;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .fo-card {
        padding: 24px 20px;
    }

    .fo-add-methods {
        grid-template-columns: 1fr;
    }

    .fo-logo svg {
        width: 60px;
        height: 56px;
    }

    .fo-logo-title {
        font-size: 20px;
    }

    .fo-actions {
        flex-direction: column-reverse;
    }
}

/* ---------- Layout Manage (Sidebar + Main Content Grid) ---------- */
.fo-manage-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
    width: 100%;
    margin-top: 10px;
}

.fo-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px 16px;
    box-shadow: var(--shadow-card);
}

.fo-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fo-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.fo-sidebar-link:hover:not(.disabled) {
    background: var(--bg-input);
    color: var(--text-primary);
}

.fo-sidebar-link.active {
    background: #fef2f2;
    color: var(--fo-red);
    font-weight: 600;
    border-left: 3px solid var(--fo-red);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.fo-sidebar-link.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.fo-sidebar-icon {
    font-size: 16px;
    display: inline-block;
    width: 20px;
    text-align: center;
}

/* Form Grid for profile details */
.fo-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.fo-form-grid--full {
    grid-column: span 2;
}

.fo-input-readonly {
    background: var(--border-light);
    color: var(--text-secondary);
    cursor: not-allowed;
    border-color: var(--border-color);
}

@media (max-width: 768px) {
    .fo-manage-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .fo-form-grid {
        grid-template-columns: 1fr;
    }
    
    .fo-form-grid--full {
        grid-column: span 1;
    }
}

/* ---------- Sessions & Devices ---------- */
.fo-session-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fo-session-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #fff;
    transition: var(--transition);
}

.fo-session-item:hover {
    border-color: #d0d0d0;
    box-shadow: var(--shadow-card);
}

.fo-session-icon {
    font-size: 24px;
    background: var(--bg-body);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fo-session-details {
    flex: 1;
}

.fo-session-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fo-session-meta {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ---------- Security History Timeline ---------- */
.fo-timeline {
    position: relative;
    padding-left: 20px;
}

.fo-timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border-color);
}

.fo-timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.fo-timeline-item:last-child {
    padding-bottom: 0;
}

.fo-timeline-badge {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--border-color);
}

.fo-timeline-badge--success {
    background: var(--green);
}

.fo-timeline-badge--error {
    background: var(--fo-red);
}

.fo-timeline-badge--info {
    background: var(--blue-text);
}

.fo-timeline-content {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.fo-timeline-content:hover {
    border-color: #d0d0d0;
}

.fo-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 12px;
}

.fo-timeline-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.fo-timeline-date {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.fo-timeline-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.fo-timeline-meta {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    padding-top: 4px;
    display: flex;
    gap: 12px;
}

/* ---------- Token Filters ---------- */
.fo-token-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.fo-filter-btn {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

.fo-filter-btn:hover {
    border-color: var(--fo-red);
    color: var(--text-primary);
    background: var(--bg-input);
}

.fo-filter-btn.active {
    background: var(--fo-red);
    color: #fff;
    border-color: var(--fo-red);
    box-shadow: 0 2px 6px rgba(226, 0, 26, 0.15);
}


/* ---------- Button Loading State ---------- */
.fo-btn--loading {
    position: relative;
    pointer-events: none;
    opacity: 0.75;
    cursor: wait;
}

.fo-btn--loading .fo-btn-label {
    visibility: hidden;
}

.fo-btn--loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fo-spin 0.6s linear infinite;
}

/* Variantes pour boutons non-primaires (texte sombre) */
.fo-btn--outline.fo-btn--loading::after,
.fo-btn--danger.fo-btn--loading::after {
    border-color: rgba(0, 0, 0, 0.15);
    border-top-color: var(--text-primary);
}

/* ---------- Sidebar Logout ---------- */
.fo-sidebar-logout {
    color: var(--fo-red);
    font-weight: 500;
}

.fo-sidebar-logout:hover {
    background: #fef2f2;
    color: var(--fo-red-dark);
}

/* ---------- Consent: Client Logo ---------- */
.fo-consent-app-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.fo-consent-app-logo img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 6px;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition);
}

.fo-consent-app-logo img:hover {
    transform: scale(1.05);
}

/* ---------- Application Shortcuts ---------- */
.fo-shortcuts-container {
    margin-top: 28px;
    animation: fo-fadeInUp 0.5s ease-out;
}

.fo-shortcuts-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
    margin-bottom: 16px;
}

.fo-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    justify-content: center;
}

.fo-shortcut-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.fo-shortcut-card:hover {
    border-color: var(--fo-red);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.fo-shortcut-logo {
    height: 36px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 10px;
}

.fo-shortcut-icon-placeholder {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
}

.fo-shortcut-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}


/* ---------- Identity Confirmation Page ---------- */

.fo-confirm-logo-container {
    display: flex;
    justify-content: center;
    margin: 8px 0 24px 0;
}

.fo-confirm-node {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    transition: var(--transition);
}

.fo-confirm-node:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--fo-red);
}

.fo-confirm-node img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.fo-confirm-node-placeholder {
    font-size: 36px;
}

.fo-confirm-user-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.fo-confirm-user-card:hover {
    border-color: var(--fo-red);
    box-shadow: var(--shadow-card-hover);
    background: var(--bg-card);
}

.fo-confirm-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fo-red) 0%, var(--fo-red-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(226, 0, 26, 0.2);
    flex-shrink: 0;
    user-select: none;
}

.fo-confirm-details {
    flex: 1;
    min-width: 0;
}

.fo-confirm-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fo-confirm-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fo-confirm-email {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.fo-confirm-badge-active {
    font-size: 10px;
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.fo-confirm-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

.fo-confirm-description strong {
    font-size: 18px;
}


