/* === Cart Mobile First Styles === */

/* --- Variables (rappel, depuis style.css) --- */
/*
:root {
    --couleur-principale: #FFE2B8;
    --couleur-secondaire: #160F00;
    --couleur-fond: #FFF8EE;
    --couleur-accent: #D4A76A;
    --ombre-douce: 0 8px 25px rgba(22, 15, 0, 0.1);
    --transition-douce: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --rayon-bordure: 20px;
    --poleno-font: 'Poleno', Arial, sans-serif;
}
*/

/* --- Base Styles (Mobile First) --- */

.cart-section-mf {
    padding: 15px 0;
    background-color: transparent !important;
    background-image: none !important;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif); /* Forcer Poleno partout */
}

.cart-container-custom {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    margin: 0 auto;
}

.cart-section-mf h1 {
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
    color: var(--couleur-secondaire);
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    padding: 0 10px;
}

/* --- Liste des Articles --- */
.cart-items-list-mf {
    margin-bottom: 20px;
}

.cart-item-card-mf {
    display: flex;
    background-color: #fff;
    border-radius: 10px; /* Plus carré */
    box-shadow: 0 4px 10px rgba(22, 15, 0, 0.08);
    margin: 0 10px 10px 10px;
    padding: 12px;
    gap: 12px;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
    transition: transform 0.3s ease, box-shadow 0.2s ease, opacity 0.3s ease;
    border: 1px solid rgba(212, 167, 106, 0.1);
}

.cart-item-card-mf:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(22, 15, 0, 0.1);
}

.item-image-mf {
    flex-shrink: 0;
    width: 75px;
    align-self: flex-start;
}

.item-image-mf img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid rgba(22, 15, 0, 0.05);
}

.item-details-mf {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}

.item-info-mf p {
    margin: 0 0 3px 0;
    line-height: 1.4;
}

.item-name-mf {
    font-weight: 600;
    color: var(--couleur-secondaire);
    font-size: 1.05em;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

.item-name-mf small {
    font-size: 0.85em;
    color: var(--couleur-accent);
    font-weight: 500;
    margin-left: 4px;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

.item-variant-mf {
    font-size: 0.9em;
    color: #555;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

.item-price-mf {
    font-size: 0.9em;
    color: var(--couleur-secondaire);
    font-weight: 500;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

.item-controls-mf {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.quantity-controls-mf {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 4px 8px;
}

.qty-btn-mf {
    padding: 0.2rem 0.5rem;
    font-size: 1.1rem;
    line-height: 1;
    min-width: auto;
    background-color: transparent;
    border: none;
    color: #999;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
    text-decoration: none;
}

.qty-btn-mf:hover {
    color: #D4A76A;
    transform: scale(1.15);
}

/* Style spécifique pour l'icône de corbeille (quand quantité = 1) */
.qty-btn-trash {
    color: #999 !important;
    opacity: 0.5;
    font-size: 0.9rem !important;
}

.qty-btn-trash:hover {
    color: #e74c3c !important;
    opacity: 1;
    transform: scale(1.15);
}

.quantity-display-mf {
    font-weight: 700;
    font-size: 1.1em;
    min-width: 18px;
    text-align: center;
    color: #160F00;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

/* Style pour le sous-total (supposé déplacé en dehors de .item-controls-mf) */
.item-subtotal-mf {
    margin: 8px 0 4px 0; /* Ajout marge verticale */
    font-size: 1em;
    font-weight: 600;
    color: #160F00;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
    width: 100%; /* Assurer qu'il peut s'aligner à droite */
}

.item-subtotal-mf strong {
    font-weight: 800;
    color: #160F00;
    font-size: 1.2em;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

.item-actions-mf {
    margin-top: 4px;
}

.btn-remove-mf {
    font-size: 0.75em;
    color: #999;
    text-decoration: none;
    font-weight: 400;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
    opacity: 0.6;
}

.btn-remove-mf:hover {
    color: #e74c3c;
    opacity: 1;
    text-decoration: underline;
}

/* --- Synthèse de Commande --- */
.cart-summary-card-mf {
    background-color: var(--couleur-fond);
    border-radius: 10px; /* Plus carré */
    box-shadow: 0 4px 12px rgba(22, 15, 0, 0.08);
    padding: 15px;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
    border: 1px solid rgba(212, 167, 106, 0.15);
    margin: 0 10px 10px 10px;
}

/* Masquer le bouton DANS la synthèse par défaut (mobile) */
.cart-summary-card-mf .summary-cta-mf {
    display: none;
}

.cart-summary-card-mf h2 {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--couleur-secondaire);
    text-align: center;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--couleur-principale);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

.summary-details-mf p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95em;
    color: var(--couleur-secondaire);
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

.summary-details-mf p span:first-child {
    font-weight: 500;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

.summary-details-mf p span:last-child {
    font-weight: 600;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

.summary-total-mf {
    border-top: 1px solid rgba(22, 15, 0, 0.1);
    padding-top: 10px;
    margin-top: 10px;
}

.summary-total-mf span:last-child strong {
    font-weight: 800;
    color: #160F00;
    font-size: 1.3em; /* Plus grand */
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

.summary-cta-mf {
    margin-top: 15px;
}

/* ===========================
   SECTION CODE PROMO - DESIGN MODERNE
   =========================== */

.promo-code-container {
    margin: 16px 0;
}

/* ===== FORMULAIRE D'ENTRÉE DU CODE (non appliqué) ===== */
.promo-input-card {
    background: linear-gradient(135deg, #FFFBF5 0%, #FFF8EE 100%);
    border: 1.5px solid #E5D4B8;
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-input-card:hover {
    border-color: #D4A76A;
    box-shadow: 0 2px 8px rgba(212, 167, 106, 0.15);
}

.promo-input-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #8B7355;
    font-size: 0.9em;
    font-weight: 600;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.promo-input-form {
    margin: 0;
}

.promo-input-group {
    display: flex;
    align-items: stretch;
    gap: 8px;
    background: #fff;
    border: 2px solid #E5D4B8;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.promo-input-group:focus-within {
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.promo-code-input {
    flex: 1;
    padding: 13px 14px;
    border: none;
    background: transparent;
    font-size: 0.95em;
    font-weight: 600;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
    color: var(--couleur-secondaire);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    outline: none;
}

.promo-code-input::placeholder {
    color: #B8A896;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0.7;
}

.btn-validate-promo {
    padding: 0 16px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.btn-validate-promo:hover {
    background: linear-gradient(135deg, #6d3410 0%, #8B4513 100%);
    transform: scale(1.05);
}

.btn-validate-promo:active {
    transform: scale(0.95);
}

.btn-validate-promo svg {
    transition: transform 0.2s ease;
}

.btn-validate-promo:hover svg {
    transform: scale(1.1);
}

/* ===== CODE PROMO APPLIQUÉ (succès) ===== */
.promo-applied-card {
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border: 2px solid #86EFAC;
    border-radius: 12px;
    padding: 14px 16px;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.promo-applied-header {
    margin-bottom: 12px;
}

.promo-success-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 700;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.promo-success-badge svg {
    flex-shrink: 0;
}

.promo-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(134, 239, 172, 0.4);
}

.promo-code-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.promo-code-display svg {
    color: #8B4513;
    flex-shrink: 0;
}

.code-text {
    font-size: 0.95em;
    font-weight: 700;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
    color: #8B4513;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #8B4513 0%, #D4A76A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.promo-savings {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.savings-label {
    font-size: 0.75em;
    font-weight: 500;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

.savings-amount {
    font-size: 1.1em;
    font-weight: 800;
    color: #16A34A;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
    letter-spacing: 0.5px;
}

.promo-remove-form {
    margin: 0;
    text-align: center;
}

.btn-remove-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.08);
    color: #DC2626;
    border: 1.5px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 600;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-remove-code:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #DC2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-remove-code:active {
    transform: translateY(0);
}

.btn-remove-code svg {
    flex-shrink: 0;
}

/* ===== RESPONSIVE AJUSTEMENTS ===== */
@media (max-width: 576px) {
    .promo-code-input {
        font-size: 0.9em;
        padding: 12px;
    }

    .btn-validate-promo {
        padding: 0 14px;
    }

    .promo-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .promo-savings {
        align-items: flex-start;
        width: 100%;
    }

    .code-text {
        font-size: 0.9em;
    }
}

/* ===== BUTTON TEXT/ICON RESPONSIVE ===== */
/* Masquer l'icône, toujours afficher le texte "Appliquer" */
.btn-text-desktop {
    display: none;
}

.btn-text-mobile {
    display: inline;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* --- Boutons CTA (Passer la commande) --- */

/* Style commun pour les boutons principaux (résumé et sticky) */
.summary-cta-mf .btn-principale,
.cart-sticky-cta-mf .btn-principale {
    display: block; /* Prend toute la largeur */
    width: 90%; /* Un peu de marge sur les côtés */
    max-width: 400px; /* Limite la largeur sur très grand écran */
    margin: 15px auto 0 auto; /* Centre le bouton et ajoute de la marge haute */
    padding: 14px 20px; /* Augmente la taille (hauteur/largeur interne) */
    font-size: 1.1rem; /* Augmente la taille du texte */
    font-weight: 700; /* Texte plus gras */
    text-align: center; /* Assure le centrage du texte */
    text-transform: uppercase; /* Texte en majuscules */
    letter-spacing: 0.8px; /* Un peu plus d'espacement */
    border-radius: 50px; /* Bouton plus arrondi (style pilule) */
    background-color: var(--couleur-secondaire); /* Fond */
    color: var(--couleur-principale); /* Texte */
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(22, 15, 0, 0.15);
}

/* Effet au survol */
.summary-cta-mf .btn-principale:hover,
.cart-sticky-cta-mf .btn-principale:hover {
    background-color: var(--couleur-accent); /* Changement de couleur au survol */
    color: var(--couleur-secondaire);
    transform: translateY(-2px) scale(1.01); /* Léger mouvement */
    box-shadow: 0 6px 20px rgba(22, 15, 0, 0.2);
}

/* Masquer le bouton DANS la synthèse par défaut (mobile) */
.cart-summary-card-mf .summary-cta-mf {
    display: none;
}

/* --- NOUVEAU: Bouton Sticky CTA (Mobile) --- */
.cart-sticky-cta-mf {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9); /* Dégradé plus marqué */
    padding: 10px 0 15px 0; /* Espace autour du bouton sticky */
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    z-index: 100; /* S'assurer qu'il est au-dessus */
    /* Pas de transition ici, c'est le bouton qui l'a */
}

/* Le bouton DANS le sticky a déjà le style commun via la règle précédente */

/* --- Message Panier Vide --- */
.cart-empty-message-mf {
    background-color: var(--couleur-fond);
    padding: 20px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(22, 15, 0, 0.08);
    text-align: center;
    margin: 20px 10px 0 10px;
    border: 1px solid rgba(212, 167, 106, 0.15);
}

.cart-empty-message-mf p {
    font-size: 1em;
    color: var(--couleur-secondaire);
    margin-bottom: 15px;
    font-family: var(--poleno-font, 'Poleno', Arial, sans-serif);
}

.cart-empty-message-mf p:last-child {
    margin-bottom: 0;
}


/* === Media Queries pour écrans plus grands === */

/* --- Tablettes (ex: >= 768px) --- */
@media (min-width: 768px) {
    .cart-container-custom {
        padding-left: 30px;
        padding-right: 30px;
        max-width: 1300px;
    }

    .cart-item-card-mf,
    .cart-summary-card-mf,
    .cart-empty-message-mf {
        margin-left: 0;
        margin-right: 0;
    }

    .cart-section-mf h1 {
        font-size: 1.9em;
        margin-bottom: 20px;
        padding: 0;
    }

    .cart-layout-mf {
        display: flex;
        gap: 20px;
        align-items: flex-start;
    }
    
    .cart-items-list-mf {
        flex: 2.5;
        margin-bottom: 0;
    }

    .cart-item-card-mf {
        padding: 15px;
        gap: 15px;
    }
    
    .item-image-mf {
        width: 80px;
    }
    
    .item-name-mf {
        font-size: 1.1em;
    }
    
    .item-variant-mf, .item-price-mf {
        font-size: 0.95em;
    }

    .item-controls-mf {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    
    .item-subtotal-mf strong {
        font-size: 1.15em;
    }
    
    .btn-remove-mf {
        font-size: 0.9em;
    }

    .cart-summary-card-mf {
        flex: 1;
        padding: 20px;
        position: sticky;
        top: 80px;
    }
    
    .cart-summary-card-mf h2 {
        font-size: 1.4em;
    }
    
    .summary-details-mf p {
        font-size: 1em;
    }
    
    .summary-total-mf span:last-child strong {
        font-size: 1.35em;
    }
    
    .summary-cta-mf .btn-principale {
        font-size: 1em;
    }

    /* --- Gestion des CTA --- */
    .cart-sticky-cta-mf {
        display: none; /* Cache le bouton sticky sur tablette et plus */
    }
    .cart-summary-card-mf .summary-cta-mf {
        display: block; /* Affiche le bouton dans la synthèse */
        margin-top: 20px; /* Espace au-dessus */
    }

    /* Le bouton dans la synthèse sur Desktop */
    .summary-cta-mf .btn-principale { /* Pas besoin de répéter .cart-sticky-cta-mf ici */
        width: 100%; /* Pleine largeur de la carte synthèse */
        max-width: none; /* Annule la max-width mobile */
        margin-left: 0;
        margin-right: 0;
        padding: 16px 20px; /* Encore un peu plus grand sur desktop */
        font-size: 1.15rem;
    }
}

/* --- Ordinateurs (ex: >= 1024px) --- */
@media (min-width: 1024px) {
    .cart-container-custom {
        padding-left: 40px;
        padding-right: 40px;
        max-width: 1500px;
    }

    .cart-section-mf h1 {
        font-size: 2em;
        margin-bottom: 25px;
    }

    .cart-layout-mf {
        gap: 25px;
    }
    
    .cart-item-card-mf {
        padding: 18px;
        gap: 18px;
    }

    .item-image-mf {
        width: 90px;
    }
    
    .item-name-mf {
        font-size: 1.15em;
    }

    .cart-summary-card-mf {
         padding: 25px;
    }
    
    .cart-summary-card-mf h2 {
        font-size: 1.5em;
    }
    
    .summary-total-mf span:last-child strong {
        font-size: 1.4em;
    }
}

/* Styles Desktop pour le résumé du panier */
@media (min-width: 992px) {
    .cart-container-custom {
        max-width: 1400px;
    }

    .cart-summary-card-mf {
        max-width: 420px;
        min-width: 380px;
    }
}

/* Très grands écrans */
@media (min-width: 1400px) {
    .cart-container-custom {
        max-width: 1600px;
        padding-left: 50px;
        padding-right: 50px;
    }

    .cart-summary-card-mf {
        max-width: 450px;
    }
}

@media (min-width: 1600px) {
    .cart-container-custom {
        max-width: 1800px;
    }
} 