/* === MODAL ULTRA-ÉPURÉ === */

/* Modal principal */
.modal {
    color: var(--text-primary);
}

.modal-dialog {
    margin: 3rem auto;
    max-width: 1100px;
}

.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.modal-header {
    background: var(--white);
    border: none;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    opacity: 1;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close::before {
    content: "×";
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

.btn-close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 1rem 2rem 1.5rem 2rem;
    background: var(--white);
}

/* Cards des adresses - Style minimaliste */
.first-address-delivery {
    margin-bottom: 0.75rem;
}

.first-address-delivery .card {
    border: 1px solid var(--border-light);
    border-radius: 6px;
    box-shadow: none;
    transition: border-color 0.2s ease;
    overflow: hidden;
    background: var(--white);
}

.first-address-delivery .card-body {
    padding: 0.8rem 1rem;
    background: var(--white);
}

.first-address-delivery .card-body p {
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.first-address-delivery .card:hover {
    border-color: var(--primary-green);
}

.first-address-delivery .card-header {
    background: var(--white);
    border: none;
    border-bottom: 1px solid var(--border-light);
    padding: 0.6rem 1rem;
    text-align: left;
    font-size: 0.9rem;
    margin: 0;
}

.home-address {
    padding: 1.25rem;
    text-align: left;
}

.home-address i {
    display: none;
}

.informations-address {
    line-height: 1.5;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.informations-address span {
    display: block;
    margin-bottom: 0.15rem;
}

/* Labels des champs d'adresse */
.address-field {
    margin-bottom: 1rem;
}

.field-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
    opacity: 0.8;
}

.address-field span:not(.field-label) {
    display: inline;
    margin-right: 0.3rem;
}

.companyname-address {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.5rem !important;
}

.firstname-address, .name-address {
    font-weight: 400;
}

.tel-address {
    color: var(--primary-green);
    font-weight: 400;
    margin-top: 0.5rem !important;
}

/* Footer ultra-simple */
.modal-footer {
    border: none;
    padding: 0.5rem 2rem 1.5rem 2rem;
    gap: 0.5rem;
}


/* Formulaires épurés */
.section-newAddressDelivery .form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.section-newAddressDelivery .form-control,
.section-newAddressDelivery .form-select {
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s ease;
    font-size: 0.9rem;
}

.section-newAddressDelivery .form-control:focus,
.section-newAddressDelivery .form-select:focus {
    border-color: var(--primary-green);
    box-shadow: none;
    outline: none;
}

.title-dataAddressDelivery {
    color: var(--text-primary);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
}

.businessHours {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.modalPrefDelivery {
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .first-address-delivery {
        margin-bottom: 0.75rem;
    }
}

/* // Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    /** MODAL **/
    .modal {
        color: #212529;
    }

    .modal-body {
        padding: 1rem 0 0 0;
    }

    .modal-content {
        margin-top: 50px;
    }

    .modal-btn-close {
        font-size: 1.7rem;
    }
    .BtnModalProduct{
        border-bottom: none !important;
    }

    /** body modal **/
    .modal-body .product-name {
        font-size: 2.3rem;

    }

    .product-refs {
        margin-bottom: 20px;
        margin-top: 20px;
    }

    .product-refs p {
        border: 1px solid gray;
        border-radius: 30px;
        border: none;
        background: rgb(237, 241, 252);
        color: gray;
        padding: 5px 15px;
    }

    .product-grid .add-to-cart {
        font-size: 8px;
    }

    .productPricePublicModal {
        font-size: 1.5rem !important;
        font-weight: bold !important;
    }

    .productPriceModal {
        font-size: 3rem !important;
        color: #81a53a;
        font-weight: bold !important;
    }

    /** prices **/
    .textPricePublicModal, .textPriceModal {
        padding: 0 !important;
    }

    .textPricePublicModal p {
        color: #5a5959;
    }

    .textPricePublicModal span {
        font-weight: 500;
    }

    .product-availability {
        color: #297529;
    }

    .message-no-quantity {
        background: #f2f3f7;
        padding: 20px 0 20px 0;
        width: 80%;
        text-align: center;
    }

    .modal-dluc {
        border: 1px gray solid;
        border-radius: 25px;
        padding: 7px 15px;
        margin-left: 5px;
    }

    .lotNumberModal {
        opacity: .6;
        font-size: .8rem;
        position: relative;
        left: 50%;
        transform: translateX(-29%);
        margin-bottom: 0;
        margin-top: 8px;
    }

    .productPricePublicModal, .product-price {
        margin: 0 0 3rem 0 !important;
    }

    .product-publicPrice {
        font-size: 3rem !important;
    }

    .product-dlu {
        padding-left: 0;
        margin-bottom: 1.5rem;
    }

    .product-desc img {
        max-width: 100%;
        height: auto;
    }


    .productStock p {
        margin-bottom: 1.5rem;
    }

    .price-htva {
        font-size: .9rem;
    }

    /** input cart modal **/
    .modal .quantityInput {
        padding: 20px;
    }

    .productContainer {
        background: #f2f3f7 !important;
    }

    .productListInfo {
        padding-top: 40px;
    }


    .section-more-desc {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        position: relative;
        scrollbar-width: thin;
        scrollbar-color: #000000 #ffffff;
    }

    .section-more-desc::-webkit-scrollbar {
        height: 2px;
    }

    .section-more-desc::-webkit-scrollbar-track {
        background: #212529;
        border: 1px solid #212529;
        border-radius: 20px;
    }

    .section-more-desc::-webkit-scrollbar-thumb {
        background-color: #212529;
        border-radius: 2px;
    }

    .section-more-desc .btnLink {
        flex: 0 0 auto;
    }

    /*.newAddressModal{*/
    /*    margin-left: 45px;*/
    /*    width: 90% !important;*/
    /*}*/

    .hourlyweek{
        margin-left: 3px !important;
    }

    .daySpacement{
        margin-left: 3px !important;
    }
    .modalPrefDelivery{
        background-color: white;
        border-bottom: 1px solid #cccccc;
        border-top: 1px solid #cccccc;
    }

    /** end body modal **/

    .labelControleClient{
        font-size: 1.2em;
    }

    .selectControleClient:focus {
        outline: none;
    }

    .titleControleClient{
        font-size: 1.6em;
    }
    /** end MODAL **/

    /** start modal tarif **/
    .modalPartPdfTarif{
        width: 60%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .modalPartExcelTarif{
        width: 40%;
    }
    .modalTarifNM_Jacob_Olivie{
        width: 80%;
    }
    /** end modal tarif **/
}

/* // Medium devices (tablets, 768px and up) */
@media (min-width: 992px) and (max-width: 1200px) {
    .modal-dluc {
        border: 1px gray solid;
        border-radius: 25px;
        padding: 7px 15px;
        display: flex;
        flex-direction: column;
    }
    .modalTarifNM_Jacob_Olivie{
        width: 80%;
    }
}

/* // Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .productListInfo, .productInfo {
        margin-left: 50px;
        margin-right: 50px;
    }
    .modalTarifNM_Jacob_Olivie{
        width: 80%;
    }
}

/* // X-Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .productListInfo, .productInfo {
        margin-left: 60px;
        margin-right: 60px;
    }
    .modalTarifNM_Jacob_Olivie{
        width: 80%;
    }
}

/* // XX-Large devices (larger desktops, 1400px and up) */
@media (max-width: 991px) {
    .prixTarifProModal{
        justify-content: center;
        width: 100%;
    }
    .modalTarifNM_Jacob_Olivie{
        width: 80%;
        display: flex;
        text-align: center !important;
        justify-content: center !important;
        flex-direction: column;
    }
    .ModalPartSupProduct{
        display: flex;
        flex-direction: column !important;
    }
    .modal-dluc {
        border: 1px gray solid;
        border-radius: 25px;
        padding: 7px 15px;
        display: flex;
        flex-direction: column;
    }

    .brandProductModal, .product-refs , .product-header h1 {
        margin-left: 25px;
    }
    .modalUpQuantityItem{
        margin-left: 25px;
    }
    .daysAdressResponsive{
        display: flex;
        flex-direction: column !important;
    }
}
@media (max-width: 768px) {
    .modalUpQuantityItem{
        width: 90% !important;
    }
    .modalTarifNM_Jacob_Olivie{
        width: 100%;
        display: flex;
        text-align: center !important;
        justify-content: center;
        flex-direction: column;
    }
}

/* === DELIVERY PREFERENCES MODERN STYLES === */

/* Section headers */
.delivery-section-header {
    text-align: center;
    margin: 2rem 0 1.5rem 0;
}

.delivery-section-header .section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.delivery-section-header .section-title i {
    color: var(--primary-green);
}

/* Days grid container */
.delivery-days-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Time picker section */
.time-picker-section {
    border-radius: 12px;
    margin-top: 1rem;
}

.time-picker-label {
    text-align: center;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.time-picker-label i {
    color: var(--primary-green);
    font-size: 1.1rem;
}

.time-picker-container {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.time-input {
    min-width: 160px;
    position: relative;
}

.time-input .modern-input[type="time"] {
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    padding: 1rem;
    color: var(--text-primary);
    background: var(--white);
    border: 2px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.time-input .modern-input[type="time"]:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
    background: rgba(248, 255, 252, 0.5);
}

.time-input .modern-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* === DELIVERY TABLE MODERN STYLES === */

/* Table container */
.days-addresDelivery {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin: 0;
}

/* Modern table styling */
.table-borderless {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table-borderless thead th {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-100));
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1.2rem 1rem;
    border: none;
    position: relative;
}

.table-borderless thead th:first-child {
    border-top-left-radius: 12px;
}

.table-borderless thead th:last-child {
    border-top-right-radius: 12px;
}

.table-borderless thead th p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.table-borderless thead th i {
    font-size: 1rem;
    opacity: 0.9;
}

.table-borderless tbody tr {
    background: var(--white);
    transition: all 0.3s ease;
}

.table-borderless tbody tr:hover {
    background: rgba(5, 150, 105, 0.02);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table-borderless tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.5);
}

.table-borderless tbody tr:nth-child(even):hover {
    background: rgba(5, 150, 105, 0.03);
}

.table-borderless tbody td {
    padding: 1.5rem 1rem;
    border: none;
    vertical-align: middle;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.table-borderless tbody tr:last-child td {
    border-bottom: none;
}

/* Checkbox styling in table */
.table-borderless .form-check {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding-left: 1rem;
}

.table-borderless .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-medium);
    border-radius: 6px;
    background: var(--white);
    transition: all 0.3s ease;
}

.table-borderless .form-check-input:checked {
    background: var(--primary-green);
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.table-borderless .form-check-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin: 0;
}

/* Time inputs in table */
.morningInputs, .afternoonInputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.timeDeliveryInput {
    width: 95px;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    background: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.timeDeliveryInput:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
    background: rgba(248, 255, 252, 0.5);
}

.morningInputs .mx-2, .afternoonInputs .mx-2 {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(5, 150, 105, 0.08);
    padding: 0.4rem 0.6rem;
    border-radius: 20px;
    min-width: 24px;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .days-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .days-addresDelivery {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .table-borderless thead th,
    .table-borderless tbody td {
        padding: 1rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .timeDeliveryInput {
        width: 85px;
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .morningInputs, .afternoonInputs {
        gap: 0.5rem;
    }
    
    .time-picker-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .time-input {
        min-width: 100%;
    }
    
    .time-separator {
        margin: 0;
    }
    
    .delivery-days-container {
        padding: 1rem;
    }
}

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