/**
 * PrestaCraft Demo Manager - pages publiques autonomes (entrée, file d attente, erreur).
 * Palette reprise du logo : violet #7c4dff vers bleu #2f8fff sur fond nuit.
 */

:root {
    --dmgr-ink: #eef1f8;
    --dmgr-muted: #98a2bd;
    --dmgr-faint: #6b7590;
    --dmgr-violet: #7c4dff;
    --dmgr-blue: #2f8fff;
    --dmgr-bg: #080a14;
    --dmgr-line: rgba(255, 255, 255, 0.09);
    --dmgr-surface: rgba(255, 255, 255, 0.045);
    --dmgr-card: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
    --dmgr-card-shadow: 0 30px 70px rgba(3, 5, 14, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --dmgr-halo-1: rgba(124, 77, 255, 0.34);
    --dmgr-halo-2: rgba(47, 143, 255, 0.28);
    --dmgr-halo-3: rgba(124, 77, 255, 0.14);
}

* {
    box-sizing: border-box;
}

.dmgr-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    background: var(--dmgr-bg);
    background-image:
        radial-gradient(680px 420px at 12% -8%, var(--dmgr-halo-1), transparent 62%),
        radial-gradient(720px 460px at 108% 4%, var(--dmgr-halo-2), transparent 60%),
        radial-gradient(900px 620px at 50% 120%, var(--dmgr-halo-3), transparent 66%);
    color: var(--dmgr-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- carte */

.dmgr-gate {
    position: relative;
    width: 100%;
    max-width: 480px;
    padding: 40px 36px 30px;
    text-align: center;
    border: 1px solid var(--dmgr-line);
    border-radius: 22px;
    background: var(--dmgr-card);
    box-shadow: var(--dmgr-card-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
}

/* liseré dégradé en haut de la carte */
.dmgr-gate::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--dmgr-violet), var(--dmgr-blue), transparent);
}

.dmgr-logo {
    display: block;
    width: 190px;
    max-width: 62%;
    height: auto;
    margin: 0 auto 26px;
}

.dmgr-title {
    font-size: 23px;
    font-weight: 650;
    letter-spacing: -0.025em;
    margin: 0 0 10px;
}

.dmgr-subtitle {
    display: inline-block;
    margin: 0 0 26px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--dmgr-line);
    background: var(--dmgr-surface);
    font-size: 13px;
    font-weight: 600;
    color: #cdd5e8;
}

/* ------------------------------------------------------------- boutons */

.dmgr-button {
    display: inline-block;
    padding: 14px 30px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--dmgr-violet), var(--dmgr-blue));
    color: #fff;
    font-size: 15px;
    font-weight: 650;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(80, 90, 255, 0.34);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.dmgr-button:hover {
    filter: brightness(1.07);
    box-shadow: 0 16px 34px rgba(80, 90, 255, 0.42);
}

.dmgr-button:active {
    transform: scale(0.985);
}

.dmgr-button[disabled] {
    opacity: 0.55;
    cursor: default;
}

/* ------------------------------------------------------------ spinner */

.dmgr-spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, var(--dmgr-violet) 140deg, var(--dmgr-blue) 300deg, transparent 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
    animation: dmgr-spin 1s linear infinite;
}

@keyframes dmgr-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .dmgr-spinner { animation-duration: 3s; }
    .dmgr-button { transition: none; }
}

/* --------------------------------------------------------- textes bas */

.dmgr-hint {
    font-size: 13px;
    color: var(--dmgr-muted);
    margin: 20px 0 0;
    line-height: 1.5;
}

.dmgr-footer {
    margin: 26px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--dmgr-line);
    font-size: 12px;
    color: var(--dmgr-faint);
}

.dmgr-footer a,
.dmgr-leave {
    color: var(--dmgr-muted);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.dmgr-footer a:hover,
.dmgr-leave:hover {
    color: var(--dmgr-ink);
}

/* ------------------------------------------------------ file d attente */

.dmgr-queue {
    max-width: 540px;
}

.dmgr-flash {
    min-height: 18px;
    font-size: 13px;
    color: #ffc46b;
    margin: 0 0 16px;
}

.dmgr-queue-box {
    padding: 26px 22px 22px;
    border: 1px solid var(--dmgr-line);
    border-radius: 16px;
    background: var(--dmgr-surface);
}

.dmgr-queue-number {
    display: block;
    font-size: 58px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #b79bff, #67b2ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dmgr-queue-caption {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--dmgr-faint);
    margin-top: 10px;
}

.dmgr-queue-wait {
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--dmgr-line);
    font-size: 14px;
    color: #c3cbe0;
}

.dmgr-queue-wait strong {
    color: var(--dmgr-ink);
}

/* ------------------------------------------------------- champ e-mail */

.dmgr-notify {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--dmgr-line);
    text-align: left;
}

.dmgr-notify-label {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
    text-align: center;
}

.dmgr-notify-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dmgr-notify-row input {
    flex: 1 1 210px;
    min-width: 0;
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid var(--dmgr-line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--dmgr-ink);
    font-size: 14px;
    font-family: inherit;
}

.dmgr-notify-row input::placeholder {
    color: var(--dmgr-faint);
}

.dmgr-notify-row input:focus {
    outline: none;
    border-color: rgba(124, 77, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.16);
}

.dmgr-notify-row .dmgr-button {
    padding: 13px 20px;
    font-size: 14px;
}

.dmgr-notify-help {
    font-size: 12px;
    color: var(--dmgr-faint);
    margin: 12px 0 0;
    text-align: center;
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 520px) {
    .dmgr-gate { padding: 32px 22px 24px; border-radius: 18px; }
    .dmgr-title { font-size: 20px; }
    .dmgr-queue-number { font-size: 48px; }
    .dmgr-notify-row .dmgr-button { flex: 1 1 100%; }
}


/* ------------------------------------------------------------------ clair
   Socle clair : seules les surfaces changent, les couleurs d accent restent
   celles choisies dans la configuration. */

.dmgr-scheme-light {
    --dmgr-ink: #1b2333;
    --dmgr-muted: #5b6579;
    --dmgr-faint: #8a93a6;
    --dmgr-bg: #f4f6fb;
    --dmgr-line: rgba(20, 25, 40, 0.09);
    --dmgr-surface: rgba(20, 25, 40, 0.035);
    --dmgr-card: #ffffff;
    --dmgr-card-shadow: 0 24px 60px rgba(20, 25, 40, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --dmgr-halo-1: rgba(124, 77, 255, 0.16);
    --dmgr-halo-2: rgba(47, 143, 255, 0.14);
    --dmgr-halo-3: rgba(124, 77, 255, 0.08);
}

.dmgr-scheme-light .dmgr-notify-row input {
    background: rgba(20, 25, 40, 0.03);
}

.dmgr-scheme-light .dmgr-banner-timer,
.dmgr-scheme-light .dmgr-queue-box {
    background: rgba(20, 25, 40, 0.035);
}
