/* =====================================================
   DZOP V2 – FORMULAIRE
===================================================== */

#dzop-v2-form {
    max-width: 500px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
}

#dzop-v2-form label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
}

#dzop-v2-form input,
#dzop-v2-form select {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#dzop-v2-form button {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

#dzop-v2-form button:hover {
    background: #000;
}


/* =====================================================
   DZOP – FEEDBACK VISUEL (SCROLL / FOCUS)
===================================================== */

#dzop-v2-form.dzop-focus {
    outline: 2px solid #111;
    outline-offset: 6px;
    transition: outline .3s ease;
}

#dzop-v2-form.dzop-highlight {
    animation: dzopFlash 1.2s ease;
    box-shadow: 0 0 0 3px #111;
}

@keyframes dzopFlash {
    0%   { background: #fff; }
    50%  { background: #f7f7f7; }
    100% { background: #fff; }
}





/* =====================================================
   WOO – BOUTON AJOUTER AU PANIER (DISCRET)
===================================================== */

.single-product form.cart {
    margin-top: 20px;
    text-align: right;
}

.single-product form.cart .single_add_to_cart_button {
    padding: 8px 12px !important;
    font-size: 0 !important;
    background: #111;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.single-product form.cart .single_add_to_cart_button::before {
    content: "🛒";
    font-size: 16px;
    color: #fff;
}

.single-product form.cart .single_add_to_cart_button:hover {
    background: #000;
}


/* =====================================================
   MOBILE ONLY
===================================================== */

@media (max-width: 768px) {

    /* Bouton Woo encore plus discret */
    .single-product form.cart .single_add_to_cart_button {
        padding: 6px 8px !important;
    }

    /* Sticky CTA Commander */
    #dzop-sticky-cta {
        position: fixed;
        bottom: 12px;
        left: 12px;
        right: 12px;
        z-index: 9999;
    }

    #dzop-sticky-cta button {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        font-weight: 600;
        background: #111;
        color: #fff;
        border-radius: 10px;
        border: none;
        box-shadow: 0 6px 20px rgba(0,0,0,.25);
    }
}


/* =====================================================
   DESKTOP
===================================================== */

@media (min-width: 769px) {
    #dzop-sticky-cta {
        display: none;
    }
}

/* =========================================
   STICKY INTELLIGENT – MOBILE
========================================= */

@media (max-width: 768px) {

    #dzop-sticky-cta {
        position: fixed;
        bottom: 12px;
        left: 12px;
        right: 12px;
        z-index: 99999;
        transition: transform .3s ease, opacity .3s ease;
    }

    #dzop-sticky-cta.is-hidden {
        opacity: 0;
        transform: translateY(120%);
        pointer-events: none;
    }
}

/* =========================================
   MODE DE LIVRAISON – ALIGNEMENT PROPRE
========================================= */

#dzop-v2-form .dzop-delivery {
    margin-top: 16px;           /* espace après Commune */
    padding-top: 8px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

#dzop-v2-form .dzop-delivery label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    cursor: pointer;
}


/* =========================================
   MODE DE LIVRAISON – CARDS CLIQUABLES
========================================= */

#dzop-v2-form .dzop-delivery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 18px;
}

#dzop-v2-form .dzop-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all .25s ease;
    background: #fff;
}

/* cacher le radio natif */
#dzop-v2-form .dzop-card input {
    position: absolute;
    opacity: 0;
}

/* icône */
#dzop-v2-form .dzop-icon {
    font-size: 26px;
}

/* texte */
#dzop-v2-form .dzop-text strong {
    display: block;
    font-size: 14px;
}

#dzop-v2-form .dzop-text small {
    font-size: 12px;
    color: #666;
}

/* hover */
#dzop-v2-form .dzop-card:hover {
    border-color: #111;
}

/* =========================
   ÉTAT SÉLECTIONNÉ
========================= */

#dzop-v2-form .dzop-card input:checked + .dzop-icon,
#dzop-v2-form .dzop-card input:checked ~ .dzop-text {
    color: #111;
}

#dzop-v2-form .dzop-card input:checked ~ * {
    color: #111;
}

#dzop-v2-form .dzop-card input:checked ~ .dzop-text strong {
    font-weight: 700;
}

#dzop-v2-form .dzop-card input:checked ~ * {
    opacity: 1;
}

#dzop-v2-form .dzop-card input:checked ~ * {
    filter: none;
}

/* carte sélectionnée */
#dzop-v2-form .dzop-card input:checked ~ .dzop-icon,
#dzop-v2-form .dzop-card input:checked ~ .dzop-text {
    opacity: 1;
}

#dzop-v2-form .dzop-card input:checked ~ * {
    opacity: 1;
}

#dzop-v2-form .dzop-card input:checked ~ .dzop-text strong {
    font-weight: 700;
}

#dzop-v2-form .dzop-card input:checked ~ * {
    opacity: 1;
}

/* contour actif */
#dzop-v2-form .dzop-card input:checked {
    outline: none;
}

#dzop-v2-form .dzop-card input:checked ~ .dzop-text,
#dzop-v2-form .dzop-card input:checked ~ .dzop-icon {
    color: #111;
}

#dzop-v2-form .dzop-card input:checked ~ .dzop-icon {
    transform: scale(1.05);
}

/* carte active */
#dzop-v2-form .dzop-card input:checked ~ * {
    pointer-events: none;
}

#dzop-v2-form .dzop-card input:checked ~ * {
    opacity: 1;
}

#dzop-v2-form .dzop-card input:checked ~ * {
    transition: all .25s ease;
}

#dzop-v2-form .dzop-card input:checked {
    background: none;
}

/* bordure active */
#dzop-v2-form .dzop-card input:checked {
    border: none;
}

/* Carte sélectionnée */
#dzop-v2-form .dzop-card.is-selected {
    border-color: #111;
    background: #f9f9f9;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
    #dzop-v2-form .dzop-delivery {
        grid-template-columns: 1fr;
    }
}


.dzop-summary {
    margin-top: 14px;
    font-size: 14px;
}

.dzop-summary hr {
    margin: 10px 0;
    border: none;
    border-top: 1px solid #eee;
}

.dzop-grand-total {
    font-size: 16px;
}
