/* =============================================================
   custom.css — surcharges CSS Docadoc
   Chargé après style.css — toutes les règles ici priment.
   À intégrer progressivement dans le SCSS par Steph.
   ============================================================= */


/* -------------------------------------------------------------
   ANNONCES — Photo principale : fond gris au lieu de noir
   ------------------------------------------------------------- */
body.annonces .annonce-details .annonce-contenu .droite a img {
    background-color: #b5b5b5;
    display: block;
}

/* Centrage du grand conteneur et des vignettes dans la colonne droite */
body.annonces .annonce-details .annonce-contenu .piece-jointe-1 {
    display: block;
    text-align: center;
    margin-bottom: 22px;
}
body.annonces .annonce-details .annonce-contenu .pieces-jointes {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Contraindre la colonne droite pour éviter le débordement */
body.annonces .annonce-details .annonce-contenu .droite {
    overflow: hidden;
}

/* Vignettes sous le texte quand pas d'image principale (colonne gauche) */
body.annonces .annonce-details .annonce-contenu .pieces-jointes-gauche {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

/* Vignettes : taille fixe 100×100 dans les deux colonnes */
body.annonces .annonce-details .annonce-contenu .pieces-jointes a img,
body.annonces .annonce-details .annonce-contenu .pieces-jointes-gauche a img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    background-color: #b5b5b5;
    display: block;
}

/* Icônes bureautiques et PDF : taille fixe 100×100, fond contrasté */
body.annonces .annonce-details .annonce-contenu .pieces-jointes a.lienpj.icon-defaut,
body.annonces .annonce-details .annonce-contenu .pieces-jointes-gauche a.lienpj.icon-defaut,
body.annonces .annonce-details .annonce-contenu .pieces-jointes a.lienpj.icon-pdf,
body.annonces .annonce-details .annonce-contenu .pieces-jointes-gauche a.lienpj.icon-pdf {
    display: inline-block !important;
    width: 100px;
    height: 100px;
    overflow: hidden;
    background-color: #cccccc !important;
    vertical-align: top;
}

body.annonces .annonce-details .annonce-contenu .pieces-jointes a.lienpj.icon-defaut i,
body.annonces .annonce-details .annonce-contenu .pieces-jointes-gauche a.lienpj.icon-defaut i,
body.annonces .annonce-details .annonce-contenu .pieces-jointes a.lienpj.icon-pdf i,
body.annonces .annonce-details .annonce-contenu .pieces-jointes-gauche a.lienpj.icon-pdf i {
    font-size: 52px !important;
    line-height: 100px !important;
    color: #000000 !important;
    display: block !important;
    text-align: center !important;
}
/* -------------------------------------------------------------
   ANNONCES — Message contextuel upload image
   ------------------------------------------------------------- */
#annonce-info-image {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 12px;
    background-color: rgba(96, 208, 132, 0.12);
    border-left: 3px solid #60D084;
    border-radius: 4px;
    color: #2a7a4a;
    font-size: 0.88rem;
}
#annonce-info-image .icon {
    color: #60D084;
    font-size: 1.1rem;
    flex-shrink: 0;
}
/* -------------------------------------------------------------
   ANNONCES — Feedback clic vignette bureautique (Bloc 2)
   ------------------------------------------------------------- */
.annonce-loader-carres {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 40px;
    justify-content: center;
    width: 100%;
}
.annonce-loader-carres span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background-color: #60D084;
    animation: annonce-carre-pulse 1s ease-in-out infinite;
}
.annonce-loader-carres span:nth-child(1) { animation-delay: 0s;    opacity: 1;    }
.annonce-loader-carres span:nth-child(2) { animation-delay: 0.15s; opacity: 0.75; }
.annonce-loader-carres span:nth-child(3) { animation-delay: 0.30s; opacity: 0.50; }
.annonce-loader-carres span:nth-child(4) { animation-delay: 0.45s; opacity: 0.25; }

@keyframes annonce-carre-pulse {
    0%, 100% { transform: scaleY(1);   opacity: 0.25; }
    50%       { transform: scaleY(1.6); opacity: 1;    }
}
/* -------------------------------------------------------------
   ANNONCES — Zoom loupe image unique (Bloc 1B)
   ------------------------------------------------------------- */
#annonce-zoom-tooltip {
    position: fixed;
    display: none;
    width: 800px;
    height: 800px;
    z-index: 9999;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    pointer-events: none;
    background: #b5b5b5;
}
#annonce-zoom-tooltip img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/* -------------------------------------------------------------
   ANNONCES — Lightbox Fancybox 2 : chevrons, croix, dots
   ------------------------------------------------------------- */
.fancybox-skin {
    background: #000 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
}
.fancybox-nav {
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: none !important;
    width: 44px !important;
    height: 44px !important;
    top: 50% !important;
    bottom: auto !important;
    margin-top: -22px !important;
}
.fancybox-prev { left: -50px !important; }
.fancybox-next { right: -50px !important; }
.fancybox-nav span {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    background-image: none !important;
    background: none !important;
    border: none !important;
    top: 0 !important; left: 0 !important;
    margin: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
}
.fancybox-prev span::after,
.fancybox-next span::after {
    content: '' !important;
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    border-top: 3px solid #60D084 !important;
    border-right: 3px solid #60D084 !important;
    position: absolute !important;
    top: 50% !important;
    margin-top: -8px !important;
}
.fancybox-prev span::after { transform: rotate(-135deg) !important; right: 8px !important; }
.fancybox-next span::after { transform: rotate(45deg) !important; left: 8px !important; }
.fancybox-wrap:not(:hover) .fancybox-nav { opacity: 1 !important; }
a.fancybox-item.fancybox-close {
    background-image: none !important;
    overflow: hidden !important;
    opacity: 1 !important;
    width: 36px !important;
    height: 36px !important;
    text-indent: -9999px !important;
}
a.fancybox-item.fancybox-close::after {
    content: '×' !important;
    text-indent: 0 !important;
    display: block !important;
    font-size: 28px !important;
    line-height: 36px !important;
    color: #fff !important;
    text-align: center !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important;
}
a.fancybox-item.fancybox-close:hover::after { color: #60D084 !important; }
#annonce-fb-dots {
    position: fixed !important;
    bottom: 18px !important;
    left: 0 !important; right: 0 !important;
    top: auto !important;
    z-index: 10001 !important;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 5px;
    pointer-events: none;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
}
#annonce-fb-dots .annonce-dot-active { background: #60D084 !important; }



/* -------------------------------------------------------------
   ANNONCES — Bouton téléchargement superposé
   ------------------------------------------------------------- */
.annonce-conteneur-principal {
    display: inline-block;
    line-height: 0;
    font-size: 0;
}
.annonce-btn-telecharger {
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
    left: auto !important;
    top: auto !important;
    width: 44px;
    height: 44px;
    background: rgba(96, 208, 132, 0.85) !important;
    border-radius: 6px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100;
    text-decoration: none !important;
    transition: background 0.2s ease;
}
.annonce-btn-telecharger:hover {
    background: rgba(96, 208, 132, 1) !important;
}
.annonce-btn-telecharger .icon {
    color: #fff !important;
    font-size: 22px !important;
    display: block !important;
    background: none !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
}

/* Réduire la taille de l'icône dans le bouton téléchargement */
a.annonce-btn-telecharger i.icon {
    font-size: 16px !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    color: #fff !important;
    line-height: 1 !important;
}

/* Taille icône téléchargement annonces */
a.annonce-btn-telecharger i.icon,
a.annonce-btn-telecharger i.icon:before {
    font-size: 16px !important;
}
.annonce-btn-telecharger:hover {
    background: rgba(0, 0, 0, 0.85) !important;
}
