/* 
 * Styles personnalisés pour Les Délices D'Amiya
 * Pages améliorées: commande, checkout, suivi de commande, contact, et panier
 */

/* Variables des couleurs Les Délices D'Amiya */
:root {
    --delices-red: #AE3A27;       /* Rouge brique principal */
    --delices-dark-red: #6D2713;  /* Rouge foncé pour accents */
    --delices-gold: #FFA726;      /* Jaune doré pour étiquettes */
    --delices-cream: #FCFBF8;     /* Blanc cassé pour textes */
    --delices-light-red: #C04B38; /* Rouge clair pour variantes */
}

/* ====== STYLES COMMUNS ====== */

/* Titres */
h1, h2, h3, h4, h5, h6 {
    color: var(--delices-dark-red);
    font-family: 'Playfair Display', 'Georgia', serif;
}

/* Cartes */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(109, 39, 19, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: var(--delices-red) !important;
    color: white !important;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
    background-color: var(--delices-cream);
}

/* Boutons */
.btn-primary {
    background-color: var(--delices-red);
    border-color: var(--delices-red);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--delices-dark-red);
    border-color: var(--delices-dark-red);
}

.btn-outline-primary {
    color: var(--delices-red);
    border-color: var(--delices-red);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--delices-red);
    border-color: var(--delices-red);
}

.btn-success {
    background-color: #27AE60;
    border-color: #27AE60;
}

.btn-success:hover, .btn-success:focus {
    background-color: #219653;
    border-color: #219653;
}

/* Formulaires */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #E0E0E0;
    padding: 0.75rem 1rem;
    background-color: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--delices-gold);
    box-shadow: 0 0 0 0.25rem rgba(255, 167, 38, 0.25);
}

label.form-label {
    color: var(--delices-dark-red);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Alertes */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    color: #E74C3C;
}

.alert-warning {
    background-color: rgba(241, 196, 15, 0.1);
    color: #F1C40F;
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498DB;
}

/* Tables */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table th {
    background-color: var(--delices-gold);
    color: var(--delices-dark-red);
    font-weight: 600;
    border: none;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #F0F0F0;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(252, 251, 248, 0.7);
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 167, 38, 0.05);
}

/* Badges */
.badge.bg-primary {
    background-color: var(--delices-red) !important;
}

.badge.bg-success {
    background-color: #27AE60 !important;
}

/* Icônes */
.fa-check-circle, .fa-check {
    color: #27AE60;
}

.fa-times-circle, .fa-times {
    color: #E74C3C;
}

.fa-clock {
    color: #F1C40F;
}

.fa-info-circle {
    color: #3498DB;
}

/* ====== PAGE CHECKOUT ====== */
.payment-option {
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: var(--delices-gold);
    background-color: rgba(255, 167, 38, 0.05);
}

.form-check-input:checked {
    background-color: var(--delices-red);
    border-color: var(--delices-red);
}

.form-check-input:focus {
    border-color: var(--delices-gold);
    box-shadow: 0 0 0 0.25rem rgba(255, 167, 38, 0.25);
}

.checkout-item {
    padding: 1rem;
    border-bottom: 1px solid #F0F0F0;
    transition: all 0.3s ease;
}

.checkout-item:hover {
    background-color: rgba(255, 167, 38, 0.05);
}

.checkout-item:last-child {
    border-bottom: none;
}

#checkout-cart-items {
    max-height: 300px;
    overflow-y: auto;
}

/* ====== PAGE TRACKING ====== */
.order-details {
    margin-top: 2rem;
}

.order-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 80px;
}

.status-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.status-past .status-icon {
    background-color: var(--delices-red);
    color: white;
}

.status-active .status-icon {
    background-color: var(--delices-gold);
    color: var(--delices-dark-red);
    box-shadow: 0 0 20px rgba(255, 167, 38, 0.5);
    animation: pulse 2s infinite;
}

.status-future .status-icon {
    background-color: white;
    color: #999;
    border: 2px dashed #CCC;
}

.status-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    color: var(--delices-dark-red);
}

.status-connector {
    flex-grow: 1;
    height: 4px;
    margin: 0;
    position: relative;
    top: -30px;
    z-index: 0;
}

.connector-past {
    background-color: var(--delices-red);
}

.connector-future {
    background-color: #EEE;
}

.current-status-indicator {
    margin-top: 0.5rem;
}

.order-notification {
    position: fixed;
    top: -100px;
    right: 20px;
    width: 350px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    transition: top 0.5s ease;
    overflow: hidden;
    border-top: 4px solid var(--delices-gold);
}

.order-notification.show {
    top: 20px;
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 1.25rem;
}

.notification-icon {
    font-size: 2rem;
    color: var(--delices-gold);
    margin-right: 1rem;
}

.notification-text {
    flex-grow: 1;
}

.notification-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--delices-dark-red);
}

.notification-message {
    margin-bottom: 0;
    color: #666;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.notification-close:hover {
    color: var(--delices-dark-red);
}

.order-item-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Animation pour l'icône active */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 167, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 167, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 167, 38, 0);
    }
}

/* ====== PAGE CONTACT ====== */
.contact-info {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(109, 39, 19, 0.1);
}

.contact-info i {
    color: var(--delices-red);
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.contact-info h5 {
    color: var(--delices-dark-red);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.social-links a {
    color: #666;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--delices-red);
}

.contact-form {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(109, 39, 19, 0.1);
}

/* Stylisation de la carte Google Maps */
.ratio iframe {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(109, 39, 19, 0.1);
}

/* ====== PANIER ====== */
.cart-sidebar {
    background-color: var(--delices-cream);
    border-left: 4px solid var(--delices-gold);
}

.cart-header {
    background-color: var(--delices-red);
    color: white;
    padding: 1.25rem;
}

.cart-header h3 {
    color: white;
    margin: 0;
}

.cart-item {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cart-item-title {
    color: var(--delices-dark-red);
    font-weight: 600;
}

.cart-item-price {
    color: var(--delices-red);
    font-weight: 700;
}

.cart-quantity-control {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background-color: var(--delices-red);
    color: white;
    border-color: var(--delices-red);
}

.quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    font-weight: 600;
    margin: 0 0.5rem;
}

.cart-promo-item {
    background-color: rgba(39, 174, 96, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.cart-promo-item i {
    color: #27AE60;
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

.cart-promo-text {
    color: #27AE60;
    font-weight: 600;
    margin: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--delices-dark-red);
    padding: 1rem 0;
    border-top: 1px dashed #E0E0E0;
}

/* Fond texturé pour les pages */
.checkered-background {
    background-image: 
        linear-gradient(45deg, rgba(174, 58, 39, 0.03) 25%, transparent 25%), 
        linear-gradient(-45deg, rgba(174, 58, 39, 0.03) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(174, 58, 39, 0.03) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(174, 58, 39, 0.03) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: var(--delices-cream);
}

/* ====== PAGE CONFIRMATION COMMANDE ====== */
.order-confirmation {
    text-align: center;
    padding: 3rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(109, 39, 19, 0.1);
}

.confirmation-icon {
    font-size: 5rem;
    color: #27AE60;
    margin-bottom: 1.5rem;
}

.order-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--delices-dark-red);
    background-color: var(--delices-cream);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    margin: 1rem 0;
}

.next-steps {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--delices-cream);
    border-radius: 8px;
}

/* Ajout du responsive design */
@media (max-width: 768px) {
    .card-body {
        padding: 1.25rem;
    }
    
    .order-progress {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .status-step {
        margin: 0.5rem 1rem;
    }
    
    .status-connector {
        display: none;
    }
    
    .contact-info, .contact-form {
        padding: 1.5rem;
    }
}

/* Adaptation mobile */
@media (max-width: 576px) {
    .payment-option {
        margin-bottom: 0.5rem;
    }
    
    .order-notification {
        width: 90%;
        left: 5%;
        right: 5%;
    }
}
