/*
 * Pages de connexion aux couleurs de Levizio Technologies (ADR 0015) :
 * porte commune, choix du cabinet, invitation (gabarit door.layout), et les
 * pages simples de Filament (connexion, code de double authentification).
 * Les couleurs viennent de config/vipos.php (variables --lv-*, voir
 * resources/views/brand/tokens.blade.php). Aucune police téléchargée : les
 * titres prennent la police à empattements du système, comme leviziotech.ca.
 *
 * Tout est rangé sous .lv-page ou .fi-simple-layout : l'intérieur de VIP OS
 * n'est pas touché.
 */

.lv-page,
.fi-simple-layout {
    --lv-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --lv-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --lv-gradient: linear-gradient(135deg, var(--lv-gold-light), var(--lv-gold-dark));
    --lv-radius: 14px;
    --lv-radius-field: 8px;
    background: radial-gradient(120% 90% at 85% 0%, var(--lv-spruce) 0%, var(--lv-spruce-deep) 70%) fixed;
    background-color: var(--lv-spruce-deep);
    color: var(--lv-ink);
    font-family: var(--lv-sans);
}

/* L'aigle et le surtitre en tête de carte */
.lv-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.lv-mark img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgb(2 30 28 / 0.35);
}

.lv-eyebrow {
    font: 600 11px/1.4 var(--lv-sans);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--lv-gold);
    text-align: center;
}

.lv-footer {
    margin-top: 20px;
    text-align: center;
}

.lv-footer img {
    height: 28px;
    width: auto;
    opacity: 0.9;
}

/* ---------- Gabarit door.layout ---------- */

.lv-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
    font-size: 15px;
    line-height: 1.6;
}

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

.lv-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--lv-card);
    border-radius: var(--lv-radius);
    padding: 32px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgb(2 30 28 / 0.45);
}

/* Le filet d'or en haut de la carte, comme sur leviziotech.ca */
.lv-card::before,
.fi-simple-layout .fi-simple-main::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--lv-gold-dark), var(--lv-gold-light), var(--lv-gold-dark));
}

.lv-card h1 {
    margin: 0;
    font: 600 26px/1.2 var(--lv-serif);
    color: var(--lv-ink);
    text-align: center;
}

.lv-card p {
    margin: 0;
    color: var(--lv-muted);
    text-align: center;
}

.lv-card form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lv-card label {
    font-weight: 600;
    font-size: 14px;
    color: var(--lv-ink);
}

.lv-card input {
    width: 100%;
    font: inherit;
    color: var(--lv-ink);
    padding: 10px 12px;
    border: 1px solid var(--lv-hair);
    border-radius: var(--lv-radius-field);
    background: var(--lv-card);
}

.lv-card input[aria-invalid="true"] {
    border-color: var(--lv-error);
}

.lv-error {
    color: var(--lv-error);
    font-size: 14px;
}

.lv-button,
.lv-card button {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 11px 16px;
    border: 0;
    border-radius: var(--lv-radius-field);
    background: var(--lv-gradient);
    color: var(--lv-button-text);
    font: 700 15px var(--lv-sans);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 6px 16px rgb(192 144 47 / 0.25);
}

.lv-button:hover,
.lv-card button:hover {
    filter: brightness(1.04);
}

.lv-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lv-cabinet {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--lv-hair);
    border-radius: var(--lv-radius-field);
    color: var(--lv-ink);
    font-weight: 600;
    text-decoration: none;
    background: var(--lv-card);
}

.lv-cabinet:hover {
    border-color: var(--lv-gold-dark);
}

.lv-back {
    font-size: 14px;
    color: var(--lv-muted);
    text-align: center;
}

.lv-page :focus-visible,
.fi-simple-layout :focus-visible {
    outline: 2px solid var(--lv-gold-light);
    outline-offset: 2px;
}

/* ---------- Pages simples de Filament ---------- */

.fi-simple-layout .fi-simple-main {
    position: relative;
    overflow: hidden;
    background: var(--lv-card);
    border-radius: var(--lv-radius);
    box-shadow: 0 24px 60px rgb(2 30 28 / 0.45);
    --tw-ring-color: transparent;
}

/* La marque de l'aigle remplace le nom « VIP OS » en tête de carte. */
.fi-simple-layout .fi-simple-header .fi-logo {
    display: none;
}

.fi-simple-layout .fi-simple-header-heading {
    font-family: var(--lv-serif);
    font-weight: 600;
    color: var(--lv-ink);
}

.fi-simple-layout .fi-simple-header-subheading,
.fi-simple-layout .fi-fo-field-wrp-helper-text {
    color: var(--lv-muted);
}

.fi-simple-layout .fi-input-wrp {
    border-radius: var(--lv-radius-field);
}

.fi-simple-layout .fi-btn.fi-color-primary:not(.fi-outlined) {
    background: var(--lv-gradient) !important;
    color: var(--lv-button-text) !important;
    border-radius: var(--lv-radius-field);
    font-weight: 700;
}

.fi-simple-layout .fi-link.fi-color-primary,
.fi-simple-layout a.fi-link {
    color: var(--lv-gold);
}

/* La carte et le nom de Levizio, centrés ensemble ; sans cela, le conteneur
   de la carte s'étire et repousse le nom en bas de l'écran. */
.fi-simple-layout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding-bottom: 24px;
}

.fi-simple-layout .fi-simple-main-ctn {
    flex-grow: 0;
}

/* Connexion par un fournisseur d'identité (Microsoft 365, LeViZio OS…) : en tête de la carte, bouton doré ;
   le formulaire du CRM vient ensuite (2026-10-16). */
.vipos-oidc {
    display: grid;
    gap: 10px;
    margin-bottom: 4px;
}

.vipos-oidc-hint {
    margin: 0;
    text-align: center;
    font-size: 13px;
    color: var(--lv-muted);
}

.vipos-oidc-or {
    text-align: center;
    font-size: 14px;
    color: var(--lv-muted);
}

.vipos-oidc .fi-btn {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
}

.vipos-oidc-or {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--lv-hair);
}

/* Le menu de l'utilisateur, au-dessus de la carte, se lit sur fond sombre. */
.fi-simple-layout .fi-simple-layout-header {
    color: #EAF1EA;
}

/* Mode sombre de Filament : la carte prend le vert foncé de la marque. */
.dark .fi-simple-layout .fi-simple-main {
    background: #0C332B;
}

.dark .fi-simple-layout .fi-simple-header-heading {
    color: #EAF1EA;
}

/* ---- Pages du coffre données au client (ADR 0029) ------------------------ */
.lv-doc {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 16px;
    margin: 18px 0 22px;
    font-size: 14px;
}
.lv-doc dt { color: var(--lv-muted); }
.lv-doc dd { margin: 0; color: var(--lv-ink); font-weight: 600; overflow-wrap: anywhere; }
.lv-quote {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-left: 3px solid var(--lv-gold-dark);
    background: #FAF7EC;
    color: var(--lv-ink);
    font-size: 14px;
    white-space: pre-line;
}
.lv-ok {
    margin: 0 0 16px;
    padding: 11px 14px;
    border-radius: var(--lv-radius-field);
    background: #E6F4EA;
    color: #1E5B32;
    font-size: 14px;
}
.lv-card input[type="file"] { padding: 10px; background: #fff; }

/* ADR 0052 : les mentions du cabinet sur les pages données au client (document, dépôt, signature). */
.lv-mentions { margin-top: 22px; padding-top: 12px; border-top: 1px solid rgba(0, 0, 0, .08); font-size: 11.5px; line-height: 1.5; color: #5B6475; }
.lv-mentions p { margin: 0 0 3px; }

/* L'envoi pour signature (ADR 0123) : la liste des documents du client. */
.lv-envoi { list-style: none; margin: 16px 0 8px; padding: 0; }
.lv-envoi li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--lv-line, #E5E7EB); }
.lv-envoi li:last-child { border-bottom: 1px solid var(--lv-line, #E5E7EB); }
.lv-envoi b { display: block; color: var(--lv-ink); }
.lv-envoi small { color: var(--lv-muted); }
.lv-envoi .lv-button { flex: none; width: auto; margin: 0; padding: 9px 16px; }
.lv-button.is-light { background: transparent; color: var(--lv-ink); border: 1px solid var(--lv-line, #D1D5DB); box-shadow: none; }
