*{
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f9f9f9;
}
h1 {
    font-size: 24px;
    color: #333;
}
p {
    margin: 15px;
    padding: 0;
    color: #333;
}
.bandeau_haut {
    background-color: rgb( 93 , 174 , 43 );
    width: 100%;
    padding: 3px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bandeau_haut .liens {
    display: flex;
    gap: 20px;
}
.bandeau_haut a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
}
.bandeau_haut .droite {
    text-align: right;
    font-size: 14px;
    color: #FFFFFF;
    display: flex;
    gap: 20px;
    align-items: center;
}
.stars-product {
    unicode-bidi: bidi-override;
    direction: rtl;
}
.stars-product * {
    position: relative;
    margin: 0;
    padding: 0;
}
.stars-product input {
    display: none;
}
.stars-product label::before {
    content: "\2605";
    width: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 25px;
    cursor: pointer;
}
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 20px;
    background-color: #f2f2f2;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.logo_header {
    flex-shrink: 0;
    width: 130px;
}
.logo img {
    display: block;
    max-width: 100%;
    height: auto;
}
.header_droite {
    display: flex;
    align-items: center;
    gap: 40px;
}
.infos_header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: right;
}
.cli_header {
    display: flex;
    gap: 20px;
    font-size: 14px;
}
.cli_header a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}
.cli_header a:hover {
    color: #007bff;
}
.clicks_header {
    display: flex;
    gap: 15px;
    font-size: 13px;
}
.clicks_header a {
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}
.clicks_header a:hover {
    color: #007bff;
}
.clicks_header i {
    font-size: 12px;
}
.cart_container {
    width: 100%;
    height: calc(100vh - 195px);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content:flex-start;
    font-size: 24px;
    overflow: auto; /* Ajouté pour permettre le scroll */
}
#empty-cart{
    text-align: center;
}

/* Animation des mots qui changent */
.animated-word {
    display: inline-block;
    position: relative;
    font-weight: bold;
    font-size: 20px;
    width: 140px;
    text-align: center;
}
.word {
    position: absolute;
    top: 0;
    left: 50%;
    width: 140px;
    transform: translateX(-50%);
    opacity: 0;
    animation: wordCycle 9s infinite;
}
.word:nth-child(1) { animation-delay: 0s; }
.word:nth-child(2) { animation-delay: 3s; }
.word:nth-child(3) { animation-delay: 6s; }
@keyframes wordCycle {
    0%, 16.66% {
        opacity: 0;
        transform: translateX(-50%) translateY(0x);
    }
    16.66%, 85% {
        opacity: 1;
        transform: translateX(-50%) translateY(-20px);
    }
    85%, 100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-40px);
    }
}

.container h1 {
    padding: 0 25px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 1px;
    border: 1px solid #ccc;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.btn-outline {
    border: 1px solid #ccc;
    background-color: transparent;
    color: #333;
}
.btn:hover {
    background-color: #0056b3;
}
.btn-outline:hover {
    background-color: #3d3d3d;
    color: #fff;
}

.checkout-button {
    margin-top: 20px;
    display: inline-block;
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, rgba(93, 174, 43, 1) 0%, rgb(106, 212, 48) 90%, rgba(79, 161, 38, 0.9) 100%);
    background-size: 200% 200%;
    background-position: left center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    color: white;
    padding: 12px;
    font-size: 16px;
    text-align: center;
    line-height: 25px;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-position 0.4s ease;
}

.checkout-button:hover {
  background-position: right center;
}

/* Informations panier */
.cart-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cart-info h4 {
    color: #495057;
    margin-bottom: 15px;
}

/* Notifications */
#notifications {
    position: fixed;
    top: 20px;
    right: 235px;
    z-index: 1000;
    max-width: 300px;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Items du panier */

#cart-items {
    box-sizing: border-box;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    display: flex;
    justify-content: space-between;
    overflow-x: auto;
}

#cart-items h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}


/* Styles pour l'affichage du panier */

/* Image des articles */
.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
}

/* Placeholder pour les images manquantes */
.cart-item-image-placeholder {
    width: 100px;
    height: 100px;
    background: #f0f0f0;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Conteneur d'un article du panier */
.cart-item {
    padding: 0 15px;
    display: flex;
    gap: 15px;
    align-items: center;
    background: #fff;
}

/* Zone d'image (non flexible) */
.cart-item-image-container {
    flex-shrink: 0;
}

/* Zone d'informations (flexible) */
.cart-item-info {
    flex-grow: 1;
}

/* Titre de l'article */
.cart-item-title {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.cart-item-title a {
    text-decoration: none;
    color: #333;
}

/* Container des spécifications */
.cart-item-specs {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

/* Badge de spécification */
.cart-item-spec-badge {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Détails de l'article (quantité, prix) */
.cart-item-details {
    font-size: 14px;
    color: #555;
}

/* Métadonnées de l'article */
.cart-item-meta {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* Zone de prix (aligné à droite) */
.cart-item-price {
    text-align: right;
}

/* Prix affiché */
.cart-item-price-value {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
}

/* Résumé du panier */
.cart-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 300px;
    max-height: 350px;
    position: sticky;
    top:0;
    right: 0;
}

/* Titre du résumé */
.cart-summary-title {
    margin: 0 0 15px 0;
    color: #495057;
}

/* Ligne de résumé */
.cart-summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    font-size: 16px;
    height: 40px;
    border-bottom: 1px solid #ccc;
}

.cart-summary a {
    width: 100%;
    text-align: center;
}

/* Total du panier */
.cart-total {
    display: grid;
    grid-template-columns: 3fr 1fr;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    border-top: 2px solid #333;
    padding-top: 15px;
    margin-top: 15px;
}
.cart-total > :nth-child(2n) {
    text-align: right;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    background: #f8f9fa;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #e9ecef;
    color: #333;
}

.quantity-btn:active {
    background: #dee2e6;
}

.quantity-btn:disabled {
    background: #f8f9fa;
    color: #ccc;
    cursor: not-allowed;
}

.quantity-input {
    border: none;
    width: 60px;
    height: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    background: white;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.price-info {
    margin-top: 5px;
}

.remove-item-btn{
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    margin-left: 10px;
}

/* Styles de test rapides */
.test-section {
    background: #f5f5f5;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}
.test-buttons {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.btn-primary { background: #007bff; color: white; }
.btn-success { background: #28a745; color: white; }
.btn-danger { background: #dc3545; color: white; }
.cart-info {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}
.error { color: #dc3545; background: #f8d7da; padding: 10px; border-radius: 4px; margin: 10px 0; }
.success { color: #155724; background: #d4edda; padding: 10px; border-radius: 4px; margin: 10px 0; }

@media screen and (max-width: 1045px) {
    .bandeau_haut .respno {
        display: none;
    }

    body {
        overflow-x: hidden;
    }

    #cart-items {
        flex-direction: column;
        justify-content: flex-start;
        gap:50px;
    }

    .checkout-button {
        position: sticky;
        bottom: 10px;
        width: 100%;
    }
}

@media screen and (max-width: 575px) {    
    .cli_header {
        display: none;
    }

    .cart_container {
        padding: 3px;
    }

    .cart_container p {
        font-size: 14px;
    }

    .cart-item {
        padding: 0;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-title {
        font-size: 14px;
    }
    .cart-item-specs {
        font-size: 11px;
    }

    .cart-item-details {
        font-size: 12px;
    }

    .cart-item-meta {
        font-size: 11px;
    }

    .quantity-input-group {
        height: 18px;
    }
    .quantity-btn {
        width: 16px;
        height: 16px;
        font-size: 12px;
    }
    .quantity-input{
        height: 16px;
        width: 30px;
    }

    .bandeau_haut .droite {
        font-size: 11px;
    }
    .bandeau_haut .droite .stars-product label::before {
        font-size: 18px;
    }
}

