/* Importation de la police Roboto */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

/* Styles globaux avec thème gris clair */
body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
}

/* Navigation */
.navbar {
    background-color: #1a1a1a !important;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(255,102,0,0.2);
}

.navbar-brand {
    font-weight: bold;
    font-size: 24px;
    letter-spacing: 0.5px;
}

.brand-orange {
    color: #ff6b00;
    font-weight: bold;
}

.nav-link {
    color: #f0f0f0 !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ff6600 !important;
}

/* Menu hamburger - amélioration du contraste */
.navbar-toggler {
    border-color: #ff6600 !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 102, 0, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Cartes de produits */
.card {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Force hauteur égale */
}

.card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(255,102,0,0.3);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
}

.card-title {
    color: #ff6600;
    margin-bottom: 0.75rem;
}

/* Boutons personnalisés */
.btn-primary, .btn-orange {
    background-color: #ff6600;
    border-color: #ff6600;
    color: #ffffff;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-orange:hover {
    background-color: #cc5200;
    border-color: #cc5200;
}

.btn-secondary {
    background-color: #ffffff;
    border-color: #ff6600;
    color: #ff6600;
}

.btn-secondary:hover {
    background-color: #ff6600;
    color: #ffffff;
}

/* Filtres */
.form-select {
    background-color: #ffffff;
    color: #333;
    border-color: #ff6600;
}

.form-label {
    color: #ff6600;
    font-weight: bold;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #f0f0f0;
    padding: 1rem 0;
    margin-top: 2rem;
    border-top: 1px solid #333;
}

.social-icons a {
    color: #f0f0f0;
    margin: 0 10px;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #ff6600;
}

/* Alertes et messages */
.alert-info, .alert-success {
    background-color: #ffffff;
    border-color: #ff6600;
    color: #333;
}

/* Hero Carousel Styles */
#heroCarousel {
    margin-top: -2rem;
    margin-bottom: 2rem;
    background-color: #000;
    overflow: hidden;
}

.carousel-inner {
    height: 80vh;
}

#heroCarousel .carousel-item {
    position: relative;
    height: 100%;
    transition: transform .6s ease-in-out;
}

#heroCarousel .carousel-item.active,
#heroCarousel .carousel-item-next,
#heroCarousel .carousel-item-prev {
    display: block;
}

#heroCarousel .carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#heroCarousel .carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 10px;
    max-width: 80%;
    margin: 0 auto;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

#heroCarousel .carousel-caption h1 {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: 1.5rem;
}

#heroCarousel .carousel-caption p {
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    width: 5%;
}

#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(255, 102, 0, 0.7);
    border-radius: 50%;
    background-size: 50%;
}

#heroCarousel .carousel-item-next:not(.carousel-item-start),
#heroCarousel .active.carousel-item-end {
    transform: translateX(100%);
}

#heroCarousel .carousel-item-prev:not(.carousel-item-end),
#heroCarousel .active.carousel-item-start {
    transform: translateX(-100%);
}

#heroCarousel .carousel-item-next.carousel-item-start,
#heroCarousel .carousel-item-prev.carousel-item-end {
    transform: translateX(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #heroCarousel .carousel-item {
        height: 60vh;
    }
    
    #heroCarousel .carousel-caption {
        padding: 1rem;
        max-width: 90%;
    }
    
    #heroCarousel .carousel-caption h1 {
        font-size: 1.8rem;
    }
    
    #heroCarousel .carousel-caption p {
        font-size: 1rem;
    }
    
    #heroCarousel .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}

/* Fade transition for carousel */
.carousel-fade .carousel-item {
    opacity: 0;
    transition-duration: .6s;
    transition-property: opacity;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    opacity: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .card-img-top {
        height: 200px;
    }
}

/* Accessibilité et animations */
.form-control {
    background-color: #ffffff;
    color: #333;
    border-color: #ff6600;
}

.form-control:focus {
    background-color: #ffffff;
    color: #333;
    border-color: #ff6600;
    box-shadow: 0 0 0 0.2rem rgba(255,102,0,0.25);
}

/* Styles de validation de formulaire */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    color: #dc3545;
    display: none;
}

.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Styles spécifiques pour la page panier */
#cartItems .card {
    margin-bottom: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    border: none;
}

#cartItems .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(255, 102, 0, 0.2);
}

#cartItems .card-body {
    padding: 1.5rem;
}

#cartItems .row.align-items-center {
    margin: 0;
}

#cartItems .card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#cartItems .card-text.small {
    color: #666;
    line-height: 1.4;
}

/* Image du produit dans le panier */
#cartItems .col-md-2 img {
    border-radius: 8px;
    max-height: 100px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

#cartItems .col-md-2 img:hover {
    transform: scale(1.1);
}

/* Prix et badge de réduction */
#cartItems .badge.bg-danger {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    border-radius: 20px;
}

/* Contrôles de quantité */
#cartItems .input-group {
    width: 100%;
    max-width: 150px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#cartItems .input-group .btn {
    background-color: #f0f0f0;
    border: none;
    color: #333;
    font-weight: bold;
    padding: 0.5rem 0.75rem;
    transition: background-color 0.2s ease;
}

#cartItems .input-group .btn:hover {
    background-color: #ff6600;
    color: white;
}

#cartItems .input-group .form-control {
    border: none;
    text-align: center;
    font-weight: 600;
    padding: 0.5rem 0;
    background-color: #f8f8f8;
}

/* Bouton supprimer */
#cartItems .btn.btn-danger {
    background-color: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 6px;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
}

#cartItems .btn.btn-danger:hover {
    background-color: #dc3545;
    color: #fff;
}

/* Résumé du panier */
#cartSummary .card {
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: none;
    background-color: #f9f9f9;
}

#cartSummary .card-body {
    padding: 1.5rem;
}

#cartSummary .card-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #ff6600;
    padding-bottom: 0.75rem;
}

#cartSummary p {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

#cartSummary .fs-4 {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

#cartSummary .btn-success {
    background-color: #ff6600;
    border-color: #ff6600;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#cartSummary .btn-success:hover {
    background-color: #e55c00;
    border-color: #e55c00;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
}

#cartSummary .btn-outline-danger {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

#cartSummary .btn-outline-danger:hover {
    background-color: #dc3545;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Responsive pour les appareils mobiles */
@media (max-width: 768px) {
    #cartItems .row.align-items-center > div {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    #cartItems .col-md-2 img {
        max-height: 80px;
        margin: 0 auto 1rem;
        display: block;
    }
    
    #cartItems .col-md-2:last-child {
        margin-top: 1rem;
    }
    
    #cartItems .input-group {
        margin: 0 auto;
    }
    
    #cartSummary .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
    }
}

/* Contrôles de quantité dans le panier */
.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.quantity-control input {
    width: 60px;
    text-align: center;
    margin: 0 0.5rem;
}

.quantity-control button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Feature Icons Styles */
.feature-icon {
    height: 80px;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 102, 0, 0.1);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.feature-icon i {
    color: #ff6600;
    transition: all 0.3s ease;
}

.card:hover .feature-icon {
    background-color: #ff6600;
    transform: scale(1.1);
}

.card:hover .feature-icon i {
    color: #ffffff;
}

.text-orange {
    color: #ff6600 !important;
}

/* Card improvements */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 1.5rem 1rem;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(255, 102, 0, 0.2);
}

.card-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.card-text {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

/* Classes pour remplacer les couleurs Bootstrap et respecter l'identité visuelle ElectroTag */
.text-electrotag-primary {
    color: #ff6600 !important;
}

.bg-electrotag-primary {
    background-color: #ff6600 !important;
}

.border-electrotag-primary {
    border-color: #ff6600 !important;
}

.text-electrotag-info {
    color: #ff6600 !important;
}

.spinner-border-electrotag {
    color: #ff6600 !important;
}

/* Surcharge des classes Bootstrap pour respecter l'identité visuelle */
.text-primary {
    color: #ff6600 !important;
}

.bg-primary {
    background-color: #ff6600 !important;
    border-color: #ff6600 !important;
}

.border-primary {
    border-color: #ff6600 !important;
}

.text-info {
    color: #ff6600 !important;
}

.spinner-border.text-primary {
    color: #ff6600 !important;
}

/* Alertes avec couleurs ElectroTag */
.alert-electrotag {
    background-color: rgba(255, 102, 0, 0.1);
    border-color: #ff6600;
    color: #cc5200;
}

.alert-electrotag .alert-link {
    color: #cc5200;
}

/* === PANIER FLOTTANT === */
.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    animation: pulse 2s infinite;
}

.floating-cart .btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.4);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-cart .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.6);
    transition: all 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Améliorations des badges compteurs */
#cart-counter, #floating-cart-counter {
    min-width: 18px;
    height: 18px;
    font-size: 0.75rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.badge-bounce {
    animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

/* Style pour le dropdown du panier */
.cart-dropdown {
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid #ff6600;
    border-radius: 8px;
    min-width: 320px !important;
}

.cart-dropdown .dropdown-item:hover {
    background-color: #fff5f0;
}

/* Offcanvas panier */
.offcanvas-panier {
    background-color: #ffffff;
}

.offcanvas-panier .offcanvas-header {
    background-color: #ff6600;
    color: white;
}

.mini-cart-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 0.5rem 0;
}

.mini-cart-item:last-child {
    border-bottom: none;
}

/* Responsive pour mobile */
@media (max-width: 576px) {
    .floating-cart {
        bottom: 15px;
        right: 15px;
    }
    
    .floating-cart .btn {
        width: 50px;
        height: 50px;
    }
}

/* Améliorations boutons d'action panier */
.btn-outline-orange {
    border-color: #ff6600;
    color: #ff6600;
    transition: all 0.3s ease;
}

.btn-outline-orange:hover {
    background-color: #ff6600;
    border-color: #ff6600;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
}

/* Animation pour les boutons d'action */
.btn-group-cart {
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .btn-group-cart {
        flex-direction: column;
    }
    
    .btn-group-cart .btn {
        width: 100%;
    }
}

/* === VALIDATION DE FORMULAIRE === */
.invalid-feedback {
    display: none; /* Masqué par défaut */
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Afficher les messages d'erreur seulement quand le champ est invalide */
.is-invalid + .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback,
.form-select.is-invalid ~ .invalid-feedback {
    display: block;
}

.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.is-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.form-control:focus, .form-select:focus {
    border-color: #ff6600;
    box-shadow: 0 0 0 0.2rem rgba(255, 102, 0, 0.25);
}

/* Animation pour les champs en erreur - plus subtile */
@keyframes subtle-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    75% { transform: translateX(1px); }
}

.form-control.is-invalid {
    animation: subtle-shake 0.3s ease-in-out;
}

/* Masquer les astérisques obligatoires */
.required-asterisk {
    display: none;
}

/* Style pour les tooltips d'aide */
.form-text {
    font-size: 0.825rem;
    color: #6c757d;
    margin-top: 0.25rem;
}