/* ==========================================================================
   WhatsApp Card
   ========================================================================== */

.adcg-wa-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    max-width: 1024px;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.adcg-wa-card.aligncenter { margin-left: auto; margin-right: auto; }
.adcg-wa-card.alignright { margin-left: auto; }
.adcg-wa-card.alignleft { margin-right: auto; }

.adcg-wa-card .adcg-wa-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.adcg-wa-card .adcg-wa-card-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 4px;
    border-radius: 12px;
}

.adcg-wa-card .adcg-wa-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 16px;
}

.adcg-wa-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.adcg-wa-icon { display: inline-flex; }
.adcg-wa-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    transition: all .18s ease-in-out;
}

.adcg-wa-right .adcg-wa-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #25D366;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all .18s ease-in-out;
}
.adcg-wa-right .adcg-wa-button:hover { filter: brightness(0.95); }

/* Card hover states */
.adcg-wa-card:hover {
    background: #f3f4f6;
    box-shadow: 0 4px 10px rgba(0,0,0,.10);
    transform: scale(1.01);
}
.adcg-wa-card .adcg-wa-card-link:hover .adcg-wa-right .adcg-wa-button,
.adcg-wa-card:hover .adcg-wa-right .adcg-wa-button { filter: brightness(0.80); }
.adcg-wa-card:hover .adcg-wa-title { color: #1a7f37; }
.adcg-wa-card:hover .adcg-wa-icon { opacity: 0.9; transform: translateY(-1px); }

.adcg-wa-icon, .adcg-wa-right .adcg-wa-button {
    transition: all .18s ease-in-out;
}

/* Responsive */
@media (max-width: 600px) {
    .adcg-wa-title { font-size: 16px; }
    .adcg-wa-card .adcg-wa-card-inner { padding: 10px 12px; }
    .adcg-wa-right .adcg-wa-button { padding: 10px 12px; }
}

/* ==========================================================================
   Sticky — Container
   ========================================================================== */

.adcg-wa-sticky {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999999;
}

/* ==========================================================================
   Sticky — Onglet (lien direct vers WhatsApp)
   ========================================================================== */

.adcg-wa-sticky-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #25D366;
    border-radius: 12px 0 0 12px;
    cursor: pointer;
    box-shadow: -2px 2px 12px rgba(37,211,102,0.35);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}
.adcg-wa-sticky-tab:hover {
    background: #20bd5a;
    box-shadow: -4px 4px 20px rgba(37,211,102,0.5);
}

/* Masquer l'onglet quand le bandeau est deploye */
.adcg-wa-sticky.expanded .adcg-wa-sticky-tab {
    pointer-events: none;
    opacity: 0;
    position: absolute;
}

/* ==========================================================================
   Sticky — Bandeau deploye (GPU-accelerated pour iOS)
   ========================================================================== */

.adcg-wa-sticky-banner {
    display: flex;
    position: absolute;
    right: 0;
    top: 50%;
    background: #25D366;
    border-radius: 12px 0 0 12px;
    box-shadow: -4px 4px 20px rgba(37,211,102,0.4);
    white-space: nowrap;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    /* GPU-accelerated slide-in pour iOS */
    transform: translateY(-50%) translateX(100%);
    -webkit-transform: translateY(-50%) translateX(100%);
    opacity: 0;
    will-change: transform, opacity;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease;
    -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                        opacity 0.25s ease;
    pointer-events: none;
}
.adcg-wa-sticky-banner:hover {
    text-decoration: none;
    color: #fff;
    background: #20bd5a;
}
.adcg-wa-sticky-banner:focus {
    text-decoration: none;
    color: #fff;
}

.adcg-wa-sticky.expanded .adcg-wa-sticky-banner {
    transform: translateY(-50%) translateX(0);
    -webkit-transform: translateY(-50%) translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* Logo WhatsApp dans le bandeau */
.adcg-wa-sticky-logo {
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

.adcg-wa-sticky-banner-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 40px 14px 18px;
}

/* Bouton fermer */
.adcg-wa-sticky-close {
    position: absolute;
    top: 4px;
    right: 6px;
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: rgba(255,255,255,0.7);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s;
}
.adcg-wa-sticky-close:hover {
    color: #fff;
}

/* Texte du bandeau */
.adcg-wa-sticky-banner-text {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

/* ==========================================================================
   Sticky — Responsive
   ========================================================================== */

@media (max-width: 600px) {
    .adcg-wa-sticky-tab {
        width: 42px;
        height: 42px;
    }
    .adcg-wa-sticky-tab svg {
        width: 20px;
        height: 20px;
    }
    .adcg-wa-sticky-banner-inner {
        padding: 10px 32px 10px 12px;
        gap: 8px;
    }
    .adcg-wa-sticky-banner-text {
        font-size: 12px;
    }
    .adcg-wa-sticky-banner svg {
        width: 24px;
        height: 24px;
    }
}
