/* La page prend toute la hauteur */
html, body {
    height: 100%;
    overflow: hidden;
}

/* Barre de contrôle en haut */
.viewer-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: rgba(7, 12, 26, 0.92);
    border-bottom: 1px solid rgba(174, 208, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Logo / marque */
.viewer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #f4f8ff;
    flex-shrink: 0;
}

.viewer-brand img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.12);
}

.viewer-brand strong {
    font-size: 0.95rem;
}

/* Nom du document */
.viewer-title {
    flex: 1;
    font-size: 0.88rem;
    color: rgba(219, 228, 255, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Boutons de la barre */
.viewer-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.viewer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.viewer-btn:hover {
    transform: translateY(-1px);
}

.viewer-btn-back {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #f4f8ff;
}

.viewer-btn-back:hover {
    background: rgba(255,255,255,0.1);
    color: #f4f8ff;
}

.viewer-btn-download {
    background: linear-gradient(135deg, #dffaff 0%, #93dbff 42%, #9d7cff 100%);
    color: #07121d;
}

/* L'iframe prend tout l'espace sous la barre */
.viewer-frame {
    position: fixed;
    top: 62px; 
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100% - 62px);
    border: none;
    background: #050816;
}

/* Message si le PDF ne se charge pas */
.viewer-fallback {
    display: none;
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    background: #050816;
    color: rgba(219, 228, 255, 0.72);
    text-align: center;
    padding: 40px;
}

.viewer-fallback i {
    font-size: 3rem;
    color: rgba(109, 230, 255, 0.6);
}
