.pds-auth-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 16px;
    position: relative;
    overflow: hidden;
    min-height: 560px;
}
.pds-auth-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: relative;
    z-index: 2;
}
.pds-auth-card h1 { margin: 0 0 6px; font-size: 22px; text-align: center; }
.pds-auth-subtitle { color: #6b7280; font-size: 14px; margin: 0 0 20px; text-align: center; }

/* ── Illustration d'arrière-plan animée ("marché numérique") ─────────
   Purement décorative : pointer-events:none, z-index sous la carte,
   masquée sous 640px par prudence (aucun risque de débordement ou de
   clutter visuel sur petit écran). */
.pds-auth-bg { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }

.pds-auth-bg__orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.35; }
.pds-auth-bg__orb--1 {
    width: 340px; height: 340px; top: -80px; left: -100px;
    background: linear-gradient(135deg, var(--pds-blue, #1a44d4), var(--pds-violet, #6d28d9));
    animation: pds-auth-float-slow 14s ease-in-out infinite;
}
.pds-auth-bg__orb--2 {
    width: 300px; height: 300px; bottom: -100px; right: -80px;
    background: linear-gradient(135deg, var(--pds-gold, #f59e0b), var(--pds-violet, #6d28d9));
    animation: pds-auth-float-slow 18s ease-in-out infinite reverse;
}
.pds-auth-bg__orb--3 {
    width: 180px; height: 180px; top: 10%; right: 8%;
    background: linear-gradient(135deg, var(--pds-blue, #1a44d4), var(--pds-gold, #f59e0b));
    opacity: 0.25;
    animation: pds-auth-float 9s ease-in-out infinite;
}

.pds-auth-bg__card {
    position: absolute;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(26,68,212,0.12), rgba(109,40,217,0.12));
    border: 1.5px solid rgba(109,40,217,0.18);
    backdrop-filter: blur(2px);
}
.pds-auth-bg__card--1 { width: 84px; height: 60px; top: 14%; left: 7%; --pds-auth-rot: -10deg; animation: pds-auth-float 8s ease-in-out infinite; }
.pds-auth-bg__card--2 { width: 68px; height: 50px; bottom: 16%; left: 11%; --pds-auth-rot: 8deg; animation: pds-auth-float-slow 11s ease-in-out infinite; }
.pds-auth-bg__card--3 { width: 76px; height: 56px; top: 18%; right: 10%; --pds-auth-rot: 12deg; animation: pds-auth-float 10s ease-in-out infinite reverse; }

.pds-auth-bg__icon { position: absolute; }
.pds-auth-bg__icon--bag { width: 56px; height: 56px; bottom: 12%; right: 9%; animation: pds-auth-float-slow 12s ease-in-out infinite; }
.pds-auth-bg__icon--chip { width: 60px; height: 60px; top: 8%; left: 14%; opacity: 0.8; animation: pds-auth-spin-slow 40s linear infinite; }
.pds-auth-bg__icon--spark { width: 22px; height: 22px; top: 30%; left: 4%; animation: pds-auth-pulse 3.5s ease-in-out infinite; }
.pds-auth-bg__icon--spark2 { width: 16px; height: 16px; top: auto; left: auto; bottom: 30%; right: 5%; animation: pds-auth-pulse 4.5s ease-in-out infinite 1s; }

@keyframes pds-auth-float {
    0%, 100% { transform: translateY(0) rotate(var(--pds-auth-rot, 0deg)); }
    50% { transform: translateY(-16px) rotate(var(--pds-auth-rot, 0deg)); }
}
@keyframes pds-auth-float-slow {
    0%, 100% { transform: translateY(0) rotate(var(--pds-auth-rot, 0deg)); }
    50% { transform: translateY(14px) rotate(var(--pds-auth-rot, 0deg)); }
}
@keyframes pds-auth-spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes pds-auth-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

@media (max-width: 640px) {
    .pds-auth-bg { display: none; }
    .pds-auth-wrap { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .pds-auth-bg__orb, .pds-auth-bg__card, .pds-auth-bg__icon { animation: none; }
}

.pds-auth-brand {
    text-align: center;
    margin-bottom: 24px;
}
.pds-auth-brand img {
    max-height: 48px;
    max-width: 220px;
}
.pds-auth-brand span {
    font-size: 20px;
    font-weight: 700;
    color: #1a44d4;
}

.pds-auth-row { display: flex; gap: 12px; }
.pds-auth-row > .pds-auth-field { flex: 1; }

/* ── Champs — libellé flottant (100% CSS, technique éprouvée) ────────
   placeholder=" " (un espace, jamais vide) est indispensable : c'est ce
   qui permet à :not(:placeholder-shown) de détecter correctement qu'un
   champ contient du texte, y compris une valeur pré-remplie côté serveur
   (ex: email déjà connu sur l'écran de réinitialisation). */
.pds-auth-field { position: relative; margin-bottom: 16px; }

.pds-auth-field .pds-auth-input {
    width: 100%;
    padding: 22px 14px 8px;
    border: 1.5px solid #e2e4ee;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--pds-ink, #161b2e);
    background: #f9fafc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.pds-auth-field .pds-auth-input:focus {
    outline: none;
    border-color: var(--pds-violet, #6d28d9);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(109,40,217,0.10);
}

.pds-auth-field .pds-auth-label {
    position: absolute;
    left: 15px;
    top: 15px;
    font-size: 15px;
    font-weight: 500;
    color: #9ca3af;
    pointer-events: none;
    transform-origin: left top;
    transition: transform 0.15s ease, color 0.15s ease, top 0.15s ease;
    margin: 0;
}
/* Flotte au focus OU dès qu'une valeur est présente (y compris pré-remplie
   au chargement de la page — pas seulement après une saisie manuelle). */
.pds-auth-field .pds-auth-input:focus + .pds-auth-label,
.pds-auth-field .pds-auth-input:not(:placeholder-shown) + .pds-auth-label {
    top: 8px;
    transform: scale(0.74);
    color: var(--pds-violet, #6d28d9);
}
.pds-auth-field .pds-auth-input:focus + .pds-auth-label { color: var(--pds-violet, #6d28d9); }

/* Code de vérification : format visuel distinct (grand, centré, espacé) —
   libellé classique au-dessus plutôt que flottant, plus lisible ici. */
.pds-auth-label--static { display: block; font-size: 13px; font-weight: 600; color: #374151; margin: 14px 0 4px; }
.pds-auth-input--code {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #e2e4ee;
    border-radius: 12px;
    background: #f9fafc;
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: 700;
    font-family: inherit;
    color: var(--pds-ink, #161b2e);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.pds-auth-input--code:focus {
    outline: none;
    border-color: var(--pds-violet, #6d28d9);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(109,40,217,0.10);
}

.pds-auth-btn {
    width: 100%;
    margin-top: 8px;
    padding: 13px;
    background: var(--pds-gradient, linear-gradient(135deg, #1a44d4, #6d28d9));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(26,68,212,0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pds-auth-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(109,40,217,0.32); }

/* ── Bouton "Retour à la boutique" — le style visuel (doré) vient de
   .pds-btn-gold (pds-core, réutilisé aussi par d'autres modules) ; ici,
   uniquement le positionnement propre au contexte de cette page. ──────── */
.pds-auth-back-shop {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
}

/* Sous 640px : plus de position:absolute (risque de chevauchement avec
   la carte sur un wrap devenu très compact) — repositionné en flux
   normal, empilé au-dessus de la carte. */
@media (max-width: 640px) {
    .pds-auth-wrap { flex-direction: column; gap: 16px; }
    .pds-auth-back-shop { position: static; }
}

.pds-auth-links { margin-top: 20px; text-align: center; font-size: 13px; color: #6b7280; }
.pds-auth-links a { color: #1a44d4; text-decoration: none; margin: 0 4px; }

.pds-auth-resend-form { margin-top: 12px; text-align: center; }
.pds-auth-link-btn {
    background: none;
    border: none;
    color: #1a44d4;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.pds-auth-notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.pds-auth-notice--error { background: #f8d7da; color: #721c24; }
.pds-auth-notice--success { background: #d4edda; color: #155724; }
