/* ================================================================
   FICHIER : VirtMarket/css/login.css
   DESCRIPTION : Styles page login client (VirtMark)
   VERSION : 1.0
   ================================================================ */

/* ═══════════════════════════════════════════════════════════════ */
/* BASE — plein écran                                              */
/* ═══════════════════════════════════════════════════════════════ */
html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    background: var(--blue);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════ */
/* ZONE BLEUE (header)                                             */
/* ═══════════════════════════════════════════════════════════════ */
.header {
    flex: 0 0 auto;
    padding: 60px 24px 40px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    min-height: 38vh;
    display: flex;
    align-items: flex-end;
}

.header h1 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    max-width: 320px;
    position: relative;
    z-index: 2;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════ */
/* MOTIFS E-COMMERCE                                               */
/* ═══════════════════════════════════════════════════════════════ */
.shapes {
    position: absolute;
    right: -20px;
    top: 20px;
    width: 220px;
    height: 220px;
    z-index: 1;
    opacity: 0.95;
    pointer-events: none;
}

.shape-bag {
    position: absolute;
    right: 30px;
    top: 20px;
    font-size: 90px;
    color: rgba(255, 255, 255, 0.28);
    transform: rotate(-8deg);
}

.shape-store-sm {
    position: absolute;
    right: 100px;
    top: 115px;
    font-size: 40px;
    color: rgba(255, 255, 255, 0.2);
    transform: rotate(12deg);
}

.shape-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.18);
}
.shape-circle.c1 { width: 40px; height: 40px; right: 130px; top: 40px; }
.shape-circle.c2 { width: 70px; height: 70px; right: 115px; top: 25px; border-color: rgba(255,255,255,0.12); }
.shape-circle.c3 { width: 110px; height: 110px; right: 95px; top: 5px; border-color: rgba(255,255,255,0.08); }

.shape-dot {
    position: absolute;
    right: 45px;
    top: 140px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.shape-cart {
    position: absolute;
    right: 170px;
    top: 130px;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════ */
/* SLIDE BLANC                                                     */
/* ═══════════════════════════════════════════════════════════════ */
.form-card {
    flex: 1 1 auto;
    background: #ffffff;
    border-radius: 32px 32px 0 0;
    padding: 32px 24px 40px;
    margin-top: -24px;
    position: relative;
    z-index: 3;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.form-card h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 24px;
    margin-top: 0;
}

/* ═══════════════════════════════════════════════════════════════ */
/* FORM                                                            */
/* ═══════════════════════════════════════════════════════════════ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-light);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 42px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    background: var(--field-bg);
    color: var(--ink);
    font-family: inherit;
}

.input-wrapper input::placeholder { color: #b0b0b0; }

.input-wrapper input:focus {
    border-color: var(--blue);
    background: #ffffff;
}

.input-wrapper:focus-within .input-icon { color: var(--blue); }

.input-wrapper input.error { border-color: var(--red); }
.input-wrapper input.error ~ .input-icon { color: var(--red); }

/* ═══════════════════════════════════════════════════════════════ */
/* LIEN MOT DE PASSE OUBLIÉ                                        */
/* ═══════════════════════════════════════════════════════════════ */
.forgot-link {
    text-align: right;
    margin: -4px 0 6px 0;
}

.forgot-link a {
    font-size: 13px;
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

.forgot-link a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════ */
/* BOUTON PRINCIPAL                                                */
/* ═══════════════════════════════════════════════════════════════ */
.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--blue);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s, transform 0.15s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) { background: var(--blue-dark); }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════ */
/* DIVIDER                                                         */
/* ═══════════════════════════════════════════════════════════════ */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0 18px;
    color: var(--muted-light);
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider span { padding: 0 14px; }

/* ═══════════════════════════════════════════════════════════════ */
/* BOUTONS SECONDAIRES                                             */
/* ═══════════════════════════════════════════════════════════════ */
.alt-actions {
    display: flex;
    gap: 10px;
}

.btn-alt {
    flex: 1;
    padding: 13px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    font-family: inherit;
    color: var(--ink);
    min-width: 0;
    white-space: nowrap;
}

.btn-alt:hover {
    background: #f7f7f7;
    border-color: #d0d0d0;
}

.btn-alt:active { transform: scale(0.98); }

.btn-alt .fa-google { color: #4285F4; font-size: 15px; }
.btn-alt .fa-user   { color: var(--blue); font-size: 15px; }

/* ═══════════════════════════════════════════════════════════════ */
/* LIEN BAS DE PAGE                                                */
/* ═══════════════════════════════════════════════════════════════ */
.bottom-link {
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: var(--muted);
}

.bottom-link a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 700;
}

.bottom-link a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════ */
/* RESPONSIVE                                                      */
/* ═══════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
    .header { padding: 48px 20px 30px; min-height: 34vh; }
    .header h1 { font-size: 22px; }
    .form-card { padding: 28px 20px 32px; }
    .form-card h2 { font-size: 22px; }
    .btn-alt { font-size: 12px; padding: 12px 8px; }
}

@media (min-width: 640px) {
    body { align-items: center; padding: 0; }
    .header {
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
    }
    .form-card {
        width: 100%;
        max-width: 480px;
        margin: -24px auto 0;
    }
}
/* Bouton toggle mot de passe */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 15px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 2;
}

.toggle-password:hover {
    color: #156FE6;
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.92);
}

/* Il faut aussi passer l'input en position:relative */
.input-wrapper {
    position: relative;
}
