/**
 * Styles PWA - Indicateurs de statut, bouton d'installation, etc.
 */

/* Indicateur de statut PWA */
.pwa-status {
	position: fixed;
	top: 1rem;
	right: 1rem;
	padding: 0.5rem 1rem;
	border-radius: 2px;
	font-size: 0.75rem;
	font-weight: 500;
	z-index: 1000;
	transition: all 0.3s ease;
	opacity: 0;
	transform: translateY(-10px);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border: 1px solid;
}

.pwa-status--online {
	background-color: #27ae60;
	color: white;
	border-color: #27ae60;
	opacity: 1;
	transform: translateY(0);
}

.pwa-status--offline {
	background-color: #e74c3c;
	color: white;
	border-color: #e74c3c;
	opacity: 1;
	transform: translateY(0);
}

.pwa-status--syncing {
	background-color: #f39c12;
	color: white;
	border-color: #f39c12;
	opacity: 1;
	transform: translateY(0);
	animation: pulse 2s infinite;
}

.pwa-status--synced {
	background-color: #27ae60;
	color: white;
	border-color: #27ae60;
	opacity: 1;
	transform: translateY(0);
}

.pwa-status--offline-save {
	background-color: #3498db;
	color: white;
	border-color: #3498db;
	opacity: 1;
	transform: translateY(0);
}

.pwa-status--cache-updated {
	background-color: #9b59b6;
	color: white;
	border-color: #9b59b6;
	opacity: 1;
	transform: translateY(0);
}

/* Bouton d'installation */
#install-btn {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	padding: 0.75rem 1.5rem;
	background: #f39c12;
	color: #1c2120;
	border: 1px solid #f39c12;
	border-radius: 2px;
	font-size: 0.75rem;
	font-weight: 500;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(243, 156, 18, 0.2);
	transition: all 0.2s ease;
	z-index: 1000;
	display: none;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

#install-btn:hover {
	background: #e67e22;
	border-color: #e67e22;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

#install-btn:active {
	transform: translateY(0);
}

/* Animation pulse pour la synchronisation */
@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

/* Indicateur de mise à jour disponible */
.update-available {
	position: fixed;
	bottom: 1rem;
	left: 1rem;
	padding: 0.5rem 1rem;
	background-color: #f59e0b;
	color: white;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	cursor: pointer;
	z-index: 1000;
	display: none;
}

.update-available:hover {
	background-color: #d97706;
}

/* Styles pour les notifications PWA */
.pwa-notification {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	border-radius: 0.75rem;
	padding: 1.5rem;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	z-index: 2000;
	max-width: 90vw;
	width: 400px;
	text-align: center;
}

.pwa-notification h3 {
	margin: 0 0 0.5rem 0;
	color: #1f2937;
	font-size: 1.125rem;
	font-weight: 600;
}

.pwa-notification p {
	margin: 0 0 1rem 0;
	color: #6b7280;
	font-size: 0.875rem;
	line-height: 1.5;
}

.pwa-notification .btn-group {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
}

.pwa-notification button {
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.pwa-notification .btn-primary {
	background-color: #3b82f6;
	color: white;
}

.pwa-notification .btn-primary:hover {
	background-color: #2563eb;
}

.pwa-notification .btn-secondary {
	background-color: #e5e7eb;
	color: #374151;
}

.pwa-notification .btn-secondary:hover {
	background-color: #d1d5db;
}

/* Overlay pour les notifications */
.pwa-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1999;
	display: none;
}

/* Responsive */
@media (max-width: 768px) {
	.pwa-status {
		top: 0.5rem;
		right: 0.5rem;
		font-size: 0.75rem;
		padding: 0.375rem 0.75rem;
	}
	
	#install-btn {
		bottom: 1rem;
		right: 1rem;
		padding: 0.625rem 1.25rem;
		font-size: 0.8125rem;
	}
	
	.pwa-notification {
		margin: 1rem;
		width: auto;
	}
} 