/* articles.css — Page Articles : actions WhatsApp + panier de sélection */

/* Overlay (catégorie/desc) remonté pour ne pas chevaucher les boutons */
.gallery-item .gallery-thumb .gallery-overlay {
    padding-bottom: 60px;
}

/* ===== ACTIONS PAR ARTICLE (boutons complets avec texte) ===== */
.gallery-actions {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 8px;
    z-index: 3;
    pointer-events: none;
}
.gallery-actions .ga-btn {
    pointer-events: auto;
}
.ga-btn {
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border-radius: 100px;
    border: none;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--mpat-purple);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font: 600 0.74rem/1 'Poppins', sans-serif;
    letter-spacing: 0.01em;
    box-shadow: 0 6px 18px rgba(123, 45, 139, 0.28);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ga-btn:hover {
    transform: translateY(-1px);
    background: var(--mpat-pink);
    color: white;
    box-shadow: 0 8px 22px rgba(233, 30, 140, 0.4);
}
.ga-btn .ga-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ga-btn svg,
.ga-btn i[data-lucide] { width: 14px; height: 14px; flex-shrink: 0; }

/* WhatsApp à gauche : vert plein */
.ga-btn.ga-whatsapp {
    background: #25D366;
    color: white;
}
.ga-btn.ga-whatsapp:hover {
    background: #128C7E;
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.5);
}

/* Add à droite : blanc, devient rose quand sélectionné */
.ga-btn.ga-add.is-added {
    background: var(--mpat-pink);
    color: white;
}
.ga-btn.ga-add.is-added:hover {
    background: var(--mpat-purple);
    box-shadow: 0 8px 22px rgba(123, 45, 139, 0.5);
}

/* Tablet/Mobile : labels plus courts via data-attribute */
@media (max-width: 640px) {
    .ga-btn {
        height: 34px;
        padding: 0 8px;
        font-size: 0.7rem;
        gap: 4px;
    }
    .ga-btn svg,
    .ga-btn i[data-lucide] { width: 13px; height: 13px; }
    .gallery-actions { bottom: 8px; left: 8px; right: 8px; gap: 6px; }
}

/* ===== PANIER FLOTTANT ===== */
.cart-fab {
    position: fixed;
    bottom: 100px;
    right: 31px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--mpat-pink) 0%, var(--mpat-purple) 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(123, 45, 139, 0.35);
    z-index: 998;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}
.cart-fab.visible {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}
.cart-fab:hover {
    transform: scale(1.06);
    box-shadow: 0 12px 32px rgba(233, 30, 140, 0.45);
}
.cart-fab svg { width: 24px; height: 24px; }
.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: white;
    color: var(--mpat-pink);
    font: 700 0.78rem/22px 'Poppins', sans-serif;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--mpat-pink);
}

/* ===== PANNEAU PANIER ===== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 10, 30, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.cart-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: white;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    box-shadow: -12px 0 40px rgba(123, 45, 139, 0.18);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.cart-panel.open {
    transform: translateX(0);
}
.cart-header {
    padding: 22px 24px;
    border-bottom: 1px solid rgba(233, 30, 140, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(252, 228, 243, 0.6) 0%, rgba(248, 236, 247, 0.4) 100%);
}
.cart-header h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mpat-purple);
    margin: 0;
}
.cart-header p {
    font: 400 0.78rem/1.4 'Poppins', sans-serif;
    color: var(--mpat-text-light);
    margin: 2px 0 0;
}
.cart-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--mpat-purple);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background 0.2s ease, color 0.2s ease;
}
.cart-close:hover { background: var(--mpat-pink); color: white; }

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--mpat-text-light);
}
.cart-empty .lucide-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--mpat-pink-pale);
    color: var(--mpat-pink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.cart-empty .lucide-icon-wrap svg { width: 28px; height: 28px; }
.cart-empty h4 {
    font: 600 1.1rem/1.3 'Poppins', sans-serif;
    color: var(--mpat-purple);
    margin: 0 0 6px;
}
.cart-empty p {
    font: 400 0.88rem/1.5 'Poppins', sans-serif;
    margin: 0;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(233, 30, 140, 0.08);
    align-items: center;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--mpat-bg);
}
.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cart-item-info {
    flex: 1;
    min-width: 0;
}
.cart-item-name {
    font: 600 0.9rem/1.3 'Poppins', sans-serif;
    color: var(--mpat-purple);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}
.cart-item-cat {
    font: 400 0.72rem/1 'Poppins', sans-serif;
    color: var(--mpat-pink);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}
.cart-item-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--mpat-bg);
    color: var(--mpat-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}
.cart-item-remove:hover { background: #fee2e2; color: #dc2626; }
.cart-item-remove svg { width: 16px; height: 16px; }

.cart-footer {
    padding: 18px 24px 22px;
    border-top: 1px solid rgba(233, 30, 140, 0.12);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: white;
}
.cart-clear {
    background: transparent;
    color: var(--mpat-text-light);
    border: 1px solid rgba(107, 74, 122, 0.2);
    padding: 10px 16px;
    border-radius: 100px;
    font: 500 0.85rem/1 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.cart-clear:hover { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.cart-send {
    width: 100%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    text-align: center;
    padding: 14px 20px;
    border-radius: 100px;
    font: 600 0.95rem/1 'Poppins', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cart-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.42);
}
.cart-send svg { width: 18px; height: 18px; }
.cart-send.disabled {
    background: #d1d5db;
    color: #6b7280;
    box-shadow: none;
    pointer-events: none;
}

/* ===== TOAST FEEDBACK ===== */
.cart-toast {
    position: fixed;
    bottom: 170px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--mpat-purple);
    color: white;
    padding: 12px 20px;
    border-radius: 100px;
    font: 500 0.85rem/1 'Poppins', sans-serif;
    box-shadow: 0 8px 24px rgba(123, 45, 139, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1002;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.cart-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.cart-toast svg { width: 16px; height: 16px; }

/* ===== HOMEPAGE ARTICLES TEASER ===== */
.articles-teaser-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 640px) {
    .articles-teaser-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    .articles-teaser-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}
.article-teaser-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(123, 45, 139, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(233, 30, 140, 0.08);
    display: flex;
    flex-direction: column;
}
.article-teaser-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(123, 45, 139, 0.18);
}
.article-teaser-img {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--mpat-bg);
}
.article-teaser-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.article-teaser-card:hover .article-teaser-img img { transform: scale(1.06); }
.article-teaser-body {
    padding: 12px 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.article-teaser-cat {
    font: 600 0.65rem/1 'Poppins', sans-serif;
    color: var(--mpat-pink);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.article-teaser-name {
    font: 600 0.88rem/1.3 'Poppins', sans-serif;
    color: var(--mpat-purple);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] .cart-panel { background: #1f1023; }
[data-theme="dark"] .cart-header { background: linear-gradient(135deg, rgba(233, 30, 140, 0.12) 0%, rgba(123, 45, 139, 0.12) 100%); border-bottom-color: rgba(233, 30, 140, 0.2); }
[data-theme="dark"] .cart-header h3 { color: var(--mpat-pink-light); }
[data-theme="dark"] .cart-close { background: #2a1631; color: var(--mpat-pink-light); }
[data-theme="dark"] .cart-item { border-bottom-color: rgba(233, 30, 140, 0.15); }
[data-theme="dark"] .cart-item-name { color: var(--mpat-text-light); }
[data-theme="dark"] .cart-item-img { background: #2a1631; }
[data-theme="dark"] .cart-item-remove { background: #2a1631; color: var(--mpat-text-light); }
[data-theme="dark"] .cart-footer { background: #1f1023; border-top-color: rgba(233, 30, 140, 0.2); }
[data-theme="dark"] .ga-btn { background: rgba(42, 22, 49, 0.95); color: var(--mpat-pink-light); }
[data-theme="dark"] .article-teaser-card { background: #2a1631; border-color: rgba(233, 30, 140, 0.15); }
[data-theme="dark"] .article-teaser-name { color: var(--mpat-text-light); }
