/* Reset, base html/body, touch-action, color-scheme, Oswald :
   fournis par css/app-shell.css, chargé avant ce fichier. */

body {
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(ellipse 900px 500px at 50% -10%, rgba(47, 138, 255, 0.06), transparent 60%),
        repeating-linear-gradient(110deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 46px, transparent 46px, transparent 92px),
        #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #0f1b3d;
    padding: max(20px, env(safe-area-inset-top, 0px)) clamp(16px, 4vw, 24px)
             max(20px, env(safe-area-inset-bottom, 0px));
}

img { max-width: 100%; height: auto; }

/* ── BOX ── */
.register-box {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    padding: clamp(28px, 6vw, 40px);
    border-radius: 6px;
    border: 1px solid #2f8aff;
    border-top: 2px solid #2f8aff;
    text-align: center;
}

.register-box img {
    display: block;
    width: 70px;
    margin: 0 auto;
    border: 1.5px solid rgba(47, 138, 255, 0.45);
    border-radius: 8px;
    background: #f5f6f8;
    padding: 4px;
}

h1 {
    color: #2f8aff;
    margin: 20px 0 8px;
    font-family: 'Oswald', Arial, Helvetica, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: clamp(20px, 5vw, 24px);
}

.register-box p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

/* ── INPUTS ── */
input {
    width: 100%;
    /* font-size 16px empêche le zoom automatique sur iOS */
    font-size: 16px;
    padding: 15px;
    margin: 10px 0;
    min-height: 48px;
    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #0f1b3d;
    outline: none;
    transition: box-shadow 0.2s, border-color 0.2s;
}

input:focus {
    border-color: rgba(47, 138, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(47, 138, 255, 0.12);
}

input::placeholder {
    color: #9ca3af;
}

/* ── BUTTON ── */
button {
    width: 100%;
    /* min-height 48px = taille minimale recommandée pour les zones tactiles */
    min-height: 48px;
    padding: 15px;
    margin-top: 8px;
    background: #2f8aff;
    border: none;
    border-radius: 6px;
    font-family: 'Oswald', Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: opacity 0.2s;
}

button:hover    { opacity: 0.92; box-shadow: 0 8px 24px rgba(47, 138, 255, 0.2); }
button:active   { opacity: 0.85; }
button:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

/* ── LINK ── */
a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 12px;
    color: #2f8aff;
    text-decoration: none;
    font-size: 14px;
}

a:hover { text-decoration: underline; }

/* ── LEGAL LINKS ──
   Small inline disclaimer under the form — must not inherit the
   big button-like `a` sizing above. */
.legal-links {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

.legal-links a {
    display: inline;
    min-height: 0;
    margin-top: 0;
    font-size: 12px;
}

/* ── MESSAGE ──
   Ciblé aussi par #message car le HTML n'a pas class="message"
   (JS écrit la couleur en inline, cette règle gère juste l'espacement). */
.message,
#message {
    margin-top: 14px;
    font-size: 13px;
    min-height: 18px;
}

.message.error { color: #dc2626; }
.message.success { color: #15803d; }


/* ══════════════════════════════════════
   TABLETTE (640px – 1024px)
══════════════════════════════════════ */
@media (max-width: 1024px) and (min-width: 640px) {
    .register-box {
        max-width: 440px;
        padding: 36px;
    }
}


/* ══════════════════════════════════════
   TÉLÉPHONE (< 640px)
   Plein écran natif, pas de carte
   flottante — comme une vraie appli.
══════════════════════════════════════ */
@media (max-width: 639px) {
    body {
        padding: 0;
        align-items: stretch;
    }

    .register-box {
        max-width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: max(40px, env(safe-area-inset-top, 0px) + 24px)
                 24px
                 max(32px, env(safe-area-inset-bottom, 0px) + 20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

