/**
 * Styles pour la modale Google Drive
 */

/* Modale - Fond obscur */
#googleDriveOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#googleDriveOverlay.active {
    opacity: 1;
    visibility: visible;
}

/* Conteneur principal de la modale */
#googleDriveModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}

#googleDriveModal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#googleDriveModal.active #googleDriveModalContent {
    transform: scale(1);
    opacity: 1;
}

/* Contenu de la modale */
#googleDriveModalContent {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

/* Header de la modale */
#googleDriveHeader {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

#googleDriveHeader h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
    font-weight: 600;
}

/* Bouton pour fermer */
#closeGoogleDriveModal {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

#closeGoogleDriveModal:hover {
    color: #333;
}

/* Section authentification */
#googleAuthSection {
    padding: 40px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#googleAuthSection h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

#googleAuthSection p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Bouton d'authentification Google */
.g_id_signin {
    margin: 20px auto !important;
    display: flex !important;
    justify-content: center !important;
}

/* Section Google Drive */
#googleDriveSection {
    display: none;
    flex: 1;
    overflow: hidden;
    position: relative;
}

#googleUserInfo {
    padding: 15px 20px;
    background: #e8f4f8;
    color: #1976d2;
    font-size: 14px;
    border-bottom: 1px solid #b3e5fc;
}

#googleDriveContainer {
    flex: 1;
    overflow: hidden;
    position: relative;
}

#googleDriveContainer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Message d'erreur */
#googleAuthError {
    display: none;
    padding: 20px;
    margin-bottom: 20px;
}

#googleAuthError .alert {
    margin: 0;
}

/* Bouton de déconnexion */
#googleSignOutBtn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

#googleSignOutBtn:hover {
    background-color: #c82333;
}

/* Mode responsive */
@media (max-width: 768px) {
    #googleDriveModalContent {
        max-width: 100%;
        height: 95vh;
    }

    #googleDriveHeader {
        padding: 15px;
    }

    #googleDriveHeader h2 {
        font-size: 18px;
    }

    #googleAuthSection {
        padding: 20px;
    }

    #googleAuthSection h3 {
        font-size: 18px;
    }

    #googleAuthSection p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #googleDriveModal {
        padding: 10px;
    }

    #googleDriveModalContent {
        border-radius: 4px;
    }

    #googleDriveHeader {
        padding: 10px;
        flex-wrap: wrap;
    }

    #googleDriveHeader h2 {
        font-size: 16px;
        flex: 1;
    }

    #googleAuthSection {
        padding: 15px;
    }
}
