/* Panier : couleurs et arrondis repris de la landing page et de la boutique */
.ct-page { max-width: 640px; margin: 0 auto; padding: 8px 20px 0; }
.ct-title { font-size: 28px; color: #5a4a40; margin-bottom: 16px; text-align: center; }
.ct-notice { background: #fff4e5; border: 1px solid #f0d3a8; color: #8a5a14; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }

/* Résumé de la commande : toujours affiché en haut ; sur téléphone, une barre en bas y ramène (voir @media plus bas) */
.ct-summary { background: #f4f3f2; border-bottom: 1px solid #e4e0dd; }
.ct-summary-head {
    max-width: 640px; margin: 0 auto; padding: 18px 20px 0; display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
}
.ct-summary-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: #b85c1e; font-size: 16px; font-weight: 400; }
.ct-summary-head strong { font-size: 19px; color: #1f1a17; white-space: nowrap; }
.ct-summary-body { max-width: 640px; margin: 0 auto; padding: 6px 20px 20px; }

/* Téléphone : résumé fermé en haut + barre du total fixée au bas de l'écran (un appui ouvre le résumé du haut).
   Le footer est masqué sur cette page : la barre ne recouvre rien, la marge du bas garde le bouton visible. */
.ct-bottom { display: none; }
@media (max-width: 600px) {
    body:has(.ct-bottom) { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
    .ct-bottom {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; width: 100%;
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
        background: #f4f3f2; border: 0; border-top: 1px solid #e4e0dd; box-shadow: 0 -4px 16px rgba(0,0,0,.08);
        font: inherit; text-align: left; cursor: pointer;
    }
    .ct-bottom strong { font-size: 19px; color: #1f1a17; white-space: nowrap; }
    body:has(.ct-layout) > footer { display: none; }   /* pas de footer sur la page panier */
}
.ct-items { list-style: none; display: flex; flex-direction: column; gap: 16px; padding: 10px 0 6px; }
.ct-item { display: flex; align-items: center; gap: 14px; }
.ct-thumb {
    position: relative; flex: none; width: 64px; height: 64px; border-radius: 10px; border: 1px solid #ddd8d4; background: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.ct-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; display: block; }
.ct-qty {
    position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
    background: #1f1a17; color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center;
}
.ct-name { flex: 1; min-width: 0; color: #1f1a17; font-size: 15px; line-height: 1.35; }
.ct-name small { display: block; color: #6f6863; font-size: 13px; }
.ct-price { flex: none; color: #1f1a17; font-size: 15px; white-space: nowrap; }
.ct-edit { display: inline-block; margin: 8px 0 4px 78px; color: #b85c1e; font-size: 14px; }
.ct-promo { margin-top: 14px; }
.ct-promo-row { display: flex; gap: 10px; }
.ct-promo-row input {
    flex: 1; min-width: 0; padding: 12px; font-size: 16px; text-transform: uppercase; letter-spacing: .5px;
    border: 1px solid #d9d2cc; border-radius: 8px; background: #fff; color: #1f1a17;
}
.ct-promo-row input::placeholder { text-transform: none; letter-spacing: 0; }
.ct-promo-row input:focus { outline: 2px solid #c4a57b; border-color: #8b7355; }
.ct-promo-row button { flex: none; padding: 0 18px; border: 0; border-radius: 8px; background: #1f1a17; color: #fff; font-size: 15px; cursor: pointer; }
.ct-promo-row button:hover { background: #3a312b; }
.ct-promo-applied { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #eaf5ec; border: 1px solid #b9dcc0; border-radius: 8px; color: #1f5c2e; font-size: 14px; }
.ct-promo-applied button { border: 0; background: none; color: #b42318; font-size: 14px; text-decoration: underline; cursor: pointer; }
.ct-totals .ct-discount { color: #1f7a3a; }
.ct-totals { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.ct-totals div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: #1f1a17; }
.ct-totals dd { text-align: right; }
.ct-totals .ct-grand { margin-top: 8px; font-size: 22px; font-weight: 700; }

.ct-form h2 { font-size: 19px; color: #5a4a40; margin: 26px 0 10px; }
.ct-field { margin-bottom: 14px; }
.ct-field label { display: block; font-weight: 600; font-size: 14px; color: #5a4a40; margin-bottom: 4px; }
.ct-field input, .ct-field select {
    width: 100%; padding: 13px 12px; font-size: 16px; /* 16px : évite le zoom automatique sur iPhone */
    border: 1px solid #d8cbbf; border-radius: 10px; background: #fff; color: #333;
}
.ct-field input:focus, .ct-field select:focus { outline: 2px solid #c4a57b; border-color: #8b7355; }
.ct-error { color: #b42318; font-size: 13px; margin-top: 4px; }
.ct-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ct-wa { display: flex; gap: 10px; align-items: center; margin: 4px 0 16px; padding: 12px; background: #fff; border: 1px solid #d8cbbf; border-radius: 10px; cursor: pointer; font-size: 15px; color: #5a4a40; }
.ct-wa input { width: 20px; height: 20px; accent-color: #25a244; flex: none; }
.ct-wa small { color: #8a7a70; }
.ct-hint { font-size: 13px; color: #8a7a70; text-align: center; margin-top: 10px; }

.ct-btn {
    display: block; width: 100%; padding: 14px 18px; font-size: 17px; font-weight: 700; color: #fff; background: #8b7355;
    border: 0; border-radius: 12px; cursor: pointer; text-align: center; text-decoration: none;
}
.ct-btn:hover { background: #7a6448; }
.ct-btn:disabled { opacity: .6; cursor: wait; }
.ct-empty { text-align: center; color: #6a5a50; padding: 30px 0; }
.ct-empty p { margin-bottom: 18px; font-size: 17px; }
.ct-empty .ct-btn { max-width: 320px; margin: 0 auto; }

/* Icône du header avec sa pastille */
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.cart-link { position: relative; display: inline-flex; color: #333; padding: 4px; }
.cart-link:hover { color: #8b7355; }
.cart-badge {
    position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: #8b7355; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.cart-badge[hidden] { display: none; }

/* Bouton « Ajouter au panier » (cartes produit et fiche produit) */
.cart-add-form { display: block; }
.cart-add {
    display: block; width: 100%; margin-top: 8px; padding: 10px 12px; font-size: 14px; font-weight: 700; color: #8b7355;
    background: #fff; border: 2px solid #8b7355; border-radius: 10px; cursor: pointer; pointer-events: auto;
    transition: background .15s, color .15s;
}
.cart-add:hover { background: #8b7355; color: #fff; }
.cart-add.is-added { background: #8b7355; color: #fff; }
.cart-add:disabled { opacity: .6; cursor: wait; }
/* Sur les cartes produit : posé en bas de la photo */
.cart-add--photo {
    position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 91; width: auto; margin: 0; padding: 9px 10px;
    font-size: 13px; color: #1f1a17; background: rgba(255,255,255,.92); border: 0; border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.cart-add--photo:hover { background: #1f1a17; color: #fff; }
.cart-add--photo.is-added { background: #8b7355; color: #fff; }
.product-image-wrapper:has(.cart-add--photo) .carousel-dots { bottom: 52px; }   /* points du diaporama au-dessus du bouton */
.cart-add--photo { display: flex; align-items: center; justify-content: center; gap: 6px; }
.cart-add-icon { flex: none; }
@media (max-width: 600px) {
    .cart-add--photo {
        left: auto; right: 8px; bottom: 8px; width: 40px; height: 40px; padding: 0; border-radius: 50%;
        background: #fff; color: #1f1a17;
    }
    .cart-add--photo .cart-add-label {   /* texte gardé pour les lecteurs d'écran */
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
    }
    .cart-add--photo:hover { background: #fff; color: #1f1a17; }
    .cart-add--photo.is-added { background: #8b7355; color: #fff; }
    .product-image-wrapper:has(.cart-add--photo) .carousel-dots { bottom: 10px; }
}
.order-section .cart-add, .product-mobile-order .cart-add { padding: 14px 18px; font-size: 17px; margin: 0 0 12px; }

/* Tiroir panier (s'ouvre à droite) */
.cd { position: fixed; inset: 0; z-index: 1000; }
.cd[hidden] { display: none; }
.cd-overlay { position: absolute; inset: 0; background: rgba(15,10,8,.45); opacity: 0; transition: opacity .25s; }
.cd-panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff;
    display: flex; flex-direction: column; padding: 18px 22px calc(18px + env(safe-area-inset-bottom, 0px));
    box-shadow: -6px 0 30px rgba(0,0,0,.15); transform: translateX(100%); transition: transform .25s ease;
}
.cd.open .cd-overlay { opacity: 1; }
.cd.open .cd-panel { transform: none; }
body.cd-locked { overflow: hidden; }
html[dir="rtl"] .cd-panel { right: auto; left: 0; transform: translateX(-100%); }
html[dir="rtl"] .cd.open .cd-panel { transform: none; }

.cd-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; }
.cd-title { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: 28px; color: #2b2420; }
.cd-count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: #ebe7e4; color: #2b2420; font-size: 14px; line-height: 26px; text-align: center; }
.cd-close { margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #2b2420; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cd-close:hover { background: #f3efec; }
.cd-notice { background: #fff4e5; border: 1px solid #f0d3a8; color: #8a5a14; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.cd-loading { color: #8a7a70; padding: 20px 0; text-align: center; }
.cd-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }

/* Lignes (tiroir et page panier) */
.cd-lines { list-style: none; }
.cd-line { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; }
.cd-line + .cd-line { border-top: 1px solid #eee7e2; }
.cd-thumb { flex: none; width: 64px; height: 64px; border-radius: 4px; overflow: hidden; background: #eee; display: flex; align-items: center; justify-content: center; font-size: 26px; text-decoration: none; }
.cd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cd-name { color: #2b2420; font-size: 16px; line-height: 1.3; text-decoration: none; }
.cd-name:hover { color: #8b7355; }
.cd-unit { color: #5a4a40; font-size: 14px; }
.cd-subtotal { flex: none; font-family: Georgia, 'Times New Roman', serif; color: #2b2420; font-size: 15px; white-space: nowrap; }
.cd-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.cd-qty { display: inline-flex; align-items: center; border: 1px solid #d9d2cc; height: 44px; }
.cd-qty form { display: flex; height: 100%; }
.cd-qty button { width: 40px; height: 100%; border: 0; background: transparent; color: #2b2420; font-size: 20px; cursor: pointer; }
.cd-qty button:hover:not(:disabled) { background: #f6f2ef; }
.cd-qty button:disabled { color: #c9c0b9; cursor: not-allowed; }
.cd-qty span { min-width: 30px; text-align: center; font-size: 16px; color: #2b2420; }
.cd-trash { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #2b2420; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cd-trash:hover { background: #f6f2ef; color: #b42318; }

/* Ligne passée à 0 avec « − » : gardée (le client a pu se tromper), mais grisée et hors total */
.cd-line.is-zero .cd-thumb, .cd-line.is-zero .cd-name, .cd-line.is-zero .cd-unit, .cd-line.is-zero .cd-subtotal { opacity: .45; }
.cd-checkout:disabled { opacity: .4; cursor: not-allowed; }
.cd-foot { border-top: 1px solid #eee7e2; padding-top: 18px; margin-top: 8px; }
.cd-discount { display: flex; justify-content: space-between; font-size: 14px; color: #1f7a3a; margin-bottom: 6px; }
.cd-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cd-total span { font-size: 15px; color: #2b2420; }
.cd-total strong { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: 26px; color: #2b2420; }
.cd-note { font-size: 12px; color: #6a5a50; margin: 6px 0 18px; }
.cd-checkout {
    display: block; width: 100%; padding: 16px 20px; border: 0; border-radius: 999px; background: #1f1a17; color: #fff;
    font-size: 17px; text-align: center; text-decoration: none; cursor: pointer;
}
.cd-checkout:hover { background: #3a312b; }
.cd-empty { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; text-align: center; color: #5a4a40; font-size: 17px; }

/* Fenêtre d'ajout rapide (cartes produit) : monte du bas sur téléphone, au centre sur PC */
.qa { position: fixed; inset: 0; z-index: 1001; display: flex; align-items: flex-end; justify-content: center; }
.qa[hidden] { display: none; }
.qa-overlay { position: absolute; inset: 0; background: rgba(15,10,8,.45); opacity: 0; transition: opacity .25s; }
.qa-sheet {
    position: relative; width: 100%; max-width: 480px; background: #fff; border-radius: 16px 16px 0 0;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 30px rgba(0,0,0,.15);
    transform: translateY(100%); transition: transform .25s ease;
}
.qa.open .qa-overlay { opacity: 1; }
.qa.open .qa-sheet { transform: none; }
@media (min-width: 601px) {
    .qa { align-items: center; }
    .qa-sheet { border-radius: 16px; transform: translateY(24px); opacity: 0; transition: transform .25s ease, opacity .25s ease; }
    .qa.open .qa-sheet { opacity: 1; }
}

.qa-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.qa-img { flex: none; width: 76px; height: 95px; object-fit: cover; background: #eee; }
.qa-img[hidden] { display: none; }
.qa-text { flex: 1; min-width: 0; }
.qa-name { color: #2b2420; font-size: 17px; line-height: 1.35; }
.qa-price { color: #5a4a40; font-size: 15px; margin-top: 6px; }
.qa-close { flex: none; width: 36px; height: 36px; margin: -6px -6px 0 0; border: 0; border-radius: 50%; background: transparent; color: #2b2420; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qa-close:hover { background: #f3efec; }

.qa-row { display: flex; gap: 8px; margin-bottom: 8px; }
.qa-qty { height: 52px; flex: none; }
.qa-qty button { width: 44px; }
.qa-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; padding: 0 18px;
    border: 0; border-radius: 999px; background: #000; color: #fff; font-size: 16px; cursor: pointer;
}
.qa-btn:hover { background: #2b2420; }
.qa-btn:disabled { opacity: .6; cursor: wait; }
.qa-add { flex: 1; }
.qa-error { color: #b42318; font-size: 14px; margin-top: 10px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .qa-sheet, .qa-overlay, .cd-panel, .cd-overlay { transition: none; } }

/* Livraison : domicile / bureau Yalidine, frais (delivery/includes/fields.html) */
.dl-modes { border: 0; padding: 0; min-width: 0; }
.dl-modes legend { font-weight: 600; font-size: 14px; color: #5a4a40; margin-bottom: 6px; padding: 0; }
.dl-modes .dl-mode { display: flex; font-weight: 400; gap: 10px; align-items: center; margin-bottom: 8px; padding: 12px; background: #fff; border: 1px solid #d8cbbf; border-radius: 10px; cursor: pointer; font-size: 15px; color: #5a4a40; }
.dl-modes .dl-mode[hidden] { display: none; }
.dl-modes .dl-mode:has(input:checked) { border-color: #8b7355; box-shadow: 0 0 0 1px #8b7355; }
.dl-modes .dl-mode input { width: 18px; height: 18px; padding: 0; border: 0; accent-color: #8b7355; flex: none; margin: 0; }
.dl-modes .dl-mode small { color: #8a7a70; }
.dl-fee { margin: -4px 0 14px; font-size: 14px; color: #5a4a40; }
.dl-fee:empty { display: none; }
/* Bureau choisi : où le client récupère son colis */
.dl-address { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 12px 14px; background: #fbf7f2; border: 1px solid #e6d5c3; border-left: 4px solid #8b7355; border-radius: 10px; color: #3d332c; }
.dl-address[hidden] { display: none; }
.dl-pin { flex: none; color: #b85c1e; margin-top: 2px; }
.dl-address > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-address-label { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #8a7a70; }
.dl-address-name { font-size: 16px; color: #1f1a17; }
.dl-address-street { font-size: 15px; line-height: 1.4; }
.dl-address-street[hidden], .dl-address-map[hidden] { display: none; }
.dl-address-map { margin-top: 4px; font-size: 14px; font-weight: 600; color: #b85c1e; text-decoration: underline; }

/* Offres par quantité : « Ajoutez encore 1 article… » (tiroir et page de commande), badge sur la fiche produit */
.offer-hint {
    margin: 0 0 10px; padding: 9px 12px; border-radius: 8px; background: #fff6e6; border: 1px dashed #e2b866;
    color: #7a4f06; font-size: 13px; line-height: 1.4;
}
.ct-summary-body .offer-hint { margin-top: 14px; }
.offer-badge {
    display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 12px;
    border-radius: 999px; background: #1f1a17; color: #fff; font-size: 13px; font-weight: 600;
}
.offer-badge small { font-weight: 400; opacity: .8; }

/* Type du produit sous son nom (tiroir, page de commande) — même style que sur les cartes produit */
.item-type {
    display: block; margin-top: 1px; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: #8a7f78;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
