/* Styles pour le modal des options de produits - Design moderne */

/* Overlay du modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(8px);
}

/* Contenu du modal */
.modal-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Animation d'entrée */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* En-tête du modal */
.modal-header {
    background: transparent;
    color: #1a1a1a;
    padding: 24px 24px 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a1a;
}

.modal-product-icon {
    font-size: 20px;
}

.modal-close {
    background: #f5f5f5;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 300;
}

.modal-close:hover {
    background: #e5e5e5;
    color: #333;
}

/* Corps du modal */
.modal-body {
    padding: 24px;
    max-height: calc(85vh - 140px);
    overflow-y: auto;
    flex: 1;
}


.prix-base {
    color: #8b4513;
    font-size: 16px;
}

.prix-total {
    color: #a67c52;
    font-size: 18px;
    font-weight: 700;
}

/* Options dans le modal */
.modal-options-section {
    margin-bottom: 20px;
}

.modal-options-title {
    font-size: 16px;
    font-weight: 600;
    color: #8b4513;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.modal-option-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    position: relative;
}

.modal-option-item:hover {
    border-color: #a67c52;
    background: #fafafa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.modal-option-item input[type="radio"],
.modal-option-item input[type="checkbox"] {
    margin: 0 12px 0 0;
    width: 20px;
    height: 20px;
    accent-color: #a67c52;
    cursor: pointer;
}

.modal-option-item:has(input:checked) {
    border-color: #a67c52;
    background: #f8f6f3;
    box-shadow: 0 2px 12px rgba(166, 124, 82, 0.15);
}

.modal-option-label {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.4;
}

.modal-option-prix {
    font-size: 14px;
    color: #a67c52;
    font-weight: 700;
    margin-left: 8px;
    background: rgba(166, 124, 82, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
}

/* Sauces frites dans le modal */
.modal-sauces-frites {
    animation: modalSlideDown 0.3s ease-out;
}

@keyframes modalSlideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 300px;
        padding-top: 12px;
        padding-bottom: 12px;
        margin-bottom: 20px;
    }
}

/* Pied de page du modal */
.modal-footer {
    padding: 20px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #fafafa;
}

.modal-footer-buttons {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.modal-product-prix {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-modal-cancel,
.btn-modal-validate {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    min-height: 48px;
}

.btn-modal-cancel {
    background: #f5f5f5;
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-modal-cancel:hover {
    background: #e8e8e8;
    color: #333;
}

.btn-modal-validate {
    background: #a67c52;
    color: white;
    box-shadow: 0 2px 8px rgba(166, 124, 82, 0.2);
}

.btn-modal-validate:hover {
    background: #8b4513;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(166, 124, 82, 0.3);
}

/* Indicateurs d'options sur les cartes */
.options-indicator {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.option-badge {
    background: #f0e6d6;
    color: #8b4513;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #e8d5c4;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 5px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .modal-content {
        max-width: none;
        width: 100%;
        max-height: 85vh;
        margin-top: 0;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-title {
        font-size: 16px;
    }
    
    .modal-product-icon {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 12px 15px;
        max-height: calc(85vh - 140px);
        overflow-y: auto;
        flex: 1;
    }
    
    
    .modal-options-section {
        margin-bottom: 15px;
    }
    
    .modal-options-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .modal-footer {
        padding: 12px 15px;
        flex-direction: column;
        gap: 12px;
        position: sticky;
        bottom: 0;
        background: #f8f1ea;
        border-top: 1px solid #e8d5c4;
        margin-top: auto;
    }
    
    .modal-footer-buttons {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .btn-modal-cancel,
    .btn-modal-validate {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 14px;
        border-radius: 8px;
        font-weight: 600;
    }
    
    .btn-modal-validate {
        order: -1;
    }
    
    .modal-option-item {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .modal-option-item input[type="radio"],
    .modal-option-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-right: 10px;
    }
    
    .modal-product-prix {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .prix-total {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 3px;
        padding-top: 10px;
    }
    
    .modal-content {
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 10px 12px;
    }
    
    .modal-title {
        font-size: 15px;
    }
    
    .modal-product-icon {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 10px 12px;
        max-height: calc(100vh - 180px);
        padding-bottom: 80px;
    }
    
    
    .modal-options-section {
        margin-bottom: 12px;
    }
    
    .modal-options-title {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .modal-footer {
        padding: 10px 12px;
        gap: 12px;
        flex-direction: column;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #f8f1ea;
        border-top: 2px solid #e8d5c4;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    
    .modal-footer-buttons {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .btn-modal-cancel,
    .btn-modal-validate {
        padding: 12px 16px;
        font-size: 14px;
        width: 100%;
        border-radius: 8px;
        font-weight: 600;
    }
    
    .btn-modal-validate {
        order: -1;
        background: #a67c52;
        color: white;
    }
    
    .btn-modal-cancel {
        background: #e8d5c4;
        color: #8b4513;
    }
    
    .modal-option-item {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .modal-option-item input[type="radio"],
    .modal-option-item input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin-right: 8px;
    }
    
    .modal-option-prix {
        font-size: 12px;
    }
    
    .prix-base {
        font-size: 14px;
    }
    
    .prix-total {
        font-size: 15px;
    }
}

/* Animation de fermeture */
.modal-overlay.closing {
    animation: modalFadeOut 0.2s ease-in forwards;
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
