﻿:root {
    --fond: #090910;
    --violet: #9d00ff;
    --cyan: #00f0ff;
    --texte: #f5efff;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100svh;
    background: var(--fond);
    color: var(--texte);
    font-family: "Segoe UI", Arial, sans-serif;
    overflow-x: hidden;
}

/* Matrix personnalisé */

.matrix {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .75;
    pointer-events: none;
    z-index: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 45%, #8a2be226, transparent 55%),
        radial-gradient(ellipse at 90% 90%, #00f0ff0c, transparent 50%);
    pointer-events: none;
}

/* Structure principale */

.shell {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100svh;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.site-header {
    display: contents;
}

.wordmark {
    display: none;
}

.stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    order: 1;
    gap: 30px;
}

/* Identité NOVA MD */

.identity {
    display: flex;
    align-items: center;
    justify-content: center;
}

h1 {
    position: relative;
    z-index: 2;
    margin: 0;
    font-size: clamp(42px, 8vw, 85px);
    font-weight: 950;
    letter-spacing: .09em;
    text-shadow:
        3px 0 #9d00ff,
        0 0 35px #8a2be266;
    animation: titre-glitch 7s infinite;
}

.brand-accent {
    position: relative;
    color: var(--cyan);
    text-shadow: 0 0 25px #00f0ff66;
}

.glitch-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    color: var(--violet);
    animation: glitch 5s infinite;
}

@keyframes glitch {
    0%, 94%, 100% {
        opacity: 0;
        transform: translate(0);
    }

    95%, 97% {
        opacity: .8;
        transform: translate(4px, -3px);
        clip-path: inset(20% 0 45% 0);
    }
}

@keyframes titre-glitch {
    0%, 96%, 100% {
        transform: translateX(0);
    }

    97% {
        transform: translateX(-3px);
    }

    98% {
        transform: translateX(3px);
    }
}

/* Anneaux holographiques */

.hologram {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(680px, 95vw);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.orbit {
    position: absolute;
    border-radius: 50%;
}

.orbit-outer {
    inset: 0;
    border: 1px solid #9d00ff45;
    box-shadow:
        0 0 60px #9d00ff18,
        inset 0 0 60px #9d00ff18;
}

.orbit-markers {
    inset: 15px;
    border: 3px dashed #9d00ff55;
    animation: rotation 50s linear infinite;
}

.orbit-spectrum {
    inset: 40px;
    border: 2px solid transparent;
    border-left-color: var(--violet);
    border-right-color: var(--cyan);
    filter: drop-shadow(0 0 8px #9d00ff);
    animation: rotation 12s linear infinite;
}

.orbit-inner {
    inset: 70px;
    border: 1px dashed #00f0ff35;
    animation: rotation-inverse 30s linear infinite;
}

.orbit-core {
    inset: 100px;
    border: 1px solid #9d00ff25;
}

.orbit-axis {
    position: absolute;
    inset: 10%;
    border: 1px solid #00f0ff35;
    border-radius: 50%;
    transform: rotate(-35deg) scaleY(.45);
}

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

@keyframes rotation-inverse {
    to {
        transform: rotate(-360deg);
    }
}

/* Interface de connexion */

.login {
    position: relative;
    z-index: 2;
    width: min(100%, 425px);
    padding: 32px;
    background: linear-gradient(
        145deg,
        #9d00ff,
        #281536 25%,
        #11111b 50%,
        #00f0ff
    );
    clip-path: polygon(
        26px 0,
        100% 0,
        100% calc(100% - 26px),
        calc(100% - 26px) 100%,
        0 100%,
        0 26px
    );
}

.login::before {
    content: "";
    position: absolute;
    inset: 1px;
    background: #0c0c17;
    clip-path: inherit;
    z-index: -1;
}

.login h2 {
    margin: 0 0 24px;
    text-align: center;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: 1px;
}

.methods {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
}

.methods button {
    flex: 1;
    min-height: 48px;
    padding: 12px 8px;
    color: #a39ab7;
    background: #10101c;
    border: 1px solid #3d2458;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .25s;
}

.methods button:hover {
    color: white;
    border-color: var(--violet);
    background: #211234;
}

.methods button[aria-selected="true"] {
    color: var(--cyan);
    border-color: var(--cyan);
    background: #00f0ff09;
    box-shadow: inset 0 0 25px #00f0ff12;
}

button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

.method-panel {
    min-height: 210px;
    padding: 20px 8px;
    text-align: center;
    animation: apparition .35s ease;
}

.method-panel[hidden] {
    display: none !important;
}

.method-panel p {
    color: #a69ab9;
    font-size: 13px;
    margin: 25px 0 0;
}

@keyframes apparition {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scanner QR holographique */

.qr-slot {
    position: relative;
    width: 145px;
    height: 145px;
    margin: auto;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0 11px,
            #9d00ff20 11px 12px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0 11px,
            #9d00ff20 11px 12px
        );
}

.qr-slot::before,
.qr-slot::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.qr-slot::before {
    border: 2px solid var(--cyan);
    clip-path: polygon(
        0 0, 25% 0, 25% 2%, 2% 2%,
        2% 25%, 0 25%,
        0 75%, 2% 75%, 2% 98%,
        25% 98%, 25% 100%, 0 100%
    );
}

.qr-slot::after {
    border: 2px solid var(--violet);
    clip-path: polygon(
        75% 0, 100% 0, 100% 25%,
        98% 25%, 98% 2%, 75% 2%,
        75% 0, 100% 75%, 98% 75%,
        98% 98%, 75% 98%, 75% 100%,
        100% 100%, 100% 75%
    );
}

.scanner {
    position: absolute;
    left: 6px;
    right: 6px;
    top: 10%;
    height: 2px;
    background: var(--cyan);
    box-shadow:
        0 0 12px var(--cyan),
        0 0 25px var(--cyan);
    animation: scan 3s ease-in-out infinite alternate;
}

@keyframes scan {
    to {
        top: 90%;
    }
}

/* Emplacement du code temporaire */

.pair-slot {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    padding-top: 40px;
    margin: auto;
}

.pair-slot span {
    height: 42px;
    border: 1px solid #9d00ff55;
    background: #090910;
}

/* Compteur en dessous de la connexion */

.connection-count {
    order: 2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    padding: 15px 22px;
    background: #090910e8;
    border-top: 1px solid #00f0ff66;
    border-bottom: 1px solid #9d00ff66;
    font-family: monospace;
    font-size: 12px;
    letter-spacing: 1px;
    color: #b7adc9;
}

.connection-count output {
    color: var(--cyan);
    font-weight: bold;
    font-size: 23px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border: 1px solid var(--cyan);
    border-radius: 50%;
}

/* Signature */

.site-footer {
    position: relative;
    order: 3;
    margin-top: 30px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 6px;
    color: #c2a3ef;
}

/* Version téléphone */

@media (max-width: 600px) {
    .shell {
        padding: 35px 20px;
    }

    .stage {
        gap: 24px;
    }

    h1 {
        font-size: clamp(35px, 10vw, 55px);
    }

    .login {
        padding: 25px 18px;
    }

    .hologram {
        width: 115vw;
    }

    .connection-count {
        margin-top: 24px;
        padding: 12px;
        font-size: 11px;
    }

    .site-footer {
        margin-top: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

.connect-button {
    display: block;
    width: 100%;
    margin-top: 22px;
    padding: 15px;
    background: linear-gradient(110deg, #441083, #7616b6);
    border: 1px solid #9d00ff;
    color: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: .25s ease;
}

.connect-button:hover:not(:disabled) {
    border-color: #00f0ff;
    box-shadow: 0 0 25px #9d00ff66;
    transform: translateY(-2px);
}

.connect-button:disabled {
    opacity: .5;
    cursor: wait;
}

.real-qr {
    display: block;
    width: min(100%, 240px);
    height: auto;
    margin: auto;
    background: white;
    border: 5px solid white;
    box-shadow: 0 0 25px #9d00ff44;
}

[hidden] {
    display: none !important;
}

/* PAIRING DESIGN FINAL V1 */

#pair-panel .pair-input {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 20px 12px;
    background: #090910;
    border: 1px solid #7530ad;
    color: #00f0ff;
    font-family: monospace;
    font-size: 20px;
    text-align: center;
    letter-spacing: 2px;
    outline: none;
    transition: .3s ease;
}

#pair-panel .pair-input:focus {
    border-color: #00f0ff;
    box-shadow: 0 0 20px #00f0ff33;
}

#pair-panel .pair-input::placeholder {
    color: #625873;
}

#pair-panel .pair-consent {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 12px;
    background: #9d00ff08;
    border-left: 2px solid #9d00ff;
    text-align: left;
    font-size: 12px;
    line-height: 1.6;
    color: #b7adc9;
}

#pair-panel .pair-consent input {
    accent-color: #9d00ff;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

#pair-panel .pair-code {
    display: block;
    margin-top: 25px;
    padding: 25px 10px;
    background: #090910;
    border: 1px solid #00f0ff;
    color: #00f0ff;
    font-family: monospace;
    font-size: clamp(22px, 6vw, 36px);
    font-weight: 800;
    letter-spacing: 4px;
    text-shadow: 0 0 20px #00f0ff66;
}

[hidden] {
    display: none !important;
}


.channel-condition {
    margin: 16px 0 20px;
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
    color: #b7adc9;
}

.channel-condition a {
    color: #00f0ff;
    text-decoration: underline;
}


/* LOGO NOVA MD */
#nova-site-logo {
    display: block;
    width: clamp(115px, 28vw, 165px);
    height: clamp(115px, 28vw, 165px);
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    margin: 0 auto;
    flex-shrink: 0;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.45);
}
