/**
 * Styles pour la modale Paniers Gourmands
 * Les Écrins de la Haute-Ville
 */

/* Overlay de la modale */
.gourmet-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(27, 54, 93, 0.7);
    backdrop-filter: blur(6px);
    padding: 1rem;
    overflow-y: auto;
}

.gourmet-modal-overlay.open {
    display: flex;
}

/* Container de la modale */
.gourmet-modal-container {
    width: 100%;
    max-width: 950px;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenu de la modale */
.gourmet-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.gourmet-modal-header {
    position: relative;
    padding: 1.25rem 4rem 1.25rem 2rem;
    background: linear-gradient(135deg, #7BA3C720, #7BA3C710);
    border-bottom: 2px solid #7BA3C7;
}

.gourmet-modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: #7BA3C7;
    margin: 0 0 0.25rem 0;
    font-style: italic;
}

.gourmet-modal-subtitle {
    font-size: 0.875rem;
    color: #6b6560;
    margin: 0;
    line-height: 1.3;
}

.gourmet-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #A89F91;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 0;
    transition: color 0.2s, transform 0.2s;
    border-radius: 6px;
}

.gourmet-modal-close:hover {
    color: #1B365D;
    background: rgba(123, 163, 199, 0.1);
    transform: rotate(90deg);
}

/* Body */
.gourmet-modal-body {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Grille des paniers */
.baskets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Carte de panier */
.basket-card {
    background: #fff;
    border: 2px solid #e2e0db;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.basket-card:hover {
    border-color: #7BA3C7;
    box-shadow: 0 10px 25px rgba(123, 163, 199, 0.15);
    transform: translateY(-4px);
}

.basket-card.selected {
    border-color: #7BA3C7;
    border-width: 3px;
    box-shadow: 0 8px 30px rgba(123, 163, 199, 0.25);
    background: linear-gradient(135deg, #7BA3C708, #fff);
}

/* Image du panier */
.basket-image-container {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #f5f1e8;
}

.basket-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.basket-card:hover .basket-image {
    transform: scale(1.08);
}

.basket-price-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #7BA3C7;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.125rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Contenu de la carte */
.basket-content {
    padding: 0.875rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.basket-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1B365D;
    margin: 0 0 0.375rem 0;
    line-height: 1.2;
}

.basket-description {
    color: #57534e;
    font-size: 0.75rem;
    line-height: 1.4;
    margin: 0 0 0.75rem 0;
    flex: 1;
}

/* Actions */
.basket-actions {
    display: flex;
    gap: 0.5rem;
}

.basket-add-btn,
.basket-remove-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.basket-add-btn {
    background: #7BA3C7;
    color: white;
    box-shadow: 0 4px 12px rgba(123, 163, 199, 0.3);
}

.basket-add-btn:hover {
    background: #6a92b6;
    box-shadow: 0 6px 18px rgba(123, 163, 199, 0.4);
    transform: translateY(-1px);
}

.basket-remove-btn {
    background: #f5f1e8;
    color: #A89F91;
    border: 2px solid #e2e0db;
}

.basket-remove-btn:hover {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

/* Classe hidden uniquement pour les boutons de la modale */
.basket-add-btn.hidden,
.basket-remove-btn.hidden {
    display: none !important;
}

/* Récapitulatif */
.baskets-summary {
    background: linear-gradient(135deg, #7BA3C715, #7BA3C708);
    border: 2px solid #7BA3C7;
    border-radius: 10px;
    padding: 1.25rem 1.75rem;
    margin-top: 1rem;
}

.summary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-content span:first-child {
    font-weight: 600;
    color: #1B365D;
    font-size: 1.125rem;
}

.summary-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #7BA3C7;
}

/* Footer */
.gourmet-modal-footer {
    padding: 1.5rem 2rem;
    background: #fafaf9;
    border-top: 1px solid #e7e5e4;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.skip-button,
.continue-button {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skip-button {
    background: transparent;
    color: #A89F91;
    border: 2px solid #e2e0db;
}

.skip-button:hover {
    background: #f5f1e8;
    border-color: #A89F91;
    color: #57534e;
}

.continue-button {
    background: #7BA3C7;
    color: white;
    box-shadow: 0 4px 14px rgba(123, 163, 199, 0.3);
}

.continue-button:hover {
    background: #6a92b6;
    box-shadow: 0 6px 20px rgba(123, 163, 199, 0.4);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 1024px) {
    .baskets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .baskets-grid {
        grid-template-columns: 1fr;
    }

    .basket-image-container {
        height: 200px;
    }

    .gourmet-modal-header {
        padding: 1.5rem 3rem 1.5rem 1.5rem;
    }

    .gourmet-modal-title {
        font-size: 1.75rem;
    }

    .gourmet-modal-subtitle {
        font-size: 0.9375rem;
    }

    .gourmet-modal-body {
        padding: 1.5rem;
    }

    .gourmet-modal-footer {
        flex-direction: column;
        padding: 1rem 1.5rem;
    }

    .skip-button,
    .continue-button {
        width: 100%;
        justify-content: center;
    }
}

/* Animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gourmet-modal-overlay.open .gourmet-modal-content {
    animation: slideInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
