/* ============================================================
   WP Live Content — Styles publics
   ============================================================ */

:root {
    --wlc-frame-color: #22c55e;
    --wlc-frame-rgb:   34, 197, 94;
    --wlc-frame-style: solid;
    --wlc-green:       #22c55e;
    --wlc-amber:       #f59e0b;
}

/* ---- Conteneur de zone ---- */
.wlc-zone {
    position: relative;
    transition: opacity 0.3s ease;
}

/* ============================================================
   CADRE "EN DIRECT" (permanent tant que la page est ouverte)
   ============================================================ */

.wlc-framed {
    border-radius: 8px;
    padding: 14px 16px;   /* air intérieur : 14px haut/bas, 16px gauche/droite */
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Style : solid */
.wlc-framed {
    border: 1.5px solid rgba(var(--wlc-frame-rgb), 0.45);
    background-clip: padding-box;
}

/* Style : dashed */
.wlc-frame-style--dashed.wlc-framed {
    border: 1.5px dashed rgba(var(--wlc-frame-rgb), 0.55);
    box-shadow: none;
}

/* Style : glow (ombre lumineuse + bordure fine) */
.wlc-frame-style--glow.wlc-framed {
    border: 1px solid rgba(var(--wlc-frame-rgb), 0.3);
    box-shadow:
        0 0 0 3px rgba(var(--wlc-frame-rgb), 0.08),
        0 0 12px rgba(var(--wlc-frame-rgb), 0.15),
        inset 0 0 8px rgba(var(--wlc-frame-rgb), 0.04);
}

/* Quand offline : cadre passe à l'ambre */
.wlc-framed.wlc-offline {
    border-color: rgba(245, 158, 11, 0.45);
}
.wlc-frame-style--glow.wlc-framed.wlc-offline {
    box-shadow:
        0 0 0 3px rgba(245,158,11,0.08),
        0 0 12px rgba(245,158,11,0.15);
}

/* Badge avec position absolue : espace supplémentaire pour ne pas chevaucher le texte */
.wlc-framed.wlc-badge-pos--top-right,
.wlc-framed.wlc-badge-pos--top-left {
    padding-top: 40px;
}
.wlc-framed.wlc-badge-pos--bottom-right,
.wlc-framed.wlc-badge-pos--bottom-left {
    padding-bottom: 40px;
}

/* ============================================================
   BADGE "EN DIRECT"
   ============================================================ */

.wlc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(15, 15, 15, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 4px 9px 4px 7px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 10;
}

.wlc-badge--dot {
    padding: 5px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

/* Positionnement absolu */
.wlc-badge-pos--top-right .wlc-badge,
.wlc-badge-pos--top-left  .wlc-badge,
.wlc-badge-pos--bottom-right .wlc-badge,
.wlc-badge-pos--bottom-left  .wlc-badge {
    position: absolute;
    z-index: 10;
}

.wlc-badge-pos--top-right    .wlc-badge { top: 8px;    right:  8px; }
.wlc-badge-pos--top-left     .wlc-badge { top: 8px;    left:   8px; }
.wlc-badge-pos--bottom-right .wlc-badge { bottom: 8px; right:  8px; }
.wlc-badge-pos--bottom-left  .wlc-badge { bottom: 8px; left:   8px; }

/* Inline */
.wlc-badge-pos--inline .wlc-badge {
    position: static;
    display: inline-flex;
    margin-bottom: 8px;
}

/* ============================================================
   PASTILLE VERTE ANIMÉE
   ============================================================ */

.wlc-dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

.wlc-dot__core {
    display: block;
    width: 8px;
    height: 8px;
    background: var(--wlc-green);
    border-radius: 50%;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
    animation: wlc-pulse-core 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.wlc-dot__ring {
    display: block;
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--wlc-green);
    opacity: 0;
    animation: wlc-pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    z-index: 1;
}

@keyframes wlc-pulse-ring {
    0%   { transform: scale(0.6); opacity: 0.8; }
    70%  { transform: scale(1.6); opacity: 0;   }
    100% { transform: scale(1.6); opacity: 0;   }
}

@keyframes wlc-pulse-core {
    0%, 100% { transform: scale(1);    opacity: 1;   }
    50%       { transform: scale(0.88); opacity: 0.9; }
}

/* Pastille ambre si offline */
.wlc-zone.wlc-offline .wlc-dot__core {
    background: var(--wlc-amber);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.4);
    animation-duration: 3s;
}
.wlc-zone.wlc-offline .wlc-dot__ring {
    background: var(--wlc-amber);
    animation-duration: 3s;
}

/* ============================================================
   ANIMATION À LA MISE À JOUR DU CONTENU
   ============================================================ */

.wlc-zone.wlc-indicator--flash.wlc-just-updated .wlc-content {
    animation: wlc-flash 1.8s ease forwards;
}

@keyframes wlc-flash {
    0%   { background-color: #fef9c3; }
    60%  { background-color: #fef9c3; }
    100% { background-color: transparent; }
}

.wlc-zone.wlc-indicator--border.wlc-just-updated .wlc-content {
    outline: 2px solid var(--wlc-green);
    border-radius: 2px;
    animation: wlc-border-fade 2.5s ease forwards;
}

@keyframes wlc-border-fade {
    0%   { outline-color: rgba(34,197,94,0.9); }
    100% { outline-color: rgba(34,197,94,0);   }
}

/* ============================================================
   PARTAGE DE PARAGRAPHE
   ============================================================ */

/* Curseur pointer sur les paragraphes cliquables */
.wlc-zone.wlc-shareable .wlc-content p,
.wlc-zone.wlc-shareable .wlc-content li {
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.15s;
}
.wlc-zone.wlc-shareable .wlc-content p:hover,
.wlc-zone.wlc-shareable .wlc-content li:hover {
    background: rgba(var(--wlc-frame-rgb), 0.07);
}

/* ---- Tooltip "Partager" ---- */
.wlc-share-tooltip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    pointer-events: auto;
    cursor: pointer;
    z-index: 9000;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s;
    user-select: none;
}
.wlc-share-tooltip--visible {
    opacity: 1;
    transform: translateY(0);
}
.wlc-share-tooltip__icon {
    font-size: 14px;
    color: var(--wlc-green);
}

/* ---- Overlay / Popup ---- */
.wlc-share-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.wlc-share-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

.wlc-share-popup {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 460px;
    margin: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.2);
    position: relative;
    animation: wlc-popup-in 0.2s ease;
}

@keyframes wlc-popup-in {
    from { transform: scale(0.95) translateY(8px); opacity: 0; }
    to   { transform: scale(1)    translateY(0);   opacity: 1; }
}

.wlc-share-popup__close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: background 0.15s;
}
.wlc-share-popup__close:hover { background: #e5e7eb; color: #111; }

.wlc-share-popup__title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #111;
}

/* Pastille mini dans le titre du popup */
.wlc-dot--sm {
    width: 8px;
    height: 8px;
}
.wlc-dot--sm .wlc-dot__core {
    width: 6px;
    height: 6px;
}

/* ---- Zone de texte éditable ---- */
.wlc-share-preview {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}
.wlc-share-preview__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 6px;
}
.wlc-share-preview__text {
    width: 100%;
    border: none;
    background: transparent;
    resize: vertical;
    font-size: 13px;
    line-height: 1.5;
    color: #111;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}
.wlc-share-preview__counter {
    text-align: right;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
}
.wlc-counter--over {
    color: #ef4444;
    font-weight: 700;
}

/* ---- Boutons réseaux ---- */
.wlc-share-networks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.wlc-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s, opacity 0.15s;
    color: #fff;
    letter-spacing: 0.01em;
}
.wlc-share-btn:hover  { filter: brightness(1.1); transform: translateY(-1px); }
.wlc-share-btn:active { transform: translateY(0); }
.wlc-share-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.wlc-share-btn--x        { background: #000; }
.wlc-share-btn--linkedin { background: #0a66c2; }
.wlc-share-btn--facebook { background: #1877f2; }
.wlc-share-btn--whatsapp { background: #25d366; }
.wlc-share-btn--copy     { background: #6b7280; grid-column: 1 / -1; }
.wlc-share-btn--copied   { background: #22c55e; }

@media (max-width: 400px) {
    .wlc-share-networks { grid-template-columns: 1fr; }
    .wlc-share-btn--copy { grid-column: auto; }
}

/* ============================================================
   BARRE DE STATUT (horodatage + boutons pause/son)
   ============================================================ */

.wlc-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px 2px;
    margin-top: 10px;
    border-top: 1px solid rgba(var(--wlc-frame-rgb), 0.15);
    font-size: 11px;
    color: #9ca3af;
    user-select: none;
    gap: 8px;
}

.wlc-last-update {
    font-style: italic;
    transition: color 0.3s;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Animation flash quand la valeur change */
.wlc-last-update--fresh {
    color: var(--wlc-green);
    font-style: normal;
    font-weight: 600;
}

/* ── Boutons de contrôle ── */
.wlc-ctrl-btns {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.wlc-ctrl-btn {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
    color: #9ca3af;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 3px;
}

.wlc-ctrl-btn:hover {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.2);
}

.wlc-ctrl-btn:active {
    transform: scale(0.93);
}

/* État actif : pause activée ou son activé */
.wlc-ctrl-btn--active {
    background: rgba(var(--wlc-frame-rgb), 0.1);
    border-color: rgba(var(--wlc-frame-rgb), 0.4);
    color: var(--wlc-green);
}

/* ── Mode pause : fond légèrement grisé ── */
.wlc-zone.wlc-paused {
    opacity: 0.75;
}

.wlc-zone.wlc-paused .wlc-dot__core {
    background: #9ca3af;
    animation: none;
}

.wlc-zone.wlc-paused .wlc-dot__ring {
    background: #9ca3af;
    animation: none;
}

.wlc-zone.wlc-paused .wlc-badge {
    opacity: 0.6;
}

/* ── Horodatage flash au moment d'une MAJ ── */
@keyframes wlc-ts-flash {
    0%   { color: var(--wlc-green); }
    100% { color: #9ca3af; }
}

.wlc-last-update--anim {
    animation: wlc-ts-flash 3s ease forwards;
}
