:root {
    --rose: #ff5fa2;
    --rose-clair: #ff9ccb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: #e8ecf4;
    background: #0b0f19;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}


body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background: url("https://jduranleau.techinfo-cstj.ca/iot/logo.jpg") center / cover no-repeat;
    opacity: 0.25;
}


body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(11, 15, 25, 0.7);
    pointer-events: none;
}


#logo {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    z-index: 5;
}


#ecranNoir {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    z-index: 10;
}


#formulaireConnexion,
#doubleAuthentification,
#processusHydra,
#reussite {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 36px 32px;
    background: rgba(15, 20, 32, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--rose);
    border-radius: 12px;
}

h1 {
    font-size: 1.7rem;
    text-align: center;
    margin-bottom: 20px;
}

h3 {
    text-align: center;
}

p { font-size: 0.95rem; color: #b6bfd3; }


#messageConnexion,
#messageDoubleAuthentification {
    min-height: 1.4em;
    margin-bottom: 14px;
    text-align: center;
    font-weight: 600;
}


#formulaireConnexion p:not(#messageConnexion) {
    margin: 14px 0 6px;
    font-weight: 500;
}


#processusHydra p {
    text-align: center;
    margin-bottom: 20px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--rose);
}

#btnConnexion,
#btnEnvoyer {
    width: 100%;
    margin-top: 24px;
    padding: 13px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--rose);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#btnConnexion:hover, #btnEnvoyer:hover { background: var(--rose-clair); }


#doubleAuthentification {
    max-width: 820px;
}

#doubleAuthentification h1 {
    font-size: 2rem;
}

#doubleAuthentification p:not(#messageDoubleAuthentification) {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

#messageDoubleAuthentification {
    font-size: 1.1rem;
}

.choix {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    cursor: pointer;
}

.option:hover {
    border-color: var(--rose);
    background: rgba(255, 95, 162, 0.1);
}

.option label {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

.option input[type="image"] {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
}

@media (max-width: 560px) {
    .choix { grid-template-columns: 1fr; }
}


#cameras {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1300px;
    padding: 24px 0;
}

.grille-cameras {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 48px;
}

.grille-cameras img,
.grille-cameras iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid rgba(255, 95, 162, 0.3);
    border-radius: 10px;
    background: #000;
}