/**
 * AIHT Affiliate Dashboard — Styles centralisés LUXE ULTIME
 * Version PRO avec multi-liens, graphiques, insights
 * Design adaptatif avec contrastes renforcés
 * Effets de néon sur les liens d'affiliation
 *
 * @package AIHT_Core
 * @since 2.1.0
 */

/* ============================================================
   OVERRIDES DU DASHBOARD
   ============================================================ */

.aiht-affiliate-dashboard {
    background: var(--aiht-bg-spatial-gradient);
    background-attachment: fixed;
    color: var(--aiht-text-primary);
    font-family: var(--aiht-font-body);
    min-height: 100vh;
    padding: 0;
    position: relative;
}

.aiht-affiliate-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    position: relative;
    z-index: 1;
}

/* ============================================================
   HEADER
   ============================================================ */

.aiht-affiliate-header {
    margin-bottom: 32px;
}

.aiht-affiliate-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.aiht-affiliate-header__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.aiht-affiliate-header__meta .aiht-text-small {
    font-size: var(--aiht-text-sm);
    color: var(--aiht-text-secondary);
}

.aiht-affiliate-header__actions {
    display: flex;
    gap: 8px;
}

.aiht-affiliate-performance-msg {
    padding: 14px 20px;
    background: rgba(155, 124, 247, 0.08);
    border-radius: var(--aiht-radius-md);
    border-left: 4px solid var(--aiht-violet);
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--aiht-text-secondary);
    font-size: var(--aiht-text-sm);
    box-shadow: var(--aiht-border-glow);
}

.aiht-affiliate-performance-msg__icon {
    font-size: 1.3rem;
}

.aiht-affiliate-performance-msg strong {
    color: var(--aiht-emerald);
}

/* ============================================================
   STATS GLOBAUX
   ============================================================ */

.aiht-stats-global {
    margin-bottom: 32px;
}

.aiht-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .aiht-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .aiht-stat-grid {
        grid-template-columns: 1fr;
    }
}

.aiht-stat-card {
    position: relative;
    padding: 22px 20px;
    border: 1px solid var(--aiht-border-subtle);
    border-radius: var(--aiht-radius-lg);
    background: var(--aiht-bg-card);
    box-shadow: var(--aiht-border-glow);
    transition: all var(--aiht-ease-normal);
    overflow: hidden;
}

.aiht-stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.2;
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 0;
}

.aiht-stat-card>* {
    position: relative;
    z-index: 1;
}

.aiht-stat-card:hover {
    border-color: var(--aiht-border-medium);
    transform: translateY(-3px);
    box-shadow: var(--aiht-border-glow-hover);
}

.aiht-stat-card--emerald {
    border-color: rgba(74, 222, 139, 0.2);
}
.aiht-stat-card--emerald:hover {
    border-color: rgba(74, 222, 139, 0.4);
    box-shadow: var(--aiht-border-glow-hover), var(--aiht-shadow-glow-emerald);
}
.aiht-stat-card--emerald .aiht-stat-card__value {
    color: var(--aiht-emerald);
}

.aiht-stat-card--gold {
    border-color: rgba(251, 191, 36, 0.2);
}
.aiht-stat-card--gold:hover {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: var(--aiht-border-glow-hover), var(--aiht-shadow-glow-gold);
}
.aiht-stat-card--gold .aiht-stat-card__value {
    color: var(--aiht-yellow);
}

.aiht-stat-card--violet {
    border-color: rgba(155, 124, 247, 0.2);
}
.aiht-stat-card--violet:hover {
    border-color: rgba(155, 124, 247, 0.4);
    box-shadow: var(--aiht-border-glow-hover), var(--aiht-shadow-glow-violet);
}
.aiht-stat-card--violet .aiht-stat-card__value {
    color: var(--aiht-violet);
}

.aiht-stat-card__label {
    display: block;
    color: var(--aiht-text-secondary);
    font-size: var(--aiht-text-xs);
    font-weight: var(--aiht-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.aiht-stat-card__value {
    display: block;
    font-size: var(--aiht-text-3xl);
    font-weight: var(--aiht-weight-bold);
    color: var(--aiht-text-primary);
    margin: 4px 0;
}

.aiht-stat-card__change {
    display: block;
    font-size: var(--aiht-text-xs);
    color: var(--aiht-text-secondary);
    margin-top: 2px;
}

/* ============================================================
   PROGRESS BAR — Luxe
   ============================================================ */

.aiht-progress-bar-wrapper {
    margin-top: 20px;
    padding: 18px 22px;
    background: var(--aiht-bg-card);
    border-radius: var(--aiht-radius-md);
    border: 1px solid var(--aiht-border-subtle);
    box-shadow: var(--aiht-border-glow);
}

.aiht-progress-bar__labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.aiht-progress-bar__label {
    color: var(--aiht-text-secondary);
    font-size: var(--aiht-text-sm);
}

.aiht-progress-bar__percentage {
    color: var(--aiht-violet);
    font-weight: var(--aiht-weight-semibold);
    font-size: var(--aiht-text-sm);
}

.aiht-progress-bar__track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.aiht-progress-bar__fill {
    height: 100%;
    background: var(--aiht-gradient-primary);
    border-radius: 4px;
    transition: width 0.8s ease;
    box-shadow: 0 0 20px var(--aiht-cobalt-glow);
}

.aiht-progress-bar__legend {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.aiht-progress-bar__legend-item {
    font-size: var(--aiht-text-xs);
    color: var(--aiht-text-secondary);
}

.aiht-progress-bar__legend-item--paid {
    color: var(--aiht-emerald);
}

.aiht-progress-bar__legend-item--pending {
    color: var(--aiht-yellow);
}

/* ============================================================
   GRAPHIQUES (CHART.JS) — Luxe
   ============================================================ */

.aiht-charts-section {
    margin-bottom: 32px;
}

.aiht-chart-card {
    padding: 24px 28px;
    border: 1px solid var(--aiht-border-subtle);
    border-radius: var(--aiht-radius-lg);
    background: var(--aiht-bg-card);
    box-shadow: var(--aiht-border-glow);
}

.aiht-chart-card__title {
    font-family: var(--aiht-font-heading);
    font-size: var(--aiht-text-lg);
    color: var(--aiht-text-primary);
    margin: 0 0 16px 0;
}

.aiht-chart-container {
    position: relative;
    height: 260px;
}

/* ============================================================
   SECTION TITRES — Luxe
   ============================================================ */

.aiht-section-title {
    font-family: var(--aiht-font-heading);
    font-size: var(--aiht-text-2xl);
    color: var(--aiht-text-primary);
    margin: 0 0 4px 0;
    background: var(--aiht-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.aiht-section-subtitle {
    color: var(--aiht-text-secondary);
    font-size: var(--aiht-text-sm);
    margin: 0 0 20px 0;
}

/* ============================================================
   COURSES LINKS GRID — Luxe
   ============================================================ */

.aiht-course-links-section {
    margin-bottom: 32px;
}

.aiht-course-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .aiht-course-links-grid {
        grid-template-columns: 1fr;
    }
}

.aiht-course-link-card {
    position: relative;
    padding: 22px 24px;
    border: 1px solid var(--aiht-border-subtle);
    border-radius: var(--aiht-radius-lg);
    background: var(--aiht-bg-card);
    box-shadow: var(--aiht-border-glow);
    transition: all var(--aiht-ease-normal);
    overflow: hidden;
}

.aiht-course-link-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.2;
    pointer-events: none;
    mix-blend-mode: overlay;
    z-index: 0;
}

.aiht-course-link-card>* {
    position: relative;
    z-index: 1;
}

.aiht-course-link-card:hover {
    border-color: var(--aiht-border-medium);
    transform: translateY(-3px);
    box-shadow: var(--aiht-border-glow-hover);
}

.aiht-course-link-card--featured {
    border-color: rgba(74, 222, 139, 0.25);
    background: linear-gradient(145deg, rgba(26, 26, 58, 0.92) 0%, rgba(18, 18, 38, 0.96) 100%);
}

.aiht-course-link-card--featured:hover {
    border-color: rgba(74, 222, 139, 0.4);
    box-shadow: var(--aiht-border-glow-hover), var(--aiht-shadow-glow-emerald);
}

.aiht-course-link-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.aiht-course-link-card__title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.aiht-course-link-card__rank {
    font-size: 1.3rem;
}

.aiht-course-link-card__title {
    font-family: var(--aiht-font-heading);
    font-size: var(--aiht-text-base);
    color: var(--aiht-text-primary);
    margin: 0;
}

.aiht-course-link-card__price {
    font-weight: var(--aiht-weight-bold);
    color: var(--aiht-violet);
    font-size: var(--aiht-text-base);
    white-space: nowrap;
    background: rgba(155, 124, 247, 0.1);
    padding: 2px 12px;
    border-radius: var(--aiht-radius-full);
    border: 1px solid rgba(155, 124, 247, 0.15);
}

.aiht-course-link-card--coming {
    border-style: dashed;
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 200px;
}

.aiht-course-link-card--coming:hover {
    transform: none;
    border-color: var(--aiht-border-subtle);
}

.aiht-course-link-card__coming-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.aiht-course-link-card__coming-icon {
    font-size: 2.8rem;
    opacity: 0.5;
}

.aiht-course-link-card__coming-title {
    font-family: var(--aiht-font-heading);
    font-size: var(--aiht-text-lg);
    color: var(--aiht-text-secondary);
    margin: 0;
}

.aiht-course-link-card__coming-text {
    color: var(--aiht-text-muted);
    font-size: var(--aiht-text-sm);
    margin: 0;
}

/* ============================================================
   LINK BOX — NÉON LUXE ULTIME (PROPOSITION 4)
   ============================================================ */

.aiht-link-box {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--aiht-border-subtle);
    border-radius: var(--aiht-radius-md);
    padding: 6px 6px 8px 16px;
    transition: all var(--aiht-ease-normal);
    overflow: hidden;
    margin-bottom: 14px;
}

/* Effet de néon au hover */
.aiht-link-box::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--aiht-radius-md);
    padding: 2px;
    background: var(--aiht-gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--aiht-ease-normal);
    pointer-events: none;
}

.aiht-link-box:hover::before {
    opacity: 1;
}

.aiht-link-box:hover {
    border-color: transparent;
    box-shadow: var(--aiht-shadow-glow-violet), 0 0 60px rgba(155, 124, 247, 0.05);
}

.aiht-link-box:focus-within {
    border-color: transparent;
    box-shadow: var(--aiht-shadow-glow-violet), 0 0 60px rgba(155, 124, 247, 0.08);
}

.aiht-link-box:focus-within::before {
    opacity: 1;
}

/* Ligne de séparation élégante */
.aiht-link-box__separator {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--aiht-border-subtle), transparent);
    margin: 2px 0 4px 0;
}

.aiht-link-box__row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.aiht-link-box__icon {
    color: var(--aiht-text-muted);
    font-size: var(--aiht-text-base);
    flex-shrink: 0;
    transition: color var(--aiht-ease-normal);
}

.aiht-link-box:hover .aiht-link-box__icon {
    color: var(--aiht-text-secondary);
}

.aiht-link-box__url {
    flex: 1;
    padding: 6px 0;
    background: transparent;
    border: none;
    color: var(--aiht-text-secondary);
    font-size: var(--aiht-text-xs);
    font-family: var(--aiht-font-mono, monospace);
    outline: none;
    min-width: 0;
    letter-spacing: 0.02em;
    transition: color var(--aiht-ease-normal);
    cursor: text;
    line-height: 1.6;
}

.aiht-link-box__url::selection {
    background: rgba(155, 124, 247, 0.25);
    color: var(--aiht-text-primary);
}

.aiht-link-box__url:hover {
    color: var(--aiht-text-primary);
}

.aiht-link-box__url:focus {
    color: var(--aiht-text-primary);
}

.aiht-link-box__actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    padding-right: 2px;
}

.aiht-link-box__divider {
    width: 1px;
    height: 20px;
    background: var(--aiht-border-subtle);
    flex-shrink: 0;
}

/* Boutons d'action dans le link box */
.aiht-link-box__action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--aiht-border-subtle);
    border-radius: var(--aiht-radius-sm);
    color: var(--aiht-text-secondary);
    font-size: var(--aiht-text-xs);
    cursor: pointer;
    transition: all var(--aiht-ease-fast);
    font-family: var(--aiht-font-body);
    white-space: nowrap;
}

.aiht-link-box__action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--aiht-border-medium);
    color: var(--aiht-text-primary);
    transform: translateY(-1px);
}

.aiht-link-box__action-btn:active {
    transform: translateY(0px);
}

/* Bouton primaire (Copier) avec dégradé */
.aiht-link-box__action-btn--primary {
    background: var(--aiht-gradient-primary);
    border: none;
    color: var(--aiht-text-primary);
    box-shadow: 0 2px 15px var(--aiht-cobalt-glow);
}

.aiht-link-box__action-btn--primary:hover {
    box-shadow: 0 4px 25px var(--aiht-cobalt-glow);
    transform: translateY(-1px);
    background: var(--aiht-gradient-primary-hover);
}

.aiht-link-box__action-btn--primary:active {
    transform: translateY(0px);
}

/* Bouton secondaire (Partager) */
.aiht-link-box__action-btn--secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--aiht-border-subtle);
}

.aiht-link-box__action-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--aiht-border-medium);
}

/* Bouton succès (après copie) */
.aiht-link-box__action-btn--success {
    background: rgba(74, 222, 139, 0.15);
    border-color: rgba(74, 222, 139, 0.3);
    color: var(--aiht-emerald);
}

.aiht-link-box__action-btn--success:hover {
    background: rgba(74, 222, 139, 0.2);
    border-color: rgba(74, 222, 139, 0.4);
    color: var(--aiht-emerald);
}

/* Statut "en ligne" avec pulsation */
.aiht-link-box__status {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 12px;
    background: rgba(74, 222, 139, 0.08);
    border: 1px solid rgba(74, 222, 139, 0.12);
    border-radius: var(--aiht-radius-full);
    color: var(--aiht-emerald);
    font-size: var(--aiht-text-xs);
    font-weight: var(--aiht-weight-medium);
    flex-shrink: 0;
}

.aiht-link-box__status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--aiht-emerald);
    animation: aiht-pulse-dot 1.5s infinite;
}

/* Feedback de copie (tooltip flottant) */
.aiht-link-box__copy-feedback {
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    padding: 5px 16px;
    background: var(--aiht-bg-card);
    border: 1px solid var(--aiht-border-medium);
    border-radius: var(--aiht-radius-full);
    color: var(--aiht-emerald);
    font-size: var(--aiht-text-xs);
    font-weight: var(--aiht-weight-medium);
    opacity: 0;
    transition: all var(--aiht-ease-normal);
    pointer-events: none;
    white-space: nowrap;
    box-shadow: var(--aiht-border-glow), var(--aiht-shadow-glow-emerald);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
}

.aiht-link-box__copy-feedback--show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    top: -42px;
}

/* Flèche du tooltip */
.aiht-link-box__copy-feedback::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--aiht-bg-card);
    border-right: 1px solid var(--aiht-border-medium);
    border-bottom: 1px solid var(--aiht-border-medium);
}

/* Animation de pulsation du tooltip */
@keyframes aiht-feedback-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

.aiht-link-box__copy-feedback--pulse {
    animation: aiht-feedback-pulse 0.4s ease;
}

/* ============================================================
   STATS MINI PAR COURS — Luxe
   ============================================================ */

.aiht-course-link-card__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

@media (max-width: 480px) {
    .aiht-course-link-card__stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.aiht-stat-mini {
    text-align: center;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--aiht-radius-sm);
    border: 1px solid var(--aiht-border-subtle);
    transition: all var(--aiht-ease-normal);
}

.aiht-stat-mini:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--aiht-border-medium);
}

.aiht-stat-mini--emerald .aiht-stat-mini__value {
    color: var(--aiht-emerald);
}
.aiht-stat-mini--emerald {
    border-color: rgba(74, 222, 139, 0.1);
}

.aiht-stat-mini--gold .aiht-stat-mini__value {
    color: var(--aiht-yellow);
}
.aiht-stat-mini--gold {
    border-color: rgba(251, 191, 36, 0.1);
}

.aiht-stat-mini--violet .aiht-stat-mini__value {
    color: var(--aiht-violet);
}
.aiht-stat-mini--violet {
    border-color: rgba(155, 124, 247, 0.1);
}

.aiht-stat-mini__label {
    display: block;
    font-size: var(--aiht-text-xs);
    color: var(--aiht-text-secondary);
}

.aiht-stat-mini__value {
    display: block;
    font-weight: var(--aiht-weight-bold);
    font-size: var(--aiht-text-base);
    color: var(--aiht-text-primary);
}

/* ============================================================
   MESSAGES PRÉ-ÉCRITS (Accordeon) — Luxe
   ============================================================ */

.aiht-messages-toggle {
    margin-top: 4px;
}

.aiht-messages-toggle__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--aiht-border-subtle);
    border-radius: var(--aiht-radius-sm);
    padding: 8px 16px;
    color: var(--aiht-text-secondary);
    font-size: var(--aiht-text-sm);
    cursor: pointer;
    transition: all var(--aiht-ease-normal);
    width: 100%;
    font-family: var(--aiht-font-body);
}

.aiht-messages-toggle__btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--aiht-text-primary);
    border-color: var(--aiht-border-medium);
}

.aiht-messages-toggle__arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform var(--aiht-ease-normal);
}

.aiht-messages-toggle__content {
    margin-top: 10px;
    display: none;
    animation: aiht-fade-in 0.3s ease;
}

.aiht-message-block {
    padding: 14px 16px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--aiht-radius-sm);
    border: 1px solid var(--aiht-border-subtle);
    transition: border-color var(--aiht-ease-normal);
}

.aiht-message-block:hover {
    border-color: var(--aiht-border-medium);
}

.aiht-message-block:last-child {
    margin-bottom: 0;
}

.aiht-message-block__icon {
    font-size: 1.1rem;
    margin-right: 6px;
}

.aiht-message-block__label {
    font-weight: var(--aiht-weight-semibold);
    color: var(--aiht-text-secondary);
    font-size: var(--aiht-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.aiht-message-block__text {
    padding: 10px 12px;
    margin: 6px 0 10px 0;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--aiht-radius-sm);
    color: var(--aiht-text-secondary);
    font-size: var(--aiht-text-sm);
    line-height: 1.7;
    cursor: pointer;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--aiht-font-body);
    transition: all var(--aiht-ease-normal);
    max-height: 160px;
    overflow-y: auto;
    border-left: 3px solid var(--aiht-border-violet);
}

.aiht-message-block__text:hover {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: var(--aiht-violet);
}

/* ============================================================
   INSIGHTS — Luxe
   ============================================================ */

.aiht-insights-section {
    margin-bottom: 32px;
}

.aiht-insights-card {
    padding: 22px 28px;
    border: 1px solid rgba(155, 124, 247, 0.15);
    border-radius: var(--aiht-radius-lg);
    background: linear-gradient(145deg, rgba(26, 26, 58, 0.92) 0%, rgba(18, 18, 38, 0.96) 100%);
    box-shadow: var(--aiht-border-glow), var(--aiht-shadow-glow-violet);
}

.aiht-insights-card__title {
    font-family: var(--aiht-font-heading);
    font-size: var(--aiht-text-base);
    color: var(--aiht-text-primary);
    margin: 0 0 12px 0;
}

.aiht-insights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
}

@media (max-width: 600px) {
    .aiht-insights-grid {
        grid-template-columns: 1fr;
    }
}

.aiht-insight-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--aiht-border-subtle);
}

.aiht-insight-item:last-child {
    border-bottom: none;
}

.aiht-insight-item__icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.aiht-insight-item__text {
    color: var(--aiht-text-secondary);
    font-size: var(--aiht-text-sm);
    line-height: 1.6;
    margin: 0;
}

/* ============================================================
   COMMANDES (TABLEAU + FILTRE) — Luxe
   ============================================================ */

.aiht-orders-section {
    margin-bottom: 32px;
}

.aiht-orders-card {
    padding: 22px 28px;
    border: 1px solid var(--aiht-border-subtle);
    border-radius: var(--aiht-radius-lg);
    background: var(--aiht-bg-card);
    box-shadow: var(--aiht-border-glow);
}

.aiht-orders-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.aiht-orders-card__title {
    font-family: var(--aiht-font-heading);
    font-size: var(--aiht-text-base);
    color: var(--aiht-text-primary);
    margin: 0;
}

.aiht-orders-card__filters {
    display: flex;
    gap: 8px;
    align-items: center;
}

.aiht-orders-card__footer {
    margin-top: 14px;
    text-align: center;
}

.aiht-select {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--aiht-border-subtle);
    border-radius: var(--aiht-radius-sm);
    color: var(--aiht-text-primary);
    font-size: var(--aiht-text-sm);
    font-family: var(--aiht-font-body);
    cursor: pointer;
    outline: none;
    min-width: 150px;
    transition: all var(--aiht-ease-normal);
}

.aiht-select:hover {
    border-color: var(--aiht-border-medium);
}

.aiht-select:focus {
    border-color: var(--aiht-violet);
    box-shadow: 0 0 0 3px rgba(155, 124, 247, 0.15);
}

.aiht-select option {
    background: var(--aiht-bg-surface);
    color: var(--aiht-text-primary);
}

/* ============================================================
   TABLEAU — Luxe
   ============================================================ */

.aiht-table-wrapper {
    overflow-x: auto;
}

.aiht-conversion-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--aiht-text-sm);
}

.aiht-conversion-table thead th {
    text-align: left;
    padding: 12px 12px;
    color: var(--aiht-text-secondary);
    font-weight: var(--aiht-weight-semibold);
    font-size: var(--aiht-text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--aiht-border-subtle);
}

.aiht-conversion-table tbody td {
    padding: 12px 12px;
    border-bottom: 1px solid var(--aiht-border-subtle);
    color: var(--aiht-text-secondary);
}

.aiht-conversion-table tbody tr {
    transition: background var(--aiht-ease-fast);
}

.aiht-conversion-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

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

/* ============================================================
   STATUS BADGES (Tableau) — Luxe
   ============================================================ */

.aiht-status-badge {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: var(--aiht-text-xs);
    font-weight: var(--aiht-weight-medium);
    letter-spacing: 0.02em;
}

.aiht-status-badge--paid {
    background: rgba(74, 222, 139, 0.15);
    color: var(--aiht-emerald);
    border: 1px solid rgba(74, 222, 139, 0.2);
}

.aiht-status-badge--validated {
    background: rgba(251, 191, 36, 0.15);
    color: var(--aiht-yellow);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.aiht-status-badge--pending {
    background: rgba(251, 191, 36, 0.1);
    color: var(--aiht-yellow);
    border: 1px solid rgba(251, 191, 36, 0.15);
}

.aiht-status-badge--cancelled {
    background: rgba(248, 113, 113, 0.15);
    color: var(--aiht-red);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.aiht-status-badge--inactive {
    background: rgba(148, 163, 184, 0.1);
    color: var(--aiht-text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

/* ============================================================
   EMPTY STATE — Luxe
   ============================================================ */

.aiht-empty-state {
    text-align: center;
    padding: 48px 20px;
}

.aiht-empty-state__icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 14px;
    opacity: 0.6;
}

.aiht-empty-state__text {
    color: var(--aiht-text-secondary);
    font-size: var(--aiht-text-base);
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================================
   BOUTONS (Tailles supplémentaires)
   ============================================================ */

.aiht-btn--sm {
    padding: 6px 16px;
    font-size: var(--aiht-text-xs);
}

.aiht-btn--xs {
    padding: 4px 12px;
    font-size: var(--aiht-text-xs);
}

.aiht-btn--outline {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--aiht-border-medium);
    color: var(--aiht-text-secondary);
}

.aiht-btn--outline:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--aiht-text-primary);
    border-color: var(--aiht-border-strong);
}

.aiht-copy--success {
    color: var(--aiht-emerald) !important;
    border-color: rgba(74, 222, 139, 0.3) !important;
    background: rgba(74, 222, 139, 0.1) !important;
}

/* ============================================================
   BADGES (Supplementaires)
   ============================================================ */

.aiht-badge--sm {
    padding: 2px 12px;
    font-size: var(--aiht-text-xs);
}

.aiht-badge--emerald {
    background: rgba(74, 222, 139, 0.12);
    border: 1px solid rgba(74, 222, 139, 0.2);
    color: var(--aiht-emerald);
}

.aiht-badge--inactive {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.15);
    color: var(--aiht-text-secondary);
}

/* ============================================================
   ANIMATIONS SPÉCIALES
   ============================================================ */

@keyframes aiht-pulse-dot {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(74, 222, 139, 0.4);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 0 6px rgba(74, 222, 139, 0);
    }
}

@keyframes aiht-neon-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(155, 124, 247, 0.1), 0 0 40px rgba(155, 124, 247, 0.05);
    }
    50% {
        box-shadow: 0 0 30px rgba(155, 124, 247, 0.2), 0 0 60px rgba(155, 124, 247, 0.08);
    }
}

.aiht-link-box--pulse {
    animation: aiht-neon-pulse 3s ease-in-out infinite;
}

/* ============================================================
   RESPONSIVE FINE-TUNING
   ============================================================ */

@media (max-width: 768px) {
    .aiht-affiliate-shell {
        padding: 20px 16px;
    }
    
    .aiht-affiliate-header__top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .aiht-affiliate-header__meta {
        flex-wrap: wrap;
    }
    
    .aiht-orders-card__header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .aiht-select {
        width: 100%;
    }
    
    .aiht-chart-container {
        height: 180px;
    }

    .aiht-stat-card {
        padding: 18px 16px;
    }
    
    .aiht-stat-card__value {
        font-size: var(--aiht-text-2xl);
    }

    /* Adaptations du link box en mobile */
    .aiht-link-box {
        padding: 6px 6px 8px 12px;
    }

    .aiht-link-box__row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .aiht-link-box__url {
        font-size: var(--aiht-text-xs);
        width: 100%;
        order: 2;
    }

    .aiht-link-box__icon {
        order: 1;
    }

    .aiht-link-box__actions {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        padding-top: 4px;
        flex-wrap: wrap;
    }

    .aiht-link-box__status {
        display: none;
    }

    .aiht-link-box__copy-feedback {
        top: -32px;
        font-size: var(--aiht-text-xs);
        padding: 4px 12px;
    }

    .aiht-link-box__copy-feedback--show {
        top: -38px;
    }
}

@media (max-width: 480px) {
    .aiht-stat-card__value {
        font-size: var(--aiht-text-xl);
    }
    
    .aiht-course-link-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .aiht-link-box {
        padding: 6px 6px 8px 10px;
    }

    .aiht-link-box__action-btn {
        padding: 4px 10px;
        font-size: var(--aiht-text-xs);
    }

    .aiht-link-box__action-btn--primary {
        flex: 1;
        justify-content: center;
    }

    .aiht-course-link-card {
        padding: 16px 18px;
    }

    .aiht-orders-card {
        padding: 16px 18px;
    }

    .aiht-insights-card {
        padding: 18px 18px;
    }

    .aiht-chart-card {
        padding: 18px 16px;
    }

    .aiht-link-box__url {
        font-size: 10px;
        padding: 4px 0;
    }
}

/* Support des écrans très petits */
@media (max-width: 360px) {
    .aiht-link-box__action-btn {
        padding: 4px 8px;
        font-size: 10px;
        gap: 4px;
    }

    .aiht-link-box__action-btn .aiht-link-box__action-icon {
        display: none;
    }

    .aiht-link-box__status {
        display: none;
    }
}