/* NTX Plateaux Widget - Styles */

.ntx-plateaux-widget {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* En-tête */
.ntx-plateaux-header {
    text-align: center;
    margin-bottom: 30px;
}

.ntx-plateaux-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 15px 0;
    line-height: 1.2;
}

.ntx-plateaux-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Onglets des semaines */
.ntx-week-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    /*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/
}

.ntx-week-tab {
    flex: 1;
    max-width: 150px;
    padding: 12px 24px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border-right: 1px solid #e5e7eb;
}

.ntx-week-tab:last-child {
    border-right: none;
}

.ntx-week-tab:hover {
    background: #e5e7eb;
    color: #374151;
}

.ntx-week-tab.active {
    background: #1f2937;
    color: white;
    font-weight: 600;
}

/* Contenu des plateaux */
.ntx-plateaux-content {
    position: relative;
}

.ntx-week-content {
    display: none;
}

.ntx-week-content.active {
    display: block;
}

/* Grille des plateaux */
.ntx-plateaux-grid {
    display: grid;
    gap: 20px;
}

.ntx-plateaux-grid.columns-1 {
    grid-template-columns: 1fr;
}

.ntx-plateaux-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ntx-plateaux-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ntx-plateaux-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Cartes des plateaux */
.ntx-plateau-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    cursor: pointer;
}

.ntx-plateau-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border-color: #2563eb;
}

.ntx-plateau-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ntx-plateau-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Image du plateau */
.ntx-plateau-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.ntx-plateau-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ntx-plateau-card:hover .ntx-plateau-image img {
    transform: scale(1.05);
}

/* En-tête de la carte */
.ntx-plateau-header {
    padding: 20px 20px 15px 20px;
}

.ntx-plateau-name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.ntx-composition-title {
    font-size: 14px;
    font-weight: 500;
    color: #2563eb;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Composition du plateau */
.ntx-plateau-composition {
    padding: 0 20px 15px 20px;
}

.ntx-composition-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.ntx-composition-item:last-child {
    margin-bottom: 0;
}

.ntx-composition-label {
    color: #1f2937;
    font-weight: 500;
    margin-right: 4px;
    flex-shrink: 0;
}

.ntx-composition-value {
    color: #4b5563;
}

/* Section quantité */
.ntx-plateau-quantity {
    padding: 15px 20px 20px 20px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ntx-plateau-quantity label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
}

.ntx-quantity-input {
    width: 60px;
    height: 36px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.ntx-quantity-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Note allergènes */
.ntx-allergenes-note {
    margin-top: 30px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.ntx-allergenes-note p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* Responsive Design */

/* Tablette */
@media (max-width: 1024px) {
    .ntx-plateaux-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ntx-plateaux-grid.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ntx-week-tabs {
        flex-wrap: wrap;
    }
    
    .ntx-week-tab {
        flex: 1;
        min-width: 120px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .ntx-plateaux-widget {
        padding: 15px;
    }
    
    .ntx-plateaux-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .ntx-plateaux-title {
        font-size: 24px;
    }
    
    .ntx-week-tabs {
        flex-direction: column;
        gap: 1px;
    }
    
    .ntx-week-tab {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .ntx-week-tab:last-child {
        border-bottom: none;
    }
    
    .ntx-plateau-image {
        height: 180px;
    }
    
    .ntx-plateau-header {
        padding: 15px 15px 10px 15px;
    }
    
    .ntx-plateau-composition {
        padding: 0 15px 10px 15px;
    }
    
    .ntx-plateau-quantity {
        padding: 10px 15px 15px 15px;
    }
}

@media (max-width: 480px) {
    .ntx-plateaux-widget {
        padding: 10px;
    }
    
    .ntx-plateau-image {
        height: 160px;
    }
    
    .ntx-plateau-name {
        font-size: 16px;
    }
    
    .ntx-composition-title {
        font-size: 13px;
    }
}

/* États de chargement */
.ntx-plateaux-widget.loading {
    opacity: 0.6;
    pointer-events: none;
}

.ntx-plateaux-widget.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
.ntx-plateau-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Décalage des animations pour un effet en cascade */
.ntx-plateau-card:nth-child(1) { animation-delay: 0.1s; }
.ntx-plateau-card:nth-child(2) { animation-delay: 0.2s; }
.ntx-plateau-card:nth-child(3) { animation-delay: 0.3s; }
.ntx-plateau-card:nth-child(4) { animation-delay: 0.4s; }
.ntx-plateau-card:nth-child(5) { animation-delay: 0.5s; }
.ntx-plateau-card:nth-child(6) { animation-delay: 0.6s; }