/* Pixeldorado SEO Tracker — Dashboard styles
 *
 * Stratégie : design system Pixeldorado isolé du thème hôte (Hello Elementor,
 * Astra, GeneratePress, Divi, etc.). On reset défensivement les éléments les plus
 * souvent pollués par les thèmes (button, a, input, table, h1-h6) UNIQUEMENT à
 * l'intérieur de .pxd-dashboard pour ne pas affecter le reste du site.
 */

.pxd-dashboard {
    /* Charte Pixeldorado (v1.5.21).
     *
     *   Couleur principale  : #244B5C  bleu foncé
     *     → texte, titres, primary, liens, bordures fortes
     *   Accent chaud        : #F97171  rouge corail
     *     → CTA, actions, badges priorité haute, alertes douces
     *   Accent doré         : #F6CD67  jaune doré
     *     → highlights, badges priorité moyenne, étoiles, KPIs
     *
     * On garde les Elementor Global Colors en première option pour les sites
     * où le client a sa propre charte définie. Si pas de Global Colors,
     * fallback sur la charte Pixeldorado.
     *
     * Les couleurs sémantiques (success vert, danger rouge) restent fixes
     * pour préserver la lisibilité universelle des indicateurs de statut.
     */
    /* v1.5.23 : on FORCE la charte Pixeldorado sur primary et text (sans
     * fallback Elementor) car les Global Colors Elementor du thème peuvent
     * définir un bleu clair qui ne correspond pas à la charte du plugin.
     * Si tu veux qu'un site spécifique surcharge ces couleurs, fais-le via
     * .pxd-dashboard { --pxd-primary: #xxx; --pxd-text: #xxx; } dans ton CSS
     * additionnel.
     */
    --pxd-primary: #244B5C;
    --pxd-primary-hover: #1a3a48;
    --pxd-primary-soft: rgba(36, 75, 92, 0.08);
    --pxd-text: #244B5C;
    --pxd-text-muted: #566873;
    --pxd-accent: #F97171;
    --pxd-accent-hover: #f55656;
    --pxd-accent-soft: rgba(249, 113, 113, 0.12);
    --pxd-gold: #F6CD67;
    --pxd-gold-soft: rgba(246, 205, 103, 0.18);

    /* Surfaces : neutres mais légèrement teintées par la charte pour cohérence */
    --pxd-bg: #f7f8fb;
    --pxd-card-bg: #ffffff;
    --pxd-card-border: #e5e9ed;
    --pxd-card-shadow: 0 1px 3px rgba(36, 75, 92, 0.08);
    --pxd-card-shadow-hover: 0 4px 12px rgba(36, 75, 92, 0.12);

    /* Statuts sémantiques : restent fixes pour la signification */
    --pxd-success: #16a34a;
    --pxd-success-soft: rgba(22, 163, 74, 0.1);
    --pxd-warning: #F6CD67;
    --pxd-warning-soft: rgba(246, 205, 103, 0.18);
    --pxd-danger: #F97171;
    --pxd-danger-soft: rgba(249, 113, 113, 0.12);

    --pxd-radius: 8px;
    --pxd-radius-lg: 12px;

    /* Espacement vertical de la page entière.
     * --pxd-header-margin-top : marge au-dessus du <header> du dashboard.
     *   Sert à dégager le titre quand le thème a un menu sticky qui passe
     *   par-dessus. Surchargeable si le menu fait une autre hauteur :
     *
     *     .pxd-dashboard { --pxd-header-margin-top: 100px; }
     *
     * --pxd-page-padding-bottom : aération en bas avant le footer du thème.
     */
    --pxd-header-margin-top: 120px;
    --pxd-page-padding-bottom: 60px;
    --pxd-page-padding-x: 16px;

    /* Typo : on hérite du thème quand possible (pour cohérence visuelle) */
    font-family: var(--e-global-typography-text-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif) !important;
    color: var(--pxd-text);
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px var(--pxd-page-padding-x) var(--pxd-page-padding-bottom);
    line-height: 1.5;
    text-align: left;
}

.pxd-dashboard * {
    box-sizing: border-box;
}

/* Reset défensif : neutralise les styles de thème les plus invasifs.
 * Ces resets s'appliquent UNIQUEMENT aux éléments enfants directs/indirects
 * de .pxd-dashboard. Le reste du site n'est pas affecté. */

/* Boutons : les thèmes (Elementor surtout) leur imposent souvent une couleur
 * d'accent, des bordures arrondies, des transitions transform, etc. */
.pxd-dashboard button {
    font-family: inherit;
    line-height: inherit;
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
    text-decoration: none;
}

/* Liens : éviter qu'un thème souligne ou colore tous les <a> du dashboard */
.pxd-dashboard a {
    text-decoration: none;
    color: var(--pxd-primary);
}
.pxd-dashboard a:hover {
    text-decoration: underline;
}

/* Tables : neutralise les border-collapse et marges imposés par le thème */
.pxd-dashboard table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    margin: 0;
}

.pxd-dashboard th,
.pxd-dashboard td {
    text-align: left;
    vertical-align: middle;
}

/* Titres : neutralise les couleurs et marges des h1-h6 imposées par le thème */
.pxd-dashboard h1,
.pxd-dashboard h2,
.pxd-dashboard h3,
.pxd-dashboard h4,
.pxd-dashboard h5,
.pxd-dashboard h6 {
    font-family: inherit;
    color: var(--pxd-text);
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3;
}

/* Paragraphes : éviter les marges démesurées des thèmes */
.pxd-dashboard p {
    color: inherit;
    line-height: inherit;
}

/* Inputs / select / textarea (au cas où on en ajouterait dans le dashboard) */
.pxd-dashboard input,
.pxd-dashboard select,
.pxd-dashboard textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: var(--pxd-text);
}

/* Listes : neutraliser les puces personnalisées de thème */
.pxd-dashboard ul,
.pxd-dashboard ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Header */
.pxd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px;
    background: var(--pxd-card-bg);
    border: 1px solid var(--pxd-card-border);
    border-left: 4px solid var(--pxd-primary);
    border-radius: var(--pxd-radius);
    box-shadow: var(--pxd-card-shadow);
    /* Marge au-dessus pour ne pas être masqué par le menu sticky du thème.
     * Configurable via la variable --pxd-header-margin-top sur .pxd-dashboard. */
    margin-top: var(--pxd-header-margin-top);
    margin-bottom: 28px;
}

.pxd-header-left {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.pxd-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--pxd-text);
    letter-spacing: -0.01em;
}

.pxd-domain {
    font-size: 13px;
    font-weight: 500;
    color: var(--pxd-primary);
    background: var(--pxd-primary-soft);
    padding: 5px 12px;
    border-radius: 999px;
}

.pxd-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pxd-user-name {
    font-size: 14px;
    color: var(--pxd-text-muted);
}

/* Buttons */
.pxd-btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--pxd-primary);
    color: #fff !important;
    border: 1px solid var(--pxd-primary);
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.2;
}

.pxd-btn:hover {
    background: var(--pxd-primary-hover);
    border-color: var(--pxd-primary-hover);
    color: #fff !important;
}

.pxd-btn-ghost {
    background: transparent;
    color: var(--pxd-text) !important;
    border-color: var(--pxd-card-border);
}

.pxd-btn-ghost:hover {
    background: var(--pxd-bg);
    color: var(--pxd-text) !important;
    border-color: var(--pxd-card-border);
}

/* KPI Grid */
.pxd-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.pxd-kpi-card {
    position: relative;
    background: var(--pxd-card-bg);
    border: 1px solid var(--pxd-card-border);
    border-radius: var(--pxd-radius);
    box-shadow: var(--pxd-card-shadow);
    padding: 22px 24px;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.pxd-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--pxd-primary);
    opacity: 0.7;
}

.pxd-kpi-card:nth-child(2)::before { background: var(--pxd-accent); }
.pxd-kpi-card:nth-child(3)::before { background: var(--pxd-gold); }
.pxd-kpi-card:nth-child(4)::before { background: var(--pxd-success); }

.pxd-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pxd-card-shadow-hover);
}

.pxd-kpi-label {
    font-size: 12px;
    color: var(--pxd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
    font-weight: 600;
}

.pxd-kpi-value {
    font-size: 34px;
    font-weight: 700;
    color: var(--pxd-text);
    line-height: 1;
    letter-spacing: -0.02em;
}

.pxd-kpi-value.pxd-kpi-small {
    font-size: 18px;
    font-weight: 600;
}

/* Cards */
.pxd-card {
    background: var(--pxd-card-bg);
    border: 1px solid var(--pxd-card-border);
    border-radius: var(--pxd-radius);
    box-shadow: var(--pxd-card-shadow);
    padding: 28px;
    margin-bottom: 40px;
}

/* Dernière card du dashboard : pas de marge en bas (évite l'espace vide en pied) */
.pxd-dashboard > .pxd-card:last-child {
    margin-bottom: 24px;
}

.pxd-card h3 {
    margin: 0 0 20px;
    padding-bottom: 14px;
    font-size: 17px;
    font-weight: 700;
    color: var(--pxd-text);
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--pxd-card-border);
    position: relative;
}

.pxd-card h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--pxd-accent);
    border-radius: 2px;
}

/* Empty state */
.pxd-empty-state {
    text-align: center;
    padding: 48px 24px;
}

.pxd-empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.pxd-empty-state p {
    color: var(--pxd-text-muted);
    margin: 0;
}

/* Login invite */
/* Marge top pour dégager du menu sticky, même variable que le header dashboard */
.pxd-login-invite .pxd-card {
    max-width: 400px;
    margin: var(--pxd-header-margin-top) auto 48px;
    text-align: center;
}

.pxd-login-invite h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.pxd-login-invite p {
    color: var(--pxd-text-muted);
    margin-bottom: 20px;
}

/* ============ V1.5 : Page Mon compte ============ */
/* Marge top identique à celle du header du dashboard pour dégager le titre
 * du menu sticky. Configurable via --pxd-header-margin-top. */
.pxd-account-page .pxd-card {
    max-width: 600px;
    margin: var(--pxd-header-margin-top) auto 48px;
}

.pxd-account-page h2 {
    margin: 0 0 24px;
    font-size: 24px;
}

.pxd-account-page h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
}

.pxd-account-info p {
    margin: 0 0 8px;
    line-height: 1.6;
}

.pxd-account-info strong {
    display: inline-block;
    min-width: 120px;
    color: var(--pxd-text-muted);
    font-weight: 600;
}

.pxd-account-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pxd-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pxd-form-row label {
    font-weight: 600;
    font-size: 14px;
    color: var(--pxd-text);
}

.pxd-form-row input[type="text"],
.pxd-form-row input[type="password"],
.pxd-form-row input[type="email"] {
    padding: 10px 12px;
    border: 1px solid var(--pxd-card-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--pxd-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pxd-form-row input:focus {
    outline: none;
    border-color: var(--pxd-primary);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.pxd-form-hint {
    margin: 0;
    font-size: 12px;
    color: var(--pxd-text-muted);
}

.pxd-form-actions {
    margin-top: 8px;
}

/* Notices succès / erreur */
.pxd-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
}

.pxd-notice-success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.pxd-notice-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* Admin notice */
.pxd-admin-notice {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--pxd-radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #92400e;
}

/* Table */
.pxd-table-wrap {
    overflow-x: auto;
}

.pxd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pxd-table thead th {
    text-align: left;
    padding: 12px 12px;
    border-bottom: 2px solid var(--pxd-card-border);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--pxd-text-muted);
}

.pxd-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--pxd-card-border);
    vertical-align: middle;
}

.pxd-table tbody tr:last-child td {
    border-bottom: none;
}

.pxd-table tbody tr:hover {
    background: var(--pxd-bg);
}

.pxd-text-center {
    text-align: center;
}

.pxd-keyword-cell {
    font-weight: 500;
}

.pxd-table-note {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--pxd-text-muted);
    font-style: italic;
}

/* Position badges */
.pxd-position {
    display: inline-block;
    min-width: 38px;
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.2px;
}

.pxd-pos-top3 {
    background: var(--pxd-success-soft);
    color: #0f7434;
    border: 1px solid rgba(22, 163, 74, 0.3);
}

.pxd-pos-top10 {
    background: var(--pxd-gold-soft);
    color: #7a5e1c;
    border: 1px solid rgba(246, 205, 103, 0.6);
}

.pxd-pos-top30 {
    background: var(--pxd-accent-soft);
    color: #b03a3a;
    border: 1px solid rgba(249, 113, 113, 0.35);
}

.pxd-pos-out {
    background: rgba(36, 75, 92, 0.06);
    color: var(--pxd-text-muted);
    border: 1px solid var(--pxd-card-border);
}

.pxd-pos-none {
    background: var(--pxd-bg);
    color: var(--pxd-text-muted);
}

/* Deltas */
.pxd-delta-up {
    color: var(--pxd-success);
    font-weight: 700;
}

.pxd-delta-down {
    color: var(--pxd-danger);
    font-weight: 700;
}

.pxd-delta-flat {
    color: var(--pxd-text-muted);
}

.pxd-delta-none {
    color: var(--pxd-text-muted);
}

/* Sparkline canvas */
.pxd-sparkline {
    display: block;
    max-width: 120px;
    height: 30px;
}

/* Responsive */
@media (max-width: 600px) {
    .pxd-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .pxd-kpi-value {
        font-size: 26px;
    }
    .pxd-table {
        font-size: 13px;
    }
    .pxd-table thead th,
    .pxd-table tbody td {
        padding: 10px 8px;
    }
}

/* ============ V1.1 : Nouvelles sections ============ */

.pxd-section-intro {
    color: var(--pxd-text-muted);
    margin: -8px 0 20px;
    font-size: 14px;
}

/* Difficulté (suggestions) */
.pxd-difficulty {
    display: inline-block;
    min-width: 38px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
}

.pxd-diff-low {
    background: var(--pxd-success-soft);
    color: #0f7434;
}

.pxd-diff-mid {
    background: var(--pxd-gold-soft);
    color: #7a5e1c;
}

.pxd-diff-high {
    background: var(--pxd-accent-soft);
    color: #b03a3a;
}

/* Recommandations */
.pxd-recos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.pxd-reco-card {
    background: #fcfcfd;
    border: 1px solid var(--pxd-card-border);
    border-radius: var(--pxd-radius);
    padding: 18px;
    border-left: 4px solid var(--pxd-text-muted);
    transition: transform 0.15s, box-shadow 0.15s;
}

.pxd-reco-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--pxd-card-shadow);
}

.pxd-reco-header {
    margin-bottom: 8px;
}

.pxd-reco-prio {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pxd-prio-high {
    background: var(--pxd-accent-soft);
    color: #b03a3a;
}

.pxd-reco-card:has(.pxd-prio-high) {
    border-left-color: var(--pxd-accent);
}

.pxd-prio-mid {
    background: var(--pxd-gold-soft);
    color: #7a5e1c;
}

.pxd-reco-card:has(.pxd-prio-mid) {
    border-left-color: var(--pxd-gold);
}

.pxd-prio-low {
    background: var(--pxd-primary-soft);
    color: var(--pxd-primary);
}

.pxd-reco-card:has(.pxd-prio-low) {
    border-left-color: var(--pxd-primary);
}

.pxd-reco-title {
    margin: 6px 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--pxd-text);
    line-height: 1.35;
}

.pxd-reco-desc {
    color: var(--pxd-text-muted);
    font-size: 14px;
    margin: 0 0 8px;
    line-height: 1.5;
}

.pxd-reco-url {
    margin: 8px 0 0;
    font-size: 12px;
    word-break: break-all;
}

.pxd-dashboard .pxd-reco-url a {
    color: var(--pxd-text-muted);
    text-decoration: none;
}

.pxd-dashboard .pxd-reco-url a:hover {
    color: var(--pxd-primary);
    text-decoration: underline;
}

/* ============ V1.5.23 : CTA Pixeldorado sous les recommandations ============ */

.pxd-reco-cta {
    margin-top: 28px;
    padding: 24px 28px;
    background: #ffffff;
    border: 1px solid var(--pxd-card-border);
    border-radius: var(--pxd-radius-lg);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.pxd-reco-cta-text {
    margin: 0;
    flex: 1 1 auto;
    min-width: 220px;
    font-size: 15px;
    color: var(--pxd-text);
    font-weight: 500;
    line-height: 1.45;
}

.pxd-dashboard .pxd-reco-cta-btn {
    display: inline-block;
    flex-shrink: 0;
    padding: 12px 26px;
    background: var(--pxd-accent);
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.2px;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    white-space: nowrap;
}

.pxd-dashboard .pxd-reco-cta-btn:hover,
.pxd-dashboard .pxd-reco-cta-btn:focus {
    background: var(--pxd-primary);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.pxd-kpi-suffix {
    font-size: 14px;
    color: var(--pxd-text-muted);
    font-weight: 400;
}

/* ============ V1.2 : Section GEO (visibilité IA) ============ */

.pxd-engine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.pxd-engine-card {
    background: #fafafa;
    border: 1px solid var(--pxd-card-border);
    border-radius: 6px;
    padding: 14px;
    text-align: center;
}

.pxd-engine-name {
    font-size: 13px;
    color: var(--pxd-text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.pxd-engine-rate {
    font-size: 28px;
    font-weight: 700;
    color: var(--pxd-text);
    line-height: 1;
}

.pxd-engine-detail {
    font-size: 12px;
    color: var(--pxd-text-muted);
    margin-top: 4px;
}

.pxd-engine-high {
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.pxd-engine-high .pxd-engine-rate { color: #047857; }

.pxd-engine-mid {
    background: #fffbeb;
    border-color: #fcd34d;
}
.pxd-engine-mid .pxd-engine-rate { color: #b45309; }

.pxd-engine-low {
    background: #fef2f2;
    border-color: #fecaca;
}
.pxd-engine-low .pxd-engine-rate { color: #b91c1c; }

.pxd-geo-questions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.pxd-geo-question {
    background: #fafafa;
    border: 1px solid var(--pxd-card-border);
    border-radius: 8px;
    padding: 16px 18px;
}

.pxd-geo-q-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.pxd-geo-q-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--pxd-text);
    flex: 1;
    line-height: 1.4;
}

.pxd-geo-q-summary {
    font-size: 12px;
    color: var(--pxd-text-muted);
    background: white;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--pxd-card-border);
    white-space: nowrap;
}

.pxd-geo-engines-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pxd-geo-engine-row {
    background: white;
    border-radius: 6px;
    padding: 10px 12px;
    border-left: 3px solid #ddd;
}

.pxd-geo-engine-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 13px;
}

.pxd-geo-engine-name {
    color: var(--pxd-text);
}

.pxd-geo-engine-status {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.pxd-geo-status-mentioned {
    background: #dcfce7;
    color: #166534;
}

.pxd-geo-status-not-mentioned {
    background: #fee2e2;
    color: #991b1b;
}

.pxd-geo-status-pending {
    background: #f3f4f6;
    color: #6b7280;
}

.pxd-geo-engine-row:has(.pxd-geo-status-mentioned) {
    border-left-color: var(--pxd-success);
}

.pxd-geo-engine-row:has(.pxd-geo-status-not-mentioned) {
    border-left-color: var(--pxd-danger);
}

.pxd-geo-position {
    font-size: 12px;
    color: var(--pxd-text-muted);
}

.pxd-geo-sentiment {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.pxd-geo-sentiment-positive {
    background: #dcfce7;
    color: #166534;
}

.pxd-geo-sentiment-neutral {
    background: #f3f4f6;
    color: #6b7280;
}

.pxd-geo-sentiment-negative {
    background: #fee2e2;
    color: #991b1b;
}

.pxd-geo-excerpt {
    font-size: 13px;
    color: var(--pxd-text);
    margin-top: 8px;
    padding: 10px 12px;
    background: #f9fafb;
    border-left: 3px solid var(--pxd-text-muted);
    border-radius: 0 4px 4px 0;
    font-style: italic;
    line-height: 1.5;
}

.pxd-geo-citation {
    margin-top: 8px;
    font-size: 12px;
    color: var(--pxd-text-muted);
    word-break: break-all;
}

.pxd-dashboard .pxd-geo-citation a {
    color: var(--pxd-text-muted);
    text-decoration: none;
}

.pxd-dashboard .pxd-geo-citation a:hover {
    color: var(--pxd-primary);
    text-decoration: underline;
}

/* ============ V1.3 : Tooltips d'aide (glossaire) ============
 * IMPORTANT : sélecteurs préfixés .pxd-dashboard pour augmenter la spécificité
 * et résister aux overrides du thème (Elementor, Astra, GeneratePress, etc.)
 * Les `!important` sont ciblés uniquement sur les propriétés visuelles critiques.
 * .pxd-tt-content est déplacée dans <body> par le JS, donc plus de wrapping
 * possible — on utilise des !important pour ses propriétés.
 */

.pxd-dashboard .pxd-tt-label {
    display: inline;
}

/* Le bouton trigger : reset BULLETPROOF.
 * Stratégie en 3 couches :
 *   1. all: revert pour neutraliser TOUTES les héritages CSS (thème, browser)
 *   2. Sélecteur double-classe .pxd-tt-trigger.pxd-tt-trigger pour augmenter
 *      artificiellement la spécificité (0,2,0 au lieu de 0,1,0)
 *   3. !important sur les propriétés visuelles que les thèmes touchent agressivement
 *
 * La double-classe est un hack standard en CSS pour augmenter la spécificité
 * sans nécessiter d'ID ni de sélecteur encore plus complexe.
 */
.pxd-dashboard .pxd-tt-trigger.pxd-tt-trigger,
.pxd-dashboard button.pxd-tt-trigger.pxd-tt-trigger {
    /* 1. Reset total des styles hérités */
    all: revert;

    /* 2. Redéfinir le style à zéro */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    margin: 0 0 0 4px !important;
    padding: 0 !important;

    /* Apparence */
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    color: #6b7280 !important;
    border: 1px solid #c5c5cc !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    text-shadow: none !important;

    /* Typographie */
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    font-style: normal !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-decoration: none !important;
    text-align: center !important;

    /* Comportement */
    cursor: help !important;
    vertical-align: middle !important;
    box-sizing: content-box !important;
    position: relative !important;
    transform: none !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    outline: none !important;
}

/* États interactifs : double-classe + tous les pseudos.
 * Au hover/focus, le trigger prend la couleur principale du thème (Elementor Pro)
 * pour être cohérent avec la charte du site. */
.pxd-dashboard .pxd-tt-trigger.pxd-tt-trigger:hover,
.pxd-dashboard .pxd-tt-trigger.pxd-tt-trigger:focus,
.pxd-dashboard .pxd-tt-trigger.pxd-tt-trigger:active,
.pxd-dashboard .pxd-tt-trigger.pxd-tt-trigger.pxd-tt-active,
.pxd-dashboard button.pxd-tt-trigger.pxd-tt-trigger:hover,
.pxd-dashboard button.pxd-tt-trigger.pxd-tt-trigger:focus,
.pxd-dashboard button.pxd-tt-trigger.pxd-tt-trigger:active,
.pxd-dashboard button.pxd-tt-trigger.pxd-tt-trigger.pxd-tt-active {
    background: var(--pxd-primary, #1a1a1a) !important;
    background-color: var(--pxd-primary, #1a1a1a) !important;
    background-image: none !important;
    color: #fff !important;
    border-color: var(--pxd-primary, #1a1a1a) !important;
    outline: none !important;
    transform: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.pxd-dashboard .pxd-tt-trigger.pxd-tt-trigger:focus-visible {
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.2) !important;
}

/* Empêcher le ? d'être sélectionnable et hériter de la couleur du parent */
.pxd-dashboard .pxd-tt-trigger > span {
    user-select: none !important;
    pointer-events: none !important;
    color: inherit !important;
    background: transparent !important;
    font: inherit !important;
}

/* La tooltip elle-même : déplacée dans <body> par le JS, donc PAS de
 * sélecteur parent .pxd-dashboard (elle n'est plus dedans). On utilise
 * une spécificité augmentée via .pxd-tt-content[role="tooltip"] et !important
 * pour résister aux styles globaux. */
.pxd-tt-content[role="tooltip"],
.pxd-tt-content {
    position: fixed !important;
    z-index: 999999 !important;
    max-width: 320px !important;
    min-width: 200px !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
    pointer-events: none !important;
    opacity: 0;
    transition: opacity 0.12s ease !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.pxd-tt-content.pxd-tt-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.pxd-tt-content[hidden] {
    display: none !important;
}

.pxd-tt-content .pxd-tt-title {
    display: block !important;
    font-weight: 600 !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    color: #fff !important;
    line-height: 1.4 !important;
}

.pxd-tt-content .pxd-tt-desc {
    display: block !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 400 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Petite flèche en haut ou en bas selon position calculée par JS */
.pxd-tt-content::before {
    content: "" !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    border-style: solid !important;
    border-width: 6px !important;
    border-color: transparent !important;
    left: var(--pxd-tt-arrow-x, 50%) !important;
    margin-left: -6px !important;
    background: transparent !important;
}

.pxd-tt-content.pxd-tt-position-bottom::before {
    top: -12px !important;
    border-bottom-color: #1a1a1a !important;
}

.pxd-tt-content.pxd-tt-position-top::before {
    bottom: -12px !important;
    border-top-color: #1a1a1a !important;
}

@media (max-width: 600px) {
    .pxd-tt-content {
        max-width: calc(100vw - 24px) !important;
        font-size: 12px !important;
    }
}
