﻿/* ==========================================================================
   CITI - Page de Connexion & Espace Outils (Option 2 avec Filigrane)
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.citi-login-body {
    overflow-x: hidden;
}

/* Conteneur principal plein écran */
.citi-layout-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ==========================================================================
   VOLET GAUCHE : CONNEXION AUTH0 & IDENTITÉ CITI
   ========================================================================== */

.citi-sidebar-panel {
    flex: 0 0 420px;
    width: 420px;
    background: #07395c;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 56px 40px 40px 40px;
    z-index: 10;
}

/* Ondes décoratives concentriques en bas */
.citi-sidebar-decor {
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 320px;
    height: 280px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.9;
}

.citi-sidebar-decor svg {
    width: 100%;
    height: 100%;
    display: block;
}

.citi-sidebar-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 540px;
    justify-content: space-between;
}

/* Marque & Titres */
.citi-brand-block {
    margin-bottom: 36px;
}

.citi-main-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    margin-bottom: 32px;
    display: block;
}

.citi-page-title {
    font-size: 32px;
    line-height: 1.18;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px 0;
    letter-spacing: -0.025em;
}

.citi-page-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: rgba(191, 219, 254, 0.8);
    margin: 0;
    line-height: 1.45;
}

/* Formulaire */
.citi-form-wrapper {
    margin-bottom: 32px;
}

.citi-auth-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 340px;
}

.citi-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.citi-input-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(191, 219, 254, 0.9);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.citi-input-container {
    position: relative;
}

.citi-text-input {
    width: 100%;
    background: #0b4772;
    border: 1px solid #1d5e8f;
    border-radius: 10px;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 13px 16px;
    transition: all 0.2s ease;
    outline: none;
}

.citi-text-input::placeholder {
    color: rgba(147, 197, 253, 0.55);
}

.citi-text-input:focus {
    background: #0d5182;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.25);
}

.citi-button-group {
    margin-top: 4px;
}

.citi-btn-login {
    width: 100%;
    background: #ffffff;
    color: #07395c;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 13px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.citi-btn-login:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.citi-btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Erreurs */
.citi-error-wrap {
    min-height: 20px;
}

.citi-error-message {
    color: #fca5a5;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    display: block;
}

/* Pied de page du volet gauche */
.citi-help-footer {
    margin-top: auto;
    padding-top: 28px;
}

.citi-help-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.citi-help-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(147, 197, 253, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

.citi-help-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.citi-help-caption {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.citi-help-anchor {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 12px;
    color: rgba(191, 219, 254, 0.75);
    text-decoration: underline;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s ease;
}

.citi-help-anchor:hover {
    color: #ffffff;
}

/* ==========================================================================
   VOLET DROIT : ESPACE CITI & OUTILS AVEC FILIGRANE VECTORIEL
   ========================================================================== */

.citi-content-panel {
    flex: 1;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 64px 80px 36px 80px;
    min-height: 100vh;
}

/* FILIGRANE GÉOMÉTRIQUE & ARCHITECTURAL */
.citi-watermark-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 800px;
    height: 800px;
    pointer-events: none;
    user-select: none;
    opacity: 0.14;
    color: #1e3a8a;
    z-index: 1;
    overflow: hidden;
}

.citi-watermark-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.citi-content-inner {
    position: relative;
    z-index: 2;
    max-width: 680px;
    width: 100%;
    margin: auto 0;
}

.citi-intro-header {
    margin-bottom: 32px;
}

.citi-category-pill {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #1d68bd;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.citi-headline {
    font-size: 42px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 28px 0;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.citi-subheading {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

/* Liste des outils en cartes interactives */
.citi-tools-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.citi-tool-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 16px;
    box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.05), 0 1px 3px -1px rgba(15, 23, 42, 0.03);
    text-decoration: none;
    color: inherit;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.citi-tool-card:hover {
    border-color: rgba(96, 165, 250, 0.85);
    box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    transform: translateY(-2px);
}

.citi-tool-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.citi-tool-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.22s ease;
}

.citi-icon {
    width: 24px;
    height: 24px;
    display: block;
}

.citi-tool-card:hover .citi-tool-badge {
    background: #2563eb;
    color: #ffffff;
    transform: scale(1.05);
}

.citi-tool-details {
    flex: 1;
    min-width: 0;
}

.citi-tool-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.citi-tool-card:hover .citi-tool-title {
    color: #2563eb;
}

.citi-tool-description {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.citi-tool-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    padding-left: 16px;
    flex-shrink: 0;
}

.citi-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.citi-tool-card:hover .citi-arrow {
    transform: translateX(4px);
}

/* Pied de page volet droit */
.citi-content-footer {
    position: relative;
    z-index: 2;
    padding-top: 24px;
    margin-top: 36px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #94a3b8;
}

.citi-content-footer p {
    margin: 0;
}

/* ==========================================================================
   MODALS (EMAIL PROVISIONING & SUPPORT TECHNIQUE MANDRILL)
   ========================================================================== */

.citi-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.citi-modal-card {
    background: #ffffff;
    padding: 28px 32px;
    border-radius: 14px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.citi-modal-title {
    margin: 0 0 6px 0;
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
}

.citi-modal-desc {
    margin: 0 0 16px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
}

.citi-modal-input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.citi-modal-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.citi-modal-err {
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    min-height: 16px;
    margin: 0 0 16px 0;
}

.citi-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.citi-btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}

.citi-btn-secondary:hover {
    background: #e2e8f0;
}

.citi-btn-modal-save {
    background: #07395c;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    font-family: inherit;
}

.citi-btn-modal-save:hover {
    background: #052c48;
}

.citi-btn-modal-save:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Style spécifique au modal de support */
.citi-support-modal {
    max-width: 520px;
}

.citi-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    margin-bottom: 20px;
}

.citi-modal-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.citi-modal-header-titles {
    flex: 1;
    min-width: 0;
}

.citi-modal-close {
    position: absolute;
    top: -6px;
    right: -8px;
    background: none;
    border: none;
    font-size: 26px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s ease;
}

.citi-modal-close:hover {
    color: #0f172a;
}

.citi-support-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.citi-support-row {
    display: flex;
    gap: 14px;
}

.citi-support-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.citi-support-label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.01em;
}

.citi-support-input, .citi-support-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #0f172a;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.citi-support-input:focus, .citi-support-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.citi-support-textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.45;
}

.citi-support-feedback {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    line-height: 1.45;
}

.citi-feedback-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.citi-feedback-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETTES & MOBILES)
   ========================================================================== */

@media screen and (max-width: 1024px) {
    .citi-layout-container {
        flex-direction: column;
        min-height: 100vh;
    }

    .citi-sidebar-panel {
        flex: none;
        width: 100%;
        padding: 44px 28px 36px 28px;
        min-height: auto;
    }

    .citi-sidebar-inner {
        min-height: auto;
    }

    .citi-content-panel {
        padding: 44px 28px 48px 28px;
    }

    .citi-watermark-bg {
        width: 500px;
        height: 500px;
        opacity: 0.10;
    }

    .citi-headline {
        font-size: 32px;
        margin-bottom: 24px;
    }

    .citi-help-footer {
        margin-top: 28px;
    }
}

@media screen and (max-width: 560px) {
    .citi-support-row {
        flex-direction: column;
        gap: 12px;
    }
    .citi-content-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media screen and (max-width: 480px) {
    .citi-headline {
        font-size: 28px;
    }

    .citi-tool-card {
        padding: 16px 14px;
    }

    .citi-tool-badge {
        width: 42px;
        height: 42px;
    }
}
