Files
projet_gestion_commande/frontend-prep/src/pages/User/OrderDetails.css
T

832 lines
15 KiB
CSS

/* ============================================
OrderDetails.css - STYLES DÉTAILS COMMANDE
============================================ */
.order-details-container {
width: 100%;
min-height: 100vh;
padding: clamp(1rem, 3vw, 2rem);
padding-top: calc(60px + clamp(1rem, 3vw, 2rem));
max-width: 1400px;
margin: 0 auto;
background: linear-gradient(to bottom, #0a0a0a, #1a1a1a);
}
/* ============================================
LOADING & ERROR
============================================ */
.loading-container,
.error-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 60vh;
gap: 1.5rem;
}
.loading-spinner {
width: 60px;
height: 60px;
}
.spinner {
width: 100%;
height: 100%;
border: 4px solid #1a1a1a;
border-top-color: #7c3aed;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.loading-text {
color: #9ca3af;
font-size: 1.1rem;
margin: 0;
}
.error-icon {
color: #ef4444;
opacity: 0.5;
}
.error-container h2 {
color: white;
font-size: 1.8rem;
margin: 0;
font-weight: 700;
}
.error-container p {
color: #9ca3af;
font-size: 1.1rem;
margin: 0;
text-align: center;
max-width: 500px;
}
/* ============================================
HEADER
============================================ */
.details-header {
display: flex;
flex-direction: column;
gap: 1rem;
margin-bottom: 2rem;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
background: #1a1a1a;
color: white;
border: 1px solid #333;
border-radius: 8px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
width: fit-content;
-webkit-tap-highlight-color: transparent;
}
.back-button:hover {
background: #2a2a2a;
border-color: #7c3aed;
transform: translateX(-4px);
}
.back-button:active {
transform: scale(0.98);
}
.header-info {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
.order-number {
color: white;
font-size: clamp(2rem, 5vw, 2.5rem);
margin: 0;
font-weight: 700;
font-family: "Courier New", monospace;
background: linear-gradient(135deg, #7c3aed, #a78bfa);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.status-container {
display: flex;
gap: 0.5rem;
}
.status-badge {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
border-radius: 24px;
font-size: 0.95rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
white-space: nowrap;
}
.status-badge.delivered {
background: transparent;
color: #7c3aed;
border: 2px solid #7c3aed;
box-shadow: 0 0 30px rgba(124, 58, 237, 0.5);
}
/* ============================================
DETAILS GRID
============================================ */
.details-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.details-card {
background: #000000;
border: 1px solid #333;
border-radius: 16px;
overflow: hidden;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.details-card:hover {
border-color: #7c3aed;
box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
transform: translateY(-2px);
}
.card-header {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 1.5rem;
background: #1a1a1a;
border-bottom: 1px solid #333;
}
.card-header svg {
color: #7c3aed;
flex-shrink: 0;
}
.card-header h2 {
color: white;
font-size: 1.25rem;
margin: 0;
font-weight: 700;
}
.card-content {
padding: 1.5rem;
display: flex;
flex-direction: column;
gap: 1.25rem;
}
/* ============================================
INFO ROWS
============================================ */
.info-row {
display: flex;
gap: 1rem;
align-items: flex-start;
}
.info-icon {
width: 40px;
height: 40px;
background: rgba(124, 58, 237, 0.1);
border: 1px solid rgba(124, 58, 237, 0.3);
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
color: #7c3aed;
flex-shrink: 0;
}
.info-content {
flex: 1;
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.info-label {
color: #9ca3af;
font-size: 0.85rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.info-value {
color: white;
font-size: 1rem;
font-weight: 600;
line-height: 1.4;
}
.info-age {
color: #7c3aed;
font-size: 0.85rem;
font-weight: 500;
margin-top: 0.25rem;
}
/* ============================================
PRODUCTS
============================================ */
.products-card {
grid-column: 1 / -1;
}
.products-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.product-item {
display: flex;
gap: 1rem;
padding: 1rem;
background: #1a1a1a;
border: 1px solid #333;
border-radius: 12px;
transition: all 0.2s ease;
}
.product-item:hover {
border-color: #7c3aed;
background: rgba(124, 58, 237, 0.05);
}
.product-image2 {
width: 80px;
height: 80px;
object-fit: cover;
border-radius: 8px;
background: #0a0a0a;
border: 1px solid #333;
flex-shrink: 0;
}
/* Container média pour les produits */
.product-media-container {
position: relative;
width: 80px;
height: 80px;
border-radius: 8px;
overflow: hidden;
flex-shrink: 0;
}
.product-media-container .product-image2 {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-item:hover .product-media-container .product-image2 {
transform: scale(1.05);
}
/* Badge vidéo pour les produits */
.product-video-badge {
position: absolute;
top: 4px;
right: 4px;
background: rgba(124, 58, 237, 0.95);
color: white;
padding: 0.25rem 0.4rem;
border-radius: 6px;
display: flex;
align-items: center;
gap: 0.3rem;
font-size: 0.7rem;
font-weight: 600;
backdrop-filter: blur(8px);
box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
z-index: 2;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
border: none;
cursor: pointer;
}
.product-video-badge:hover {
transform: scale(1.05);
background: rgba(124, 58, 237, 1);
box-shadow: 0 4px 12px rgba(124, 58, 237, 0.5);
}
.product-video-badge i {
font-size: 0.8rem;
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}
/* Modal vidéo */
.video-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.9);
backdrop-filter: blur(8px);
display: flex;
align-items: center;
justify-content: center;
z-index: 10000;
padding: 2rem;
animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.video-modal-content {
position: relative;
width: 100%;
max-width: 900px;
background: #1a1a1a;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.video-close-btn {
position: absolute;
top: 1rem;
right: 1rem;
background: rgba(239, 68, 68, 0.9);
color: white;
border: none;
border-radius: 50%;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 10;
font-size: 1.5rem;
font-weight: bold;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
backdrop-filter: blur(8px);
box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}
.video-close-btn:hover {
background: rgba(239, 68, 68, 1);
transform: scale(1.1) rotate(90deg);
box-shadow: 0 6px 16px rgba(239, 68, 68, 0.6);
}
.video-player {
width: 100%;
height: auto;
max-height: 80vh;
display: block;
background: #000;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(20px) scale(0.95);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.product-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.product-name {
color: white;
font-size: 1.1rem;
margin: 0;
font-weight: 600;
}
.product-category {
color: #7c3aed;
font-size: 0.85rem;
margin: 0;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.product-details {
display: flex;
gap: 1rem;
margin-top: auto;
}
.product-quantity {
color: #9ca3af;
font-size: 0.9rem;
font-weight: 500;
}
.product-price {
color: white;
font-size: 0.9rem;
font-weight: 600;
}
.product-total {
display: flex;
align-items: center;
color: #7c3aed;
font-size: 1.2rem;
font-weight: 700;
}
.products-placeholder {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 3rem 1rem;
gap: 0.75rem;
}
.placeholder-icon {
color: #4b5563;
opacity: 0.5;
}
.products-placeholder p {
color: white;
font-size: 1.1rem;
margin: 0;
font-weight: 600;
}
.placeholder-note {
color: #6b7280;
font-size: 0.9rem;
font-style: italic;
}
/* ============================================
SUMMARY
============================================ */
.summary-card {
background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
}
.summary-row {
display: flex;
justify-content: space-between;
align-items: center;
color: #9ca3af;
font-size: 1rem;
}
.summary-row span:last-child {
color: white;
font-weight: 600;
}
.free-delivery {
color: #10b981 !important;
font-weight: 700 !important;
}
.summary-divider {
height: 1px;
background: linear-gradient(to right, transparent, #333, transparent);
margin: 0.5rem 0;
}
.total-row {
font-size: 1.3rem;
font-weight: 700;
padding-top: 0.5rem;
}
.total-row span:first-child {
color: white;
}
.total-amount {
color: #7c3aed !important;
font-size: 1.5rem !important;
}
/* ============================================
NOTES
============================================ */
.notes-card {
grid-column: 1 / -1;
}
.delivery-notes {
color: #d1d5db;
font-size: 1rem;
line-height: 1.6;
margin: 0;
padding: 1rem;
background: #1a1a1a;
border-left: 3px solid #7c3aed;
border-radius: 8px;
}
/* ============================================
TIMELINE
============================================ */
.delivery-timeline {
background: #000000;
border: 1px solid #333;
border-radius: 16px;
padding: 2rem;
margin-top: 2rem;
}
.timeline-title {
color: white;
font-size: 1.5rem;
margin: 0 0 2rem 0;
font-weight: 700;
}
.timeline {
position: relative;
padding-left: 2rem;
}
.timeline::before {
content: "";
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 2px;
background: linear-gradient(to bottom, #7c3aed, transparent);
}
.timeline-item {
position: relative;
padding-bottom: 2rem;
}
.timeline-item:last-child {
padding-bottom: 0;
}
.timeline-marker {
position: absolute;
left: -2rem;
top: 0;
width: 16px;
height: 16px;
background: #1a1a1a;
border: 3px solid #333;
border-radius: 50%;
z-index: 1;
transition: all 0.3s ease;
}
.timeline-item.completed .timeline-marker {
background: #7c3aed;
border-color: #7c3aed;
box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
}
.timeline-content h3 {
color: white;
font-size: 1.1rem;
margin: 0 0 0.5rem 0;
font-weight: 600;
}
.timeline-content p {
color: #9ca3af;
font-size: 0.95rem;
margin: 0;
}
.timeline-item.completed .timeline-content h3 {
color: #7c3aed;
}
.timeline-item.completed .timeline-content p {
color: #a78bfa;
}
/* ============================================
RESPONSIVE
============================================ */
@media (max-width: 1024px) {
.details-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 768px) {
.order-details-container {
padding: 1rem;
padding-top: calc(60px + 1rem);
}
.header-info {
flex-direction: column;
align-items: flex-start;
}
.order-number {
font-size: 1.8rem;
}
.details-grid {
gap: 1rem;
grid-template-columns: 1fr;
}
.card-header {
padding: 1.25rem;
}
.card-content {
padding: 1.25rem;
}
.product-item {
flex-direction: column;
}
.product-image2 {
width: 100%;
height: 200px;
}
.product-total {
justify-content: flex-start;
}
.delivery-timeline {
padding: 1.5rem;
}
.timeline {
padding-left: 1.5rem;
}
.timeline-marker {
left: -1.5rem;
}
}
@media (max-width: 480px) {
.back-button {
width: 100%;
justify-content: center;
}
.status-badge {
padding: 0.6rem 1.2rem;
font-size: 0.85rem;
}
.info-icon {
width: 36px;
height: 36px;
}
.product-details {
flex-direction: column;
gap: 0.5rem;
}
}
/* ============================================
ANIMATIONS
============================================ */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.details-card {
animation: fadeIn 0.3s ease-out backwards;
}
.details-card:nth-child(1) {
animation-delay: 0.05s;
}
.details-card:nth-child(2) {
animation-delay: 0.1s;
}
.details-card:nth-child(3) {
animation-delay: 0.15s;
}
.details-card:nth-child(4) {
animation-delay: 0.2s;
}
.timeline-item {
animation: fadeIn 0.4s ease-out backwards;
}
.timeline-item:nth-child(1) {
animation-delay: 0.1s;
}
.timeline-item:nth-child(2) {
animation-delay: 0.2s;
}
.timeline-item:nth-child(3) {
animation-delay: 0.3s;
}
.timeline-item:nth-child(4) {
animation-delay: 0.4s;
}
/* ============================================
PRINT STYLES
============================================ */
@media print {
.order-details-container {
background: white;
padding: 1rem;
}
.back-button,
.status-badge {
display: none;
}
.details-card {
border: 1px solid #000;
page-break-inside: avoid;
}
.card-header,
.timeline-title,
.order-number {
color: #000;
}
.info-value,
.product-name {
color: #000;
}
}