Files
projet_gestion_commande/frontend-prep/src/components/TomTomMap.css
T
2026-01-24 21:33:29 +01:00

514 lines
9.5 KiB
CSS

.tomtom-map-container {
position: relative;
width: 100%;
height: 400px;
border-radius: 16px;
overflow: hidden;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.tomtom-map-container.navigating {
height: 500px;
}
.tomtom-map {
width: 100%;
height: 100%;
}
/* Marqueur du livreur */
.driver-marker {
cursor: pointer;
}
.driver-marker-inner {
display: flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
border-radius: 50%;
border: 3px solid white;
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
color: white;
animation: pulse-driver 2s infinite;
}
.driver-marker.navigation-mode .driver-marker-inner {
width: 50px;
height: 50px;
background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
}
.driver-arrow {
width: 0;
height: 0;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
border-bottom: 24px solid white;
}
@keyframes pulse-driver {
0% {
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
}
70% {
box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
}
}
/* Marqueur de destination */
.destination-marker {
cursor: pointer;
}
.destination-marker-inner {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
border-radius: 50% 50% 50% 0;
border: 3px solid white;
box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
color: white;
transform: rotate(-45deg);
}
.destination-marker-inner svg {
transform: rotate(45deg);
}
/* Panneau de navigation */
.navigation-panel {
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 10;
background: linear-gradient(
180deg,
rgba(26, 26, 46, 0.98) 0%,
rgba(26, 26, 46, 0.95) 100%
);
backdrop-filter: blur(10px);
border-bottom: 2px solid #10b981;
}
.current-instruction {
display: flex;
align-items: center;
padding: 1rem 1.25rem;
gap: 1rem;
}
.instruction-maneuver {
font-size: 2.5rem;
min-width: 60px;
text-align: center;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
.instruction-details {
flex: 1;
}
.instruction-text {
font-size: 1.1rem;
font-weight: 600;
color: white;
line-height: 1.3;
}
.instruction-street {
font-size: 0.9rem;
color: #10b981;
margin-top: 0.25rem;
font-weight: 500;
}
.instruction-distance {
font-size: 1.5rem;
font-weight: 700;
color: #10b981;
min-width: 80px;
text-align: right;
}
.next-instruction {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 1.25rem;
background: rgba(255, 255, 255, 0.05);
border-top: 1px solid rgba(255, 255, 255, 0.1);
font-size: 0.85rem;
color: #9ca3af;
}
.next-label {
color: #6b7280;
font-weight: 500;
}
.next-maneuver {
font-size: 1.25rem;
}
.next-text {
flex: 1;
}
/* Bouton recentrer */
.recenter-btn {
position: absolute;
bottom: 80px;
right: 16px;
width: 44px;
height: 44px;
border-radius: 50%;
background: rgba(26, 26, 46, 0.95);
border: 1px solid rgba(255, 255, 255, 0.2);
color: white;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 5;
transition: all 0.2s ease;
}
.recenter-btn:hover {
background: #10b981;
transform: scale(1.1);
}
/* Chargement */
.tomtom-map-loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 20;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
background: rgba(26, 26, 46, 0.95);
padding: 1.5rem 2rem;
border-radius: 12px;
color: white;
}
.loading-spinner {
width: 32px;
height: 32px;
border: 3px solid rgba(255, 255, 255, 0.2);
border-top-color: #10b981;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Informations de route */
.tomtom-route-info {
position: absolute;
bottom: 16px;
left: 16px;
right: 16px;
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
background: rgba(26, 26, 46, 0.95);
backdrop-filter: blur(10px);
padding: 1rem 1.5rem;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
z-index: 5;
}
.route-info-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
}
.route-info-label {
font-size: 0.75rem;
color: #9ca3af;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.route-info-value {
font-size: 1.25rem;
font-weight: 700;
color: #10b981;
}
.route-info-divider {
width: 1px;
height: 40px;
background: rgba(255, 255, 255, 0.2);
}
/* Bouton afficher instructions */
.show-instructions-btn {
padding: 0.5rem 1rem;
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
border: none;
border-radius: 8px;
color: white;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}
.show-instructions-btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
/* Liste des instructions */
.instructions-list {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 70px;
background: rgba(26, 26, 46, 0.98);
z-index: 15;
display: flex;
flex-direction: column;
border-radius: 16px 16px 0 0;
}
.instructions-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 1.25rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.instructions-header h4 {
margin: 0;
color: white;
font-size: 1rem;
}
.close-instructions-btn {
width: 36px;
height: 36px;
border-radius: 50%;
background: rgba(239, 68, 68, 0.2);
border: 1px solid rgba(239, 68, 68, 0.3);
color: #ef4444;
font-size: 1rem;
cursor: pointer;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: center;
}
.close-instructions-btn:hover {
background: rgba(239, 68, 68, 0.3);
transform: scale(1.1);
}
.instructions-scroll {
flex: 1;
overflow-y: auto;
padding: 0.5rem 0;
}
.instruction-item {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem 1.25rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
transition: background 0.2s;
}
.instruction-item.active {
background: rgba(16, 185, 129, 0.15);
border-left: 3px solid #10b981;
}
.instruction-item.passed {
opacity: 0.5;
}
.item-maneuver {
font-size: 1.5rem;
min-width: 40px;
text-align: center;
}
.item-details {
flex: 1;
}
.item-text {
color: white;
font-size: 0.95rem;
display: block;
}
.item-street {
color: #10b981;
font-size: 0.8rem;
display: block;
margin-top: 0.25rem;
}
.item-distance {
color: #9ca3af;
font-size: 0.85rem;
min-width: 60px;
text-align: right;
}
/* Erreur */
.tomtom-map-error {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
padding: 2rem;
text-align: center;
color: white;
}
.tomtom-map-error .error-icon {
color: #f59e0b;
margin-bottom: 1rem;
}
.tomtom-map-error h3 {
font-size: 1.25rem;
margin-bottom: 0.5rem;
color: #f59e0b;
}
.tomtom-map-error p {
color: #9ca3af;
margin-bottom: 1rem;
}
.tomtom-map-error ol {
text-align: left;
color: #9ca3af;
font-size: 0.9rem;
line-height: 1.8;
}
.tomtom-map-error a {
color: #3b82f6;
text-decoration: underline;
}
.tomtom-map-error code {
background: rgba(59, 130, 246, 0.2);
padding: 0.125rem 0.375rem;
border-radius: 4px;
font-family: monospace;
color: #60a5fa;
}
/* Toast d'erreur */
.tomtom-map-error-toast {
position: absolute;
top: 16px;
left: 50%;
transform: translateX(-50%);
background: rgba(239, 68, 68, 0.95);
color: white;
padding: 0.75rem 1.5rem;
border-radius: 8px;
font-size: 0.875rem;
font-weight: 500;
z-index: 20;
animation: slideDown 0.3s ease;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translate(-50%, -20px);
}
to {
opacity: 1;
transform: translate(-50%, 0);
}
}
/* Responsive */
@media (max-width: 640px) {
.tomtom-map-container {
height: 350px;
border-radius: 12px;
}
.tomtom-map-container.navigating {
height: 450px;
}
.current-instruction {
padding: 0.75rem 1rem;
}
.instruction-maneuver {
font-size: 2rem;
min-width: 50px;
}
.instruction-text {
font-size: 1rem;
}
.instruction-distance {
font-size: 1.25rem;
min-width: 60px;
}
.tomtom-route-info {
flex-wrap: wrap;
padding: 0.75rem 1rem;
gap: 0.5rem;
}
.route-info-value {
font-size: 1rem;
}
.route-info-divider {
height: 30px;
}
.recenter-btn {
bottom: 75px;
width: 40px;
height: 40px;
}
}