/* 
 * MDSLand - Styles principaux
 * E-commerce pour le marché africain
 */

/* Variables CSS */
:root {
    --primary-color: #03a8ad;
    --secondary-color: #ffffffdd;
    --accent-color: #fd7e14;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Reset et base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a{
  text-decoration: none;
  color: inherit;
}

/* Navigation */
.navbar-brand img {
    max-height: 50px;
    width: auto;
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: var(--shadow);
}

/* Cards produits */
.product-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    box-shadow: var(--shadow);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-card .card-img-top {
    height: 180px;
    object-fit: cover;
    background-color: #fff;
}

.product-card .card-title {
    font-size: 0.95rem;
    line-height: 1.3;
}

.product-card .card-title a:hover {
    color: var(--primary-color);
}

.product-card .card-text {
    font-size: 0.85rem;
}

/* Carousel Hero */
.carousel-item .container {
    padding: 3rem 1rem;
}

/* Images responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Formulaire de paiement */
.payment-option {
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    border: 2px solid #dee2e6;
}

.payment-option:hover {
    border-color: var(--primary-color);
}

.payment-option .form-check-input:checked ~ label .payment-details {
    display: block !important;
}

.payment-option:has(.form-check-input:checked) {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* Footer */
footer {
    margin-top: auto;
}

footer img {
    max-height: 30px;
    width: auto;
}

footer a:hover {
    text-decoration: underline;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

/* Alertes */
.alert {
    border: none;
    border-radius: 8px;
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Table panier */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .navbar-brand img {
        max-height: 40px;
    }
    
    .product-card .card-img-top {
        height: 150px;
    }
    
    .carousel-item h1 {
        font-size: 1.5rem;
    }
    
    .carousel-item .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
}

@media screen and (max-width: 576px) {
    .product-card .card-body {
        padding: 0.75rem;
    }
    
    .product-card .card-title {
        font-size: 0.85rem;
    }
    
    .product-card .card-footer {
        padding: 0.75rem;
    }
    
    footer .col-md-3 {
        text-align: center;
    }
    
    footer img {
        margin: 0 auto;
        display: block;
    }
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.3s ease-out;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Print styles */
@media print {
    .navbar, footer, .btn, form {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* Accessibilité */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Quantity input */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
