/* ================================================================
   Fiche annonce (/annonce/{id}) — complements au design okz-.

   Pourquoi ce fichier : la maquette annonce.html ne prevoyait ni
   lightbox, ni modales (partage, signalement, message, candidature,
   commande). Ces elements existaient dans l'ancien design en
   Tailwind, or le layout okz- ne charge PAS app.css : les utilitaires
   Tailwind (hidden, flex, fixed...) y sont absents. On reecrit donc
   ces elements avec les classes okz-.

   Regle : `.okz-on` = visible (equivalent de `hidden`/`flex`).
   ================================================================ */

/* --- Modales ---------------------------------------------------- */
.okz-modal {
    position: fixed;
    inset: 0;
    background: rgba(11, 18, 32, .62);
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
}
.okz-modal.okz-on { display: flex; }
.okz-modal-box {
    background: #fff;
    border-radius: var(--okz-radius, 16px);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px;
    box-sizing: border-box;
    box-shadow: 0 24px 70px -18px rgba(11, 18, 32, .45);
}
.okz-modal-box.okz-modal-wide { max-width: 560px; }
.okz-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}
.okz-modal-head h3 {
    font-size: 17px;
    font-weight: 800;
    margin: 0;
}
.okz-modal-close {
    background: none;
    border: 0;
    font-size: 24px;
    line-height: 1;
    color: var(--ink-3);
    cursor: pointer;
    padding: 0 2px;
}
.okz-modal-close:hover { color: var(--ink); }

/* --- Champs de formulaire des modales ---------------------------- */
.okz-fld { margin-bottom: 14px; }
.okz-fld label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
    margin-bottom: 6px;
}
.okz-fld input[type="text"],
.okz-fld input[type="tel"],
.okz-fld input[type="file"],
.okz-fld textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.okz-fld input:focus,
.okz-fld textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, .09);
}
.okz-fld textarea { resize: vertical; min-height: 84px; }
.okz-fld-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.okz-radio {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 8px;
}
.okz-radio:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-050, #E6F2FF);
}
.okz-radio input { accent-color: var(--brand); }

/* --- Bouton d'action plein largeur ------------------------------- */
.okz-btn-block {
    display: block;
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 11px;
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
    box-shadow: var(--okz-shadow-blue);
}
.okz-btn-block.okz-btn-danger { background: #E5484D; box-shadow: none; }
.okz-btn-block.okz-btn-green { background: #12B76A; box-shadow: none; }
.okz-btn-block.okz-btn-plain {
    background: #fff;
    color: var(--ink-2);
    border: 1.5px solid var(--line);
    box-shadow: none;
    margin-top: 8px;
}

/* --- Partage ---------------------------------------------------- */
.okz-share-btns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.okz-share-btns a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 6px;
    border-radius: 11px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.okz-share-btns i { font-size: 19px; }

/* --- Lightbox --------------------------------------------------- */
.okz-lb {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .96);
    z-index: 140;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.okz-lb.okz-on { display: flex; }
.okz-lb img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
}
.okz-lb-btn {
    position: absolute;
    background: rgba(255, 255, 255, .12);
    border: 0;
    color: #fff;
    font-size: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.okz-lb-btn:hover { background: rgba(255, 255, 255, .24); }
.okz-lb-close { top: 16px; inset-inline-end: 16px; }
.okz-lb-prev { inset-inline-start: 16px; top: 50%; transform: translateY(-50%); }
.okz-lb-next { inset-inline-end: 16px; top: 50%; transform: translateY(-50%); }
.okz-lb-count {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    font-weight: 600;
}

/* --- Bandeau « vendue » ----------------------------------------- */
.okz-sold-banner {
    background: #FEF2F2;
    border: 1px solid #FECDCA;
    color: #B42318;
    border-radius: 11px;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
}

/* --- Bloc « achat en ligne bloque » ----------------------------- */
.okz-blocked {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
    border-radius: 11px;
    padding: 11px 14px;
    font-size: 12.5px;
    margin-bottom: 10px;
}

/* --- Bouton favori dans le titre -------------------------------- */
.okz-fav-btn {
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 11px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    font-size: 17px;
    color: var(--ink-3);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .2s, color .2s, transform .15s;
}
.okz-fav-btn:hover { transform: translateY(-1px); }
.okz-fav-btn.okz-is-fav { color: #E5484D; border-color: #FECDCA; }

/* --- Note flottante (aide) -------------------------------------- */
.okz-note-close {
    position: absolute;
    top: 8px;
    inset-inline-end: 12px;
    color: rgba(255, 255, 255, .55);
    cursor: pointer;
    font-size: 14px;
    background: none;
    border: 0;
}

/* --- WhatsApp flottant ------------------------------------------ */
.okz-wa-float {
    position: fixed;
    inset-inline-end: 18px;
    bottom: 70px;
    z-index: 90;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 25px;
    box-shadow: 0 10px 30px -8px rgba(37, 211, 102, .55);
}

/* --- RTL : la barre de defilement du thumbstrip ------------------ */
html[dir="rtl"] .okz-thumb-strip { direction: rtl; }
html[dir="rtl"] .okz-lb-prev { inset-inline-start: auto; inset-inline-end: 16px; }
html[dir="rtl"] .okz-lb-next { inset-inline-end: auto; inset-inline-start: 16px; }

/* --- Responsive -------------------------------------------------- */
@media (max-width: 860px) {
    .okz-fld-row { grid-template-columns: 1fr; }
    .okz-share-btns { grid-template-columns: repeat(4, 1fr); }
}

/* --- CTA mobile ---------------------------------------------------
   Les boutons de contact sont dans la colonne laterale. Sur mobile,
   le CSS de la maquette la passe AVANT le contenu (.okz-side-col
   { order: -1 }) : les boutons restent donc accessibles sans
   duplication. Pas de panneau « Contacter le vendeur » en col-main. */

/* --- Les modales et la lightbox passent au-dessus de la barre basse
   mobile (z-index 120/140 vs 70 pour la barre basse). -------------- */

/* ================================================================
   COMPLEMENTS DU GABARIT BLADE (fiche annonce)

   Ces classes sont utilisees par resources/views/okz/annonce.blade.php
   mais n'existaient pas dans la maquette : le gabarit est plus riche
   que la maquette (les modales, la lightbox, les points d'indicage
   de la galerie, le squelette de chargement et les variantes de
   mise en page).

   Regles directionnelles : uniquement des proprietes logiques
   (inset-inline-*, margin-inline-*), jamais left/right, pour que
   l'arabe (RTL) et le francais (LTR) partagent le meme CSS.
   ================================================================ */

/* --- Squelette de chargement du visuel principal ---------------- */
.okz-skel {
    position: absolute;
    inset: 0;
    background: #EEF1F7;
    animation: okzSkelPulse 1.6s ease-in-out infinite;
    z-index: 1;
}
@keyframes okzSkelPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}

/* --- Visuel principal : la photo remplit le cadre 16/9 ---------- */
.okz-main-media > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 2;
}

/* --- Visuel principal vide (annonce sans photo ni video) -------- */
.okz-main-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #7A8699;
    font-size: 44px;
}

/* --- Points d'indicage de la galerie ---------------------------- */
.okz-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    padding: 12px 0 2px;
}
.okz-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
    background: #CBD2DD;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.okz-dot:hover { transform: scale(1.25); }
.okz-dot.okz-on { background: var(--brand); }

/* --- Vignette sans image (annonces similaires) ------------------ */
.okz-mini-ph {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: #EEF1F7;
    display: grid;
    place-items: center;
    color: var(--ink-3);
    flex-shrink: 0;
}

/* --- Lien « Signaler cette annonce » ---------------------------- */
.okz-report-link {
    display: block;
    width: 100%;
    margin-top: 10px;
    text-align: center;
    font-size: 12.5px;
    color: var(--ink-3);
    cursor: pointer;
    transition: color .15s;
}
.okz-report-link:hover { color: #E5484D; }

/* --- Sous-titre des modales ------------------------------------- */
.okz-modal-sub {
    font-size: 13.5px;
    color: var(--ink-3);
    margin: 0 0 14px;
}

/* --- Aide sous un champ de formulaire ---------------------------- */
.okz-fld-hint {
    font-size: 11.5px;
    color: var(--ink-3);
    margin: 6px 0 0;
}

/* --- Resume du produit dans la modale de commande ---------------- */
.okz-order-summary {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: var(--bg);
    border-radius: 11px;
    margin-bottom: 16px;
}
.okz-order-summary img {
    width: 64px;
    height: 64px;
    border-radius: 9px;
    object-fit: cover;
    flex-shrink: 0;
}
.okz-order-ttl {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 3px;
}

/* --- Bloc « paiement a la livraison » (variante bleue) ---------- */
.okz-order-cod {
    background: var(--brand-050);
    border-color: #CFE4FF;
    color: var(--ink-2);
}

/* --- Item video de l'annonceur ---------------------------------- */
.okz-v-item { min-width: 0; }

/* --- RTL : position physique des elements de la galerie ---------- */
html[dir="rtl"] .okz-thumb .okz-n { right: auto; left: 6px; }
html[dir="rtl"] .okz-dots { direction: rtl; }
