/* overlays.css — lightbox (zoom image) et modale de confirmation d'achat.
   Les deux partagent la même anatomie (fond sombre plein écran,
   position:fixed) ; leur markup vit dans index.html en dehors de #app, pour
   survivre aux changements de page (voir js/lightbox.js, js/order-confirm.js). */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 40px;
    box-sizing: border-box;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Boutons précédent/suivant, même anatomie que .carousel-nav (carré noir,
   chevron) mais positionnés par rapport à tout l'écran (position:fixed)
   plutôt qu'à l'intérieur d'un conteneur, puisque le lightbox recouvre toute
   la page. Masqués (voir plus bas) quand une seule image est ouverte :
   openLightbox pose "single-item" sur #lightbox dans ce cas (ex. fiche
   print, pas de galerie). */
.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: #000;
    color: #fff;
    border: 0;
    font-family: "dazzle-unicase", sans-serif;
    font-size: 32px;
    font-weight: 300;
    padding: 12px 18px;
    cursor: pointer;
    z-index: 101;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #333;
}

.lightbox.single-item .lightbox-prev,
.lightbox.single-item .lightbox-next {
    display: none;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23111'%20stroke-width='2'%20stroke-linecap='round'%3E%3Cline%20x1='6'%20y1='6'%20x2='18'%20y2='18'/%3E%3Cline%20x1='18'%20y1='6'%20x2='6'%20y2='18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
}

/* Confirmation d'achat (remplace l'alert() natif du navigateur après un
   paiement PayPal capturé) — même anatomie d'overlay que .lightbox, mais une
   boîte de contenu au lieu d'une image. z-index au-dessus de .lightbox : les
   deux ne se recouvrent jamais en pratique (le panier n'ouvre pas le
   lightbox), mais reste correct si jamais. */
.order-confirm {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    align-items: center;
    justify-content: center;
    z-index: 110;
    padding: 24px;
    box-sizing: border-box;
}

.order-confirm.open {
    display: flex;
}

.order-confirm-box {
    position: relative;
    background: #fff;
    max-width: 420px;
    width: 100%;
    padding: 36px 28px 28px;
    text-align: center;
}

.order-confirm-box h2 {
    font-size: 24px;
    margin: 0 0 14px;
}

.order-confirm-box p {
    color: var(--muted);
    margin: 0 0 10px;
    line-height: 1.5;
}

.order-confirm-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23111'%20stroke-width='2'%20stroke-linecap='round'%3E%3Cline%20x1='6'%20y1='6'%20x2='18'%20y2='18'/%3E%3Cline%20x1='18'%20y1='6'%20x2='6'%20y2='18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
    border: 1px solid #eee;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
}

.order-confirm-box .secondary-action {
    border: 0;
    margin-top: 10px;
}
