/* ============================================
   ÉCRANS PWA (verrouillage / activation / bloqué) - SIGOA
   Même palette que login-militaire.css pour rester cohérent visuellement.

   Mise en page élastique : ces écrans (gate/activation/blocked) ne doivent
   jamais provoquer de défilement, ni vertical ni horizontal, quelle que
   soit la taille de l'écran (desktop comme mobile, y compris en paysage
   sur un petit téléphone). La carte est verrouillée à la hauteur du
   viewport et toutes ses dimensions internes (logo, textes, espacements)
   utilisent clamp() pour se réduire proportionnellement plutôt que de
   déborder.
   ============================================ */

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.pwa-gate-body {
    height: 100vh;
    width: 100vw;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at 50% 0%, #0B3D91 0%, #071C35 55%, #050f1e 100%);
    color: #FFFFFF;
    padding: clamp(10px, 4vh, 24px) clamp(10px, 5vw, 24px);
    box-sizing: border-box;
    overflow: hidden;
}

.pwa-gate-card {
    width: 100%;
    max-width: 480px;
    max-height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: clamp(14px, 2.5vh, 20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    padding: clamp(16px, 4vh, 40px) clamp(16px, 4vw, 32px);
    text-align: center;
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pwa-gate-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: clamp(10px, 2.5vh, 24px);
    flex: 0 0 auto;
}

.pwa-gate-logos img {
    height: clamp(36px, 7vh, 64px);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.pwa-gate-logo-text {
    font-size: clamp(1.8rem, 6vh, 2.6rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #FFFFFF;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.pwa-gate-title {
    font-size: clamp(1.1rem, 2.6vh, 1.4rem);
    font-weight: 700;
    margin: 0 0 8px;
    color: #FFFFFF;
    flex: 0 0 auto;
}

.pwa-gate-subtitle {
    font-size: clamp(0.82rem, 1.8vh, 0.95rem);
    color: #94A3B8;
    margin: 0 0 clamp(10px, 2.5vh, 24px);
    flex: 0 0 auto;
}

.pwa-gate-message {
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 12px;
    padding: clamp(10px, 2vh, 16px) clamp(12px, 2vw, 18px);
    font-size: clamp(0.78rem, 1.7vh, 0.9rem);
    color: #CBD5E1;
    line-height: 1.5;
    margin-bottom: clamp(12px, 3vh, 28px);
    text-align: left;
    flex: 0 1 auto;
    overflow: hidden;
}

.pwa-gate-message strong {
    color: #FFFFFF;
}

.pwa-gate-actions {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.5vh, 12px);
    flex: 0 0 auto;
}

.pwa-gate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: clamp(10px, 1.8vh, 13px) 20px;
    border-radius: 12px;
    font-size: clamp(0.85rem, 1.8vh, 0.95rem);
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.pwa-gate-btn:hover {
    transform: translateY(-1px);
}

.pwa-gate-btn-primary {
    background: linear-gradient(135deg, #1E5EFF, #00D4FF);
    color: #071C35;
    box-shadow: 0 6px 18px rgba(0, 212, 255, 0.25);
}

.pwa-gate-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.pwa-gate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pwa-gate-ios-note {
    display: none;
    align-items: center;
    justify-content: center;
    margin: clamp(10px, 2vh, 18px) auto 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #CBD5E1;
    font-size: 1.1rem;
    flex: 0 0 auto;
}

.pwa-gate-ios-note.active {
    display: flex;
}

/* ============================================
   Variante minimale (license_gate) : logo, champ de saisie, boutons icône seule
   ============================================ */
.pwa-gate-card-minimal {
    padding: clamp(16px, 4vh, 40px) clamp(16px, 4vw, 32px);
}

.pwa-gate-card-minimal .pwa-gate-logos {
    margin-bottom: clamp(12px, 3vh, 32px);
}

.pwa-gate-minimal-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.pwa-gate-minimal-form .pwa-activation-input {
    margin-bottom: 0;
}

.pwa-gate-actions-minimal {
    flex-direction: row;
    justify-content: center;
}

.pwa-gate-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: clamp(42px, 8vh, 52px);
    height: clamp(42px, 8vh, 52px);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.15rem;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.pwa-gate-icon-btn:hover {
    transform: translateY(-1px);
}

.pwa-gate-icon-btn-primary {
    background: linear-gradient(135deg, #1E5EFF, #00D4FF);
    color: #071C35;
    box-shadow: 0 6px 18px rgba(0, 212, 255, 0.25);
}

.pwa-gate-icon-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.pwa-gate-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pwa-gate-icon-error {
    display: none;
    align-items: center;
    justify-content: center;
    margin: 16px auto 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #FCA5A5;
    font-size: 1rem;
}

/* Formulaire d'activation */
.pwa-activation-input {
    width: 100%;
    padding: clamp(10px, 1.8vh, 14px) 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
    font-size: clamp(0.95rem, 2vh, 1.1rem);
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: clamp(10px, 2vh, 16px);
}

.pwa-activation-input::placeholder {
    color: #64748B;
    letter-spacing: normal;
    text-transform: none;
}

.pwa-activation-input:focus {
    outline: none;
    border-color: #00D4FF;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.pwa-activation-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #FCA5A5;
    border-radius: 10px;
    padding: clamp(8px, 1.6vh, 12px) 14px;
    font-size: clamp(0.75rem, 1.6vh, 0.85rem);
    margin-bottom: clamp(10px, 2vh, 16px);
    text-align: left;
    flex: 0 0 auto;
}

.pwa-gate-footer {
    margin-top: clamp(14px, 3vh, 28px);
    font-size: clamp(0.68rem, 1.4vh, 0.75rem);
    color: #64748B;
    flex: 0 0 auto;
}
