/* ================================================================
   FICHIER : VirtMarket/css/shared.css
   DESCRIPTION : Variables + reset + toast + loader overlay
   VERSION : 1.0
   ================================================================ */

/* ============================================================ */
/* VARIABLES GLOBALES                                            */
/* ============================================================ */
:root {
    --blue: #156FE6;
    --blue-dark: #0F1B4D;
    --blue-light: #eaf1ff;
    --green: #22c55e;
    --red: #dc3545;
    --yellow: #f59e0b;

    --ink: #1a1a2e;
    --muted: #6b7280;
    --muted-light: #9ca3af;
    --border: #e6e8ef;
    --field-bg: #f8f9fc;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow-sm: 0 2px 12px rgba(15, 27, 77, 0.04);
    --shadow-md: 0 8px 30px rgba(15, 27, 77, 0.12);
    --shadow-lg: 0 20px 60px rgba(15, 27, 77, 0.25);
}

/* ============================================================ */
/* RESET                                                         */
/* ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background: #ffffff;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* ============================================================ */
/* TOAST                                                         */
/* ============================================================ */
.vl-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--blue-dark);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 90vw;
    pointer-events: none;
}

.vl-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.vl-toast.success { background: var(--green); }
.vl-toast.error   { background: var(--red); }
.vl-toast.info    { background: var(--blue); }
.vl-toast.warning { background: var(--yellow); }

.vl-toast i { font-size: 16px; }

/* ============================================================ */
/* LOADER OVERLAY — Carré central VirtMark                       */
/* ============================================================ */
.vl-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.vl-overlay.active {
    display: flex;
    pointer-events: auto;
}

.vl-loader-box {
    background: white;
    border-radius: 24px;
    padding: 32px 40px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    min-width: 220px;
    animation: vlFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes vlFadeIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.vl-logo-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vl-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid var(--border);
    border-top-color: var(--blue);
    border-right-color: var(--blue);
    animation: vlSpin 1s linear infinite;
}

@keyframes vlSpin {
    to { transform: rotate(360deg); }
}

.vl-v {
    position: relative;
    z-index: 2;
    font-size: 32px;
    font-weight: 900;
    color: var(--blue);
    font-family: 'Courier New', monospace;
    letter-spacing: -2px;
    animation: vlPulse 1.5s ease-in-out infinite;
}

@keyframes vlPulse {
    0%, 100% { transform: scale(1);    opacity: 1; }
    50%      { transform: scale(1.08); opacity: 0.85; }
}

.vl-loader-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--blue-dark);
    text-align: center;
}

.vl-loader-sub {
    font-size: 11px;
    color: var(--muted-light);
    margin-top: -12px;
    text-align: center;
}

.vl-dots {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: -4px;
}

.vl-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
    animation: vlDotBounce 1.4s ease-in-out infinite;
}

.vl-dots span:nth-child(2) { animation-delay: 0.2s; }
.vl-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes vlDotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40%           { transform: scale(1);   opacity: 1; }
}
/* ============================================================ */
/* INLINE ERROR (remplace les toasts)                            */
/* ============================================================ */
.vl-inline-error {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-left: 4px solid #dc3545;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    line-height: 1.5;
    animation: vlErrorIn 0.25s ease;
}

.vl-inline-error.show {
    display: flex;
}

.vl-inline-error i {
    color: #dc3545;
    font-size: 15px;
    flex-shrink: 0;
}

@keyframes vlErrorIn {
    from { transform: translateY(-8px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
