/* ============================================================================
 * EMG Customer Portal — Design System
 *
 * Identité visuelle :
 *   - sobre, pro, clair
 *   - accent bleu (slate-blue / royal blue)
 *   - typographie système (perf maximale, lecture optimale)
 *   - cards blanches sur fond gris-très-clair, ombres légères
 *   - radius modérés (8/12px), espacements 4/8/12/16/24/32
 *
 * Conventions :
 *   - Préfixe classes : .e-* (EMG)
 *   - Variables CSS sous --e-*
 *   - Mobile-first, breakpoints à 720px / 1024px / 1280px
 * ========================================================================== */

/* --------- Variables --------- */
.emg-app-root,
.emg-app-root * {
    box-sizing: border-box;
}

/* Mode fullscreen : neutralise complètement le thème */
body.emg-fullscreen {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
}
body.emg-fullscreen > *:not(.emg-app-root):not(script):not(style):not(noscript):not(#wpadminbar) {
    /* Les thèmes peuvent injecter d'autres éléments — on les masque
       (sauf wpadminbar qui est géré par show_admin_bar(false)). */
}
body.emg-fullscreen .emg-app-root { min-height: 100vh; }

.emg-app-root {
    /* Palette neutre */
    --e-gray-0:  #ffffff;
    --e-gray-50: #f8fafc;
    --e-gray-100:#f1f5f9;
    --e-gray-150:#e9eef5;
    --e-gray-200:#e2e8f0;
    --e-gray-300:#cbd5e1;
    --e-gray-400:#94a3b8;
    --e-gray-500:#64748b;
    --e-gray-600:#475569;
    --e-gray-700:#334155;
    --e-gray-800:#1e293b;
    --e-gray-900:#0f172a;

    /* Accent bleu */
    --e-blue-50:  #eff6ff;
    --e-blue-100: #dbeafe;
    --e-blue-200: #bfdbfe;
    --e-blue-300: #93c5fd;
    --e-blue-400: #60a5fa;
    --e-blue-500: #3b82f6;
    --e-blue-600: #2563eb;
    --e-blue-700: #1d4ed8;
    --e-blue-800: #1e40af;
    --e-blue-900: #1e3a8a;

    /* Sémantique */
    --e-success-50:  #f0fdf4;
    --e-success-500: #22c55e;
    --e-success-600: #16a34a;
    --e-success-700: #15803d;

    --e-warning-50:  #fffbeb;
    --e-warning-500: #f59e0b;
    --e-warning-600: #d97706;
    --e-warning-700: #b45309;

    --e-danger-50:   #fef2f2;
    --e-danger-500:  #ef4444;
    --e-danger-600:  #dc2626;
    --e-danger-700:  #b91c1c;

    --e-info-50:     #eff6ff;
    --e-info-500:    #3b82f6;
    --e-info-700:    #1d4ed8;

    /* App */
    --e-bg:           var(--e-gray-50);
    --e-bg-elev:      var(--e-gray-0);
    --e-text:         var(--e-gray-900);
    --e-text-muted:   var(--e-gray-500);
    --e-text-subtle:  var(--e-gray-400);
    --e-border:       var(--e-gray-200);
    --e-border-soft:  var(--e-gray-150);
    --e-primary:      var(--e-blue-600);
    --e-primary-hover:var(--e-blue-700);
    --e-primary-active:var(--e-blue-800);

    --e-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
    --e-shadow-md: 0 4px 12px rgba(15, 23, 42, .06);
    --e-shadow-lg: 0 12px 28px rgba(15, 23, 42, .08);

    --e-radius-sm: 6px;
    --e-radius-md: 10px;
    --e-radius-lg: 14px;
    --e-radius-pill: 999px;

    --e-fz-xs: 12px;
    --e-fz-sm: 13px;
    --e-fz-md: 14px;
    --e-fz-lg: 16px;
    --e-fz-xl: 20px;
    --e-fz-2xl: 24px;
    --e-fz-3xl: 32px;

    --e-fw-medium: 500;
    --e-fw-semibold: 600;
    --e-fw-bold: 700;

    --e-sidebar-w: 240px;
    --e-topbar-h:  60px;

    color: var(--e-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    font-size: var(--e-fz-md);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --------- Bootstrap loader (avant Vue mount) --------- */
.emg-app-bootstrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    color: var(--e-text-muted);
    gap: 16px;
}

/* --------- Spinner --------- */
.emg-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--e-gray-200);
    border-top-color: var(--e-primary);
    border-radius: 50%;
    animation: emg-spin .8s linear infinite;
    vertical-align: middle;
}
.emg-spinner--sm { width: 12px; height: 12px; border-width: 2px; }
.emg-spinner--md { width: 18px; height: 18px; border-width: 2px; }
.emg-spinner--lg { width: 32px; height: 32px; border-width: 3px; }
@keyframes emg-spin { to { transform: rotate(360deg); } }

/* --------- Base layout app --------- */
.emg-app-root .e-root { background: var(--e-bg); min-height: 100vh; }

.e-app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--e-bg);
}

.e-sidebar {
    width: var(--e-sidebar-w);
    background: var(--e-gray-0);
    border-right: 1px solid var(--e-border-soft);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.e-sidebar__brand {
    padding: 18px 24px;
    border-bottom: 1px solid var(--e-border-soft);
}
.e-sidebar__logo {
    font-size: 22px;
    font-weight: var(--e-fw-bold);
    color: var(--e-primary);
    letter-spacing: -0.02em;
}
.e-sidebar__nav {
    padding: 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.e-sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--e-radius-sm);
    color: var(--e-gray-600);
    text-decoration: none;
    font-weight: var(--e-fw-medium);
    transition: background .15s, color .15s;
}
.e-sidebar__link:hover {
    background: var(--e-gray-100);
    color: var(--e-gray-900);
}
.e-sidebar__link.is-active {
    background: var(--e-blue-50);
    color: var(--e-primary);
}
.e-sidebar__ico {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.e-sidebar__ico svg { width: 18px; height: 18px; }
.e-sidebar__bottom {
    padding: 12px 16px;
    border-top: 1px solid var(--e-border-soft);
}
.e-sidebar__admin-link {
    display: block;
    font-size: var(--e-fz-xs);
    color: var(--e-text-muted);
    text-decoration: none;
    margin-top: 10px;
}
.e-sidebar__admin-link:hover { color: var(--e-primary); }

/* CTA "Acheter un plan" en pied de sidebar avec animations continues */
.e-sidebar__cta {
    position: relative;
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--e-blue-600) 0%, var(--e-blue-800) 100%);
    color: white;
    text-align: center;
    padding: 11px 16px;
    border-radius: var(--e-radius-sm);
    text-decoration: none;
    font-weight: var(--e-fw-semibold);
    font-size: var(--e-fz-sm);
    border: 0;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
    animation: e-cta-glow 2.8s ease-in-out infinite;
    transition: transform .1s;
}
.e-sidebar__cta:hover { transform: translateY(-1px); }
.e-sidebar__cta:active { transform: translateY(0); }
.e-sidebar__cta-label { position: relative; z-index: 2; }
.e-sidebar__cta-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    transform: skewX(-20deg);
    animation: e-cta-shine 2.8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}
@keyframes e-cta-glow {
    0%, 100% { box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3), 0 0 0 0 rgba(37, 99, 235, 0); }
    50%      { box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3), 0 0 24px 4px rgba(37, 99, 235, 0.45); }
}
@keyframes e-cta-shine {
    0%   { left: -100%; }
    60%  { left: 200%; }
    100% { left: 200%; }
}

/* Variante "shine" pour autres boutons primaires (utilisée sur PlansPage) */
.e-btn.e-btn--shine {
    position: relative;
    overflow: hidden;
}
.e-btn.e-btn--shine::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    animation: e-cta-shine 3s ease-in-out infinite;
    pointer-events: none;
}

.e-sidebar-backdrop {
    display: none;
}

.e-app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.e-topbar {
    height: var(--e-topbar-h);
    background: var(--e-gray-0);
    border-bottom: 1px solid var(--e-border-soft);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.e-topbar__burger {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--e-gray-700);
    padding: 6px;
}
.e-topbar__burger svg { width: 22px; height: 22px; }
.e-topbar__spacer { flex: 1; }
.e-topbar__user { position: relative; }

.e-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--e-border-soft);
    background: var(--e-gray-0);
    border-radius: var(--e-radius-pill);
    cursor: pointer;
    color: var(--e-gray-700);
    transition: border-color .15s, background .15s;
}
.e-user-chip:hover {
    border-color: var(--e-gray-300);
    background: var(--e-gray-50);
}
.e-user-chip__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--e-blue-600);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--e-fw-semibold);
    font-size: var(--e-fz-sm);
}
.e-user-chip__email {
    font-size: var(--e-fz-sm);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.e-user-chip__chev svg { width: 14px; height: 14px; color: var(--e-gray-400); }

.e-user-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--e-gray-0);
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius-md);
    box-shadow: var(--e-shadow-md);
    min-width: 220px;
    padding: 6px;
    z-index: 100;
}
.e-user-menu__item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--e-radius-sm);
    color: var(--e-gray-700);
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    font-size: var(--e-fz-sm);
}
.e-user-menu__item:hover { background: var(--e-gray-100); color: var(--e-gray-900); }
.e-user-menu__item--danger:hover { background: var(--e-danger-50); color: var(--e-danger-700); }
.e-user-menu__ico svg { width: 14px; height: 14px; }
.e-user-menu__sep {
    height: 1px;
    background: var(--e-gray-200, #e5e7eb);
    margin: 4px 0;
}

.e-app-content {
    flex: 1;
    padding: 28px 32px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Routes avec meta.fullscreen=true : padding zéro, plein écran sous la sidebar. */
.e-app-content--fullscreen {
    padding: 0;
    max-width: none;
    margin: 0;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.e-app-main.is-fullscreen { height: 100vh; min-height: 100vh; }

/* --------- Page header --------- */
.e-page__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.e-page__header h1 {
    font-size: var(--e-fz-2xl);
    font-weight: var(--e-fw-semibold);
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

/* Variante page détail : titre à gauche, actions inline à droite */
.e-page__header--domain .e-page__header-main { flex: 1; min-width: 0; }
.e-page__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.e-page__title-row h1 { margin: 0; }
.e-page__title-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: var(--e-fz-md);
    color: var(--e-text-muted);
}
.e-page__title-actions .e-link { white-space: nowrap; }
.e-page__subtitle {
    color: var(--e-text-muted);
    margin: 0;
    font-size: var(--e-fz-md);
    display: flex;
    align-items: center;
    gap: 12px;
}
.e-breadcrumb {
    display: inline-block;
    color: var(--e-text-muted);
    text-decoration: none;
    font-size: var(--e-fz-sm);
    margin-bottom: 4px;
}
.e-breadcrumb:hover { color: var(--e-primary); }

/* --------- Card --------- */
.e-card {
    background: var(--e-gray-0);
    border: 1px solid var(--e-border-soft);
    border-radius: var(--e-radius-md);
    box-shadow: var(--e-shadow-sm);
    margin-bottom: 20px;
}
.e-card.is-elevated { box-shadow: var(--e-shadow-md); }

.e-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--e-border-soft);
    gap: 12px;
}
.e-card__title {
    margin: 0;
    font-size: var(--e-fz-md);
    font-weight: var(--e-fw-semibold);
    color: var(--e-gray-900);
}
.e-card__subtitle {
    margin: 2px 0 0;
    font-size: var(--e-fz-xs);
    color: var(--e-text-muted);
}
.e-card__header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.e-card__body { padding: 18px; }
.e-card__footer {
    padding: 14px 18px;
    border-top: 1px solid var(--e-border-soft);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.e-card--p-sm .e-card__body { padding: 12px; }
.e-card--p-md .e-card__body { padding: 18px; }
.e-card--p-lg .e-card__body { padding: 24px; }
.e-card--p-none .e-card__body { padding: 0; }
.e-card--p-none .e-card__header { padding: 14px 18px; }

/* --------- Stats grid --------- */
.e-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.e-stat__label {
    font-size: var(--e-fz-xs);
    color: var(--e-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    font-weight: var(--e-fw-medium);
}
.e-stat__value {
    font-size: var(--e-fz-3xl);
    font-weight: var(--e-fw-bold);
    color: var(--e-gray-900);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.e-stat__value--sm { font-size: var(--e-fz-lg); font-weight: var(--e-fw-medium); }
.e-stat__sub {
    font-size: var(--e-fz-md);
    font-weight: var(--e-fw-medium);
    color: var(--e-text-muted);
}
.e-stat__hint {
    margin-top: 6px;
    font-size: var(--e-fz-xs);
    color: var(--e-text-muted);
}

/* --------- Buttons --------- */
.e-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--e-radius-sm);
    font-weight: var(--e-fw-semibold);
    font-size: var(--e-fz-md);
    line-height: 1;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
    text-decoration: none;
    white-space: nowrap;
}
.e-btn:active { transform: translateY(1px); }
.e-btn.is-disabled, .e-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.e-btn--block { width: 100%; }

.e-btn--sm { padding: 6px 12px; font-size: var(--e-fz-sm); }
.e-btn--md { padding: 9px 16px; }
.e-btn--lg { padding: 12px 22px; font-size: var(--e-fz-lg); }

.e-btn--primary {
    background: var(--e-primary);
    color: white;
    box-shadow: 0 1px 2px rgba(37, 99, 235, .25);
}
.e-btn--primary:hover:not(.is-disabled) { background: var(--e-primary-hover); }
.e-btn--primary:focus-visible { outline: 3px solid var(--e-blue-200); outline-offset: 1px; }

.e-btn--secondary {
    background: var(--e-gray-0);
    border-color: var(--e-border);
    color: var(--e-gray-800);
}
.e-btn--secondary:hover:not(.is-disabled) { background: var(--e-gray-50); border-color: var(--e-gray-300); }

.e-btn--ghost {
    background: transparent;
    color: var(--e-gray-700);
}
.e-btn--ghost:hover:not(.is-disabled) { background: var(--e-gray-100); }

.e-btn--danger {
    background: var(--e-danger-600);
    color: white;
}
.e-btn--danger:hover:not(.is-disabled) { background: var(--e-danger-700); }

.e-btn--link {
    background: transparent;
    color: var(--e-primary);
    padding: 0;
}
.e-btn--link:hover:not(.is-disabled) { text-decoration: underline; }

.e-btn__icon svg, .e-btn .emg-spinner { width: 14px; height: 14px; }
.e-btn--primary .emg-spinner { border-color: rgba(255,255,255,.4); border-top-color: white; }

/* --------- Badge --------- */
.e-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: var(--e-radius-pill);
    font-size: var(--e-fz-xs);
    font-weight: var(--e-fw-semibold);
    line-height: 1.6;
    white-space: nowrap;
}
.e-badge--sm { padding: 1px 8px; font-size: 11px; }
.e-badge__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}
.e-badge--success { background: var(--e-success-50); color: var(--e-success-700); }
.e-badge--warning { background: var(--e-warning-50); color: var(--e-warning-700); }
.e-badge--danger  { background: var(--e-danger-50);  color: var(--e-danger-700); }
.e-badge--info    { background: var(--e-info-50);    color: var(--e-info-700); }
.e-badge--neutral { background: var(--e-gray-100);   color: var(--e-gray-700); }

/* --------- Links --------- */
.e-link {
    color: var(--e-primary);
    text-decoration: none;
    font-weight: var(--e-fw-medium);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}
.e-link:hover { text-decoration: underline; }
.e-link--danger { color: var(--e-danger-600); }
.e-link--danger:hover { color: var(--e-danger-700); }

/* --------- Form fields --------- */
.e-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.e-field__label {
    font-size: var(--e-fz-sm);
    font-weight: var(--e-fw-medium);
    color: var(--e-gray-700);
}
.e-field__req {
    color: var(--e-danger-600);
    margin-left: 2px;
}
.e-field__input,
.e-input {
    appearance: none;
    -webkit-appearance: none;
    padding: 10px 14px;
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius-sm);
    font-size: var(--e-fz-md);
    background: var(--e-gray-0);
    color: var(--e-text);
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
    width: 100%;
}
.e-field__input:focus,
.e-input:focus {
    outline: none;
    border-color: var(--e-primary);
    box-shadow: 0 0 0 3px var(--e-blue-100);
}
.e-field__input::placeholder,
.e-input::placeholder { color: var(--e-text-subtle); }
.e-field.has-error .e-field__input {
    border-color: var(--e-danger-500);
    box-shadow: 0 0 0 3px var(--e-danger-50);
}
.e-field__hint  { font-size: var(--e-fz-xs); color: var(--e-text-muted); }
.e-field__error { font-size: var(--e-fz-xs); color: var(--e-danger-600); }
.e-field.is-disabled .e-field__input { background: var(--e-gray-100); cursor: not-allowed; }

.e-input--inline { width: auto; min-width: 200px; }
.e-input--search { background: var(--e-gray-50); border-color: transparent; }
.e-input--search:focus { background: var(--e-gray-0); }

.e-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: var(--e-fz-sm);
    color: var(--e-gray-700);
    user-select: none;
}
.e-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--e-primary);
    margin: 0;
}

/* --------- Banner --------- */
.e-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-radius: var(--e-radius-md);
    margin-bottom: 20px;
    border: 1px solid var(--e-border);
}
.e-banner--info {
    background: var(--e-blue-50);
    border-color: var(--e-blue-200);
    color: var(--e-blue-900);
}
.e-banner--warning {
    background: var(--e-warning-50);
    border-color: var(--e-warning-500);
    color: var(--e-warning-700);
}
.e-banner--danger {
    background: var(--e-danger-50);
    border-color: var(--e-danger-500);
    color: var(--e-danger-700);
}

/* --------- Plans grid (Account page) --------- */
.e-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.e-plan-card {
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius-md);
    padding: 16px;
    background: var(--e-gray-0);
    text-align: left;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.e-plan-card:hover {
    border-color: var(--e-blue-300);
    box-shadow: var(--e-shadow-md);
    transform: translateY(-1px);
}
.e-plan-card h4 {
    margin: 0 0 4px;
    font-size: var(--e-fz-lg);
    font-weight: var(--e-fw-semibold);
    color: var(--e-gray-900);
}
.e-plan-card__desc {
    margin: 0 0 12px;
    color: var(--e-text-muted);
    font-size: var(--e-fz-sm);
}

/* --------- Add domain modal --------- */
.e-quota-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--e-gray-50);
    border-radius: var(--e-radius-sm);
    margin-bottom: 16px;
    font-size: var(--e-fz-sm);
    color: var(--e-gray-700);
}
.e-domain-result {
    margin-top: 12px;
}
.e-domain-result__data {
    background: var(--e-gray-50);
    border: 1px solid var(--e-border-soft);
    border-radius: var(--e-radius-sm);
    padding: 10px;
    margin: 0;
    font-size: var(--e-fz-xs);
    max-height: 200px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}
.e-callout {
    padding: 10px 14px;
    border-radius: var(--e-radius-sm);
    border: 1px solid;
    font-size: var(--e-fz-sm);
}
.e-callout--success { background: var(--e-success-50); border-color: var(--e-success-500); color: var(--e-success-700); }
.e-callout--warning { background: var(--e-warning-50); border-color: var(--e-warning-500); color: var(--e-warning-700); }
.e-callout--danger  { background: var(--e-danger-50);  border-color: var(--e-danger-500);  color: var(--e-danger-700); }
.e-callout--info    { background: var(--e-blue-50);    border-color: var(--e-blue-300);    color: var(--e-blue-800); }

/* --------- Tabs --------- */
.e-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--e-border);
    margin: 0 0 20px;
}
.e-tab {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-size: var(--e-fz-md);
    font-weight: var(--e-fw-medium);
    color: var(--e-text-muted);
    cursor: pointer;
    transition: color .15s, border-color .15s;
    margin-bottom: -1px;
}
.e-tab:hover { color: var(--e-gray-900); }
.e-tab.is-active {
    color: var(--e-primary);
    border-bottom-color: var(--e-primary);
}

/* --------- DNS panel --------- */
.e-dns-panel > .e-card + .e-card { margin-top: 16px; }
.e-dns-toolbar {
    display: flex;
    gap: 6px;
    align-items: center;
}
.e-dns-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--e-border-soft);
    flex-wrap: wrap;
}
.e-dns-row:last-of-type { border-bottom: 0; }
.e-dns-row__type { min-width: 50px; }
.e-dns-row .e-input { flex: 1; min-width: 180px; }
.e-dns-row__type .e-badge { width: 100%; justify-content: center; }

/* Variante success (vert) du switch — utilisée pour Mode avancé DNS */
.e-switch.e-switch--success.is-on .e-switch__slider {
    background: #22c55e;
}
.e-switch.e-switch--success.is-on .e-switch__label {
    color: #15803d;
}

/* Variante du switch pour le header DNS (alignée à gauche, fond léger) */
.e-dns-toolbar .e-switch {
    margin-right: auto;
    padding: 6px 12px;
    background: var(--e-bg-subtle, #f1f5f9);
    border-radius: 999px;
    transition: background 0.15s;
}
.e-dns-toolbar .e-switch:hover {
    background: #e2e8f0;
}
.e-dns-warn {
    margin: 20px 0 16px;
    padding: 14px 18px;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    color: #78350f;
    font-size: 13px;
    line-height: 1.6;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.08);
}

/* --------- Plans page : tuiles statistiques --------- */
.e-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.e-tile {
    background: var(--e-gray-0);
    border: 1px solid var(--e-border-soft);
    border-radius: var(--e-radius-md);
    padding: 20px;
    box-shadow: var(--e-shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    transition: box-shadow .2s, transform .15s, border-color .2s;
}
.e-tile__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--e-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}
.e-tile__icon svg { width: 22px; height: 22px; }
.e-tile__icon--blue   { background: var(--e-blue-50);    color: var(--e-blue-700); }
.e-tile__icon--green  { background: var(--e-success-50); color: var(--e-success-700); }
.e-tile__icon--purple { background: #f5f3ff;             color: #6d28d9; }
.e-tile__icon--cta    { background: rgba(255,255,255,0.2); color: white; }
.e-tile__label {
    font-size: var(--e-fz-xs);
    color: var(--e-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: var(--e-fw-medium);
}
.e-tile__label--invert { color: rgba(255,255,255,0.85); }
.e-tile__value {
    font-size: 28px;
    font-weight: var(--e-fw-bold);
    color: var(--e-gray-900);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.e-tile__value--text { font-size: 22px; font-weight: var(--e-fw-semibold); }
.e-tile__value--cta  { font-size: 18px; color: white; font-weight: var(--e-fw-semibold); }
.e-tile__sub {
    font-size: 16px;
    color: var(--e-text-muted);
    font-weight: var(--e-fw-medium);
}
.e-tile__hint {
    font-size: var(--e-fz-xs);
    color: var(--e-text-muted);
    margin-top: 4px;
}
.e-tile__hint--invert { color: rgba(255,255,255,0.8); }
.e-tile--cta {
    background: linear-gradient(135deg, var(--e-blue-600) 0%, var(--e-blue-800) 100%);
    border-color: transparent;
    color: white;
    cursor: pointer;
    text-align: left;
    position: relative;
    overflow: hidden;
}
.e-tile--cta::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    transform: skewX(-20deg);
    animation: e-cta-shine 4s ease-in-out infinite;
    pointer-events: none;
}
.e-tile--cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

/* Carte abonnement détaillé */
.e-sub-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.e-sub-card__actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

/* Carte "Aucun abonnement actif" */
.e-no-sub-card { background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%); }
.e-no-sub {
    text-align: center;
    padding: 32px 16px;
}
.e-no-sub__icon { font-size: 48px; margin-bottom: 12px; }
.e-no-sub h2 { margin: 0 0 8px; font-size: 24px; }
.e-no-sub p {
    color: var(--e-text-muted);
    margin: 0 0 24px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.e-page__section {
    margin: 24px 0 12px;
    font-size: var(--e-fz-xl);
    font-weight: var(--e-fw-semibold);
    color: var(--e-gray-900);
}
.e-plan-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 720px) { .e-plan-summary { grid-template-columns: 1fr; } }
.e-plan-summary__quota {}
.e-progress {
    width: 100%;
    height: 8px;
    background: var(--e-gray-150);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}
.e-progress__bar {
    height: 100%;
    background: var(--e-primary);
    border-radius: 4px;
    transition: width .3s;
}
.e-plan-card.is-current {
    border-color: var(--e-primary);
    box-shadow: 0 0 0 1px var(--e-primary), var(--e-shadow-md);
}
.e-plan-card.is-current::before {
    content: '';
    position: absolute;
}

/* --------- Plans Modal (fullscreen) --------- */
.e-plans-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    overflow-y: auto;
    color: white;
    display: flex;
    flex-direction: column;
}
.e-plans-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px 48px 24px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}
.e-plans-modal__header h1 {
    font-size: 36px;
    font-weight: var(--e-fw-bold);
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: white;
}
.e-plans-modal__header p {
    color: rgba(255,255,255,0.75);
    margin: 0;
    font-size: 16px;
}
.e-plans-modal__close {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .1s;
}
.e-plans-modal__close:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }
.e-plans-modal__close svg { width: 20px; height: 20px; }

.e-plans-modal__body {
    flex: 1;
    padding: 32px 48px 80px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}
.e-plans-modal__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: stretch;
}
.e-plan-hero {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    transition: transform .25s, border-color .25s, background .25s, box-shadow .25s;
    opacity: 0;
    animation: e-plan-rise .5s cubic-bezier(0.16,1,0.3,1) forwards;
    animation-delay: var(--stagger, 0ms);
}
@keyframes e-plan-rise {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.e-plan-hero:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}
.e-plan-hero.is-featured {
    border-color: var(--e-blue-400);
    background: linear-gradient(135deg, rgba(59,130,246,0.18) 0%, rgba(59,130,246,0.05) 100%);
    box-shadow: 0 0 0 1px rgba(59,130,246,0.4), 0 20px 40px rgba(37,99,235,0.2);
}
.e-plan-hero.is-current {
    border-color: var(--e-success-500);
    background: linear-gradient(135deg, rgba(34,197,94,0.18) 0%, rgba(34,197,94,0.05) 100%);
}
.e-plan-hero__title {
    font-size: 26px;
    font-weight: var(--e-fw-bold);
    margin: 0;
    color: white;
    letter-spacing: -0.01em;
}
.e-plan-hero__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.e-plan-hero__features li {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 8px;
}
.e-plan-hero__features li::before {
    content: '✓';
    color: var(--e-blue-300);
    font-weight: bold;
    flex-shrink: 0;
}
.e-plan-hero__features strong { color: white; }

/* Featured card → CTA primaire = gradient bleu vif (lisible sur fond translucide bleu) */
.e-plan-hero.is-featured .e-btn--primary {
    background: linear-gradient(135deg, var(--e-blue-500) 0%, var(--e-blue-700) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
    font-weight: var(--e-fw-bold);
}
.e-plan-hero.is-featured .e-btn--primary:hover:not(.is-disabled) {
    background: linear-gradient(135deg, var(--e-blue-400) 0%, var(--e-blue-600) 100%);
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.55);
}
.e-plan-hero.is-featured .e-btn--primary .emg-spinner {
    border-color: rgba(255,255,255,0.3);
    border-top-color: white;
}

/* Cards non-featured : bouton secondaire blanc-outline transparent */
.e-plan-hero .e-btn--secondary {
    background: rgba(255,255,255,0.08);
    color: white;
    border-color: rgba(255,255,255,0.25);
}
.e-plan-hero .e-btn--secondary:hover:not(.is-disabled) {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.4);
}

/* Badge en haut de carte (Populaire, Plan actuel) */
.e-plan-hero__badge {
    position: absolute;
    top: 16px;
    right: 16px;
}

/* Description du plan (subtitle) */
.e-plan-hero__desc {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
    margin: -8px 0 8px;
    line-height: 1.5;
}

/* ===== Payment methods row ===== */
.e-payment-row {
    margin-top: 40px;
    text-align: center;
}
.e-payment-row__label {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    font-weight: 600;
}
.e-payment-row__icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    align-items: center;
}
.e-payment-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-width: 50px;
    padding: 0 4px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.e-payment-pill__text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0 10px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-family: -apple-system, 'Segoe UI', sans-serif;
}
.e-payment-pill__mc { width: 38px; height: 24px; }

/* ===== Trust badges row ===== */
.e-trust-row {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.e-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 100px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}
.e-trust-pill__icon { font-size: 14px; }
.e-trust-pill__label { font-weight: 500; }

/* ===== Page Emails ===== */
.e-emails-list { display: flex; flex-direction: column; gap: 12px; }
/* ===== Page Sites — bouton Créer + toggle maintenance ===== */

.e-page__header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.e-notice {
    margin: 12px 0 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}
.e-notice--info {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid var(--e-blue-500, #2563eb);
    color: var(--e-text-strong, #0f172a);
}
.e-notice p { margin: 0; }

/* Switch (toggle on/off) pour le mode maintenance */
.e-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
}
.e-switch input { display: none; }
.e-switch__slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background 0.15s;
    flex-shrink: 0;
}
.e-switch__slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.15s, background 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.e-switch.is-on .e-switch__slider {
    background: #f59e0b;
}
.e-switch.is-on .e-switch__slider::after {
    transform: translateX(16px);
}
.e-switch input:disabled + .e-switch__slider {
    opacity: 0.5;
    cursor: not-allowed;
}
.e-switch__label {
    color: var(--e-text-muted, #64748b);
    font-weight: 500;
}
.e-switch.is-on .e-switch__label {
    color: #b45309;
    font-weight: 600;
}

/* Modal "Créer un site" — choix de domaine */
.e-create-site-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.e-create-site-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.e-create-site-option:hover {
    border-color: var(--e-blue-500, #2563eb);
    background: rgba(59, 130, 246, 0.04);
}
.e-create-site-option.is-selected {
    border-color: var(--e-blue-500, #2563eb);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 0 1px var(--e-blue-500, #2563eb);
}
.e-create-site-option input { margin: 0; }
.e-create-site-option__body { flex: 1; }
.e-create-site-option__domain {
    font-weight: 600;
    color: var(--e-text-strong, #0f172a);
    font-size: 15px;
}
.e-create-site-option__meta {
    font-size: 12px;
    color: var(--e-text-muted, #64748b);
    margin-top: 2px;
}

/* Records externes (lecture seule, gérés par le registrar) */
.e-dns-row.is-external {
    background: rgba(100, 116, 139, 0.05);
    position: relative;
}
.e-dns-row.is-external::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--e-text-muted, #64748b);
    border-radius: 2px 0 0 2px;
}
.e-dns-row.is-external input[readonly] {
    background: transparent;
    border-color: transparent;
    color: var(--e-text-muted, #64748b);
    cursor: default;
}
.e-dns-row.is-external input[readonly]:focus {
    outline: none;
    background: rgba(100, 116, 139, 0.08);
}
.e-dns-row__lock {
    font-size: 16px;
    cursor: help;
    opacity: 0.6;
}

/* ===== Dashboard : cards (Mes sites, Mes domaines, Mes emails) ===== */
.e-page--dashboard > .e-card { margin-bottom: 16px; }
.e-dashboard-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}
.e-dashboard-block__head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--e-text-strong, #0f172a);
}

/* Email card placeholder */
.e-dashboard-emails-wip {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 24px;
}
.e-dashboard-emails-wip__icon { font-size: 28px; flex-shrink: 0; }
.e-dashboard-emails-wip strong {
    display: block;
    font-size: 14px;
    color: var(--e-text-strong, #0f172a);
    margin-bottom: 2px;
}
.e-dashboard-emails-wip p { margin: 0; line-height: 1.5; }

/* ===== Sidebar — Autres prestations (flyout) ===== */

.e-sidebar__link--has-flyout {
    /* Reset défauts navigateur du <button> sans écraser .e-sidebar__link */
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    /* Buttons n'héritent pas du font par défaut → on force */
    font-family: inherit;
    font-size: inherit;
}
.e-sidebar__link--has-flyout .e-sidebar__chev {
    margin-left: auto;
    width: 16px;
    height: 16px;
    opacity: 0.6;
    transition: transform 0.15s, opacity 0.15s;
}
.e-sidebar__link--has-flyout.is-active .e-sidebar__chev {
    transform: rotate(90deg);
    opacity: 1;
}

/* Flyout teleporté au body → position fixed, pas de clipping */
.e-sidebar__flyout {
    position: fixed;
    width: 320px;
    background: #ffffff;
    border: 1px solid var(--e-border, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    padding: 8px;
    z-index: 10000;
    isolation: isolate;
}
.e-sidebar__flyout::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 16px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 1px solid var(--e-border, #e2e8f0);
    border-bottom: 1px solid var(--e-border, #e2e8f0);
    transform: rotate(45deg);
}
/* Header : titre + sous-texte descriptif */
.e-sidebar__flyout-head {
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--e-border-soft, #e5e7eb);
    margin-bottom: 6px;
}
.e-sidebar__flyout-head strong {
    display: block;
    font-family: var(--e-font-sans, system-ui, -apple-system, sans-serif);
    font-size: 14px;
    font-weight: var(--e-fw-semibold, 600);
    color: var(--e-gray-900, #0f172a);
    line-height: 1.3;
}
.e-sidebar__flyout-head span {
    display: block;
    margin-top: 2px;
    font-family: var(--e-font-sans, system-ui, -apple-system, sans-serif);
    font-size: 12px;
    font-weight: 400;
    color: var(--e-gray-500, #64748b);
    line-height: 1.4;
}

/* Item de flyout = exactement comme .e-sidebar__link (force toutes les
   propriétés font car le Teleport au <body> casse l'héritage de la sidebar) */
.e-sidebar__flyout-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--e-radius-sm, 6px);
    color: var(--e-gray-600, #4b5563);
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    font-family: var(--e-font-sans, system-ui, -apple-system, sans-serif);
    font-size: 14px;
    font-weight: var(--e-fw-medium, 500);
    line-height: 1.4;
    transition: background .15s, color .15s;
}
.e-sidebar__flyout-item:hover {
    background: var(--e-gray-100, #f3f4f6);
    color: var(--e-gray-900, #0f172a);
}

.e-sidebar__flyout-lbl {
    flex: 1;
    white-space: nowrap;
}

/* Icône = exactement comme .e-sidebar__ico (pas de pastille bleue) */
.e-sidebar__flyout-ico {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: currentColor;
}
.e-sidebar__flyout-ico svg {
    width: 18px;
    height: 18px;
}

/* Mobile : flyout reste en fixed mais s'adapte à la largeur écran */
@media (max-width: 768px) {
    .e-sidebar__flyout {
        width: calc(100vw - 32px);
        max-width: 320px;
    }
}

/* ===== Modal "Demande de devis" (préfixe q-* dédié) ===== */

.q-form {
    font-family: var(--e-font-sans, system-ui, -apple-system, sans-serif);
    font-size: 14px;
    line-height: 1.5;
    color: var(--e-gray-800, #1e293b);
}

/* Intro : icône + description du type sélectionné */
.q-intro {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 24px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 10px;
}
.q-intro__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    color: var(--e-blue-500, #2563eb);
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.1);
}
.q-intro__icon svg { width: 22px; height: 22px; }
.q-intro__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--e-gray-600, #475569);
}

/* Section (Ton projet / Contact) */
.q-section { margin-bottom: 24px; }
.q-section:last-child { margin-bottom: 8px; }
.q-section__head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--e-gray-200, #e5e7eb);
}
.q-section__title {
    font-size: 11px;
    font-weight: 700;
    color: var(--e-gray-900, #0f172a);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.q-section__hint {
    font-size: 12px;
    color: var(--e-gray-500, #64748b);
}

/* Champs */
.q-field { margin-bottom: 14px; }
.q-field:last-child { margin-bottom: 0; }
.q-field__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.q-field__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--e-gray-700, #334155);
    margin-bottom: 6px;
}
.q-field__label-row .q-field__label { margin-bottom: 0; }
.q-field__opt {
    font-weight: 400;
    color: var(--e-gray-500, #64748b);
}
.q-field__counter {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--e-gray-500, #64748b);
}
.q-field__counter.is-low { color: #b45309; font-weight: 600; }

/* Inputs */
.q-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--e-gray-300, #cbd5e1);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    color: var(--e-gray-900, #0f172a);
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
    -webkit-appearance: none;
}
.q-input:hover { border-color: var(--e-gray-400, #94a3b8); }
.q-input:focus {
    outline: none;
    border-color: var(--e-blue-500, #2563eb);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.q-input::placeholder { color: var(--e-gray-400, #94a3b8); }
.q-textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}
select.q-input {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 38px;
    cursor: pointer;
}

/* Grid 2 colonnes (budget/délai, téléphone/société) */
.q-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}
.q-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 540px) {
    .q-grid--2 { grid-template-columns: 1fr; }
}

/* Pills (checkboxes + radios) */
.q-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.q-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--e-gray-300, #cbd5e1);
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--e-gray-700, #334155);
    transition: all 0.12s;
    user-select: none;
}
.q-pill:hover {
    border-color: var(--e-gray-400, #94a3b8);
    background: var(--e-gray-50, #f8fafc);
}
.q-pill.is-on {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--e-blue-500, #2563eb);
    color: var(--e-blue-700, #1d4ed8);
    font-weight: 600;
}
.q-pill input { display: none; }

.q-hint { margin: 6px 0 0; font-size: 12px; line-height: 1.4; }
.q-hint--warn { color: #b45309; }

/* Success state */
.q-success {
    text-align: center;
    padding: 24px 16px 8px;
}
.q-success__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #d1fae5;
    color: #047857;
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 18px;
}
.q-success__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--e-gray-900, #0f172a);
}
.q-success__lead { margin: 0 0 6px; color: var(--e-gray-700, #334155); }
.q-success__hint { margin: 0; font-size: 13px; color: var(--e-gray-500, #64748b); }

/* ===== Page Plans & usages — détail abonnement + listes ===== */

.e-sub-detail { margin: 16px 0; overflow: hidden; }

/* Header : titre + meta à gauche, bouton "Gérer l'abonnement" à droite */
.e-sub-detail__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(29, 78, 216, 0.04));
    border-bottom: 1px solid var(--e-border, #e2e8f0);
}
.e-sub-detail__head-info { flex: 1; min-width: 220px; }
.e-sub-detail__title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.e-sub-detail__title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--e-gray-900, #0f172a);
}
.e-sub-detail__lead {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--e-gray-600, #475569);
}

/* Quotas grid : Sites / Domaines / Emails */
.e-sub-quotas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0;
    padding: 0;
}
.e-sub-quota {
    padding: 18px 24px;
    border-right: 1px solid var(--e-gray-100, #f1f5f9);
}
.e-sub-quota:last-child { border-right: 0; }
.e-sub-quota--soon { opacity: 0.7; }
.e-sub-quota__label {
    font-size: 11px;
    font-weight: 700;
    color: var(--e-gray-500, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.e-sub-quota__value {
    font-size: 24px;
    font-weight: 700;
    color: var(--e-gray-900, #0f172a);
    line-height: 1.1;
    margin-bottom: 6px;
}
.e-sub-quota__sub {
    font-size: 14px;
    font-weight: 500;
    color: var(--e-gray-500, #64748b);
}
.e-sub-quota__bar {
    width: 100%;
    height: 4px;
    background: var(--e-gray-100, #f1f5f9);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}
.e-sub-quota__bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--e-blue-500, #3b82f6), var(--e-blue-600, #2563eb));
    transition: width 0.3s ease;
}
.e-sub-quota__hint {
    font-size: 12px;
    color: var(--e-gray-500, #64748b);
    margin-top: 4px;
}

/* Listes Mes sites + Mes domaines parallèles */
.e-plans-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

/* ===== Liste de plusieurs abonnements (multi-subs) — version compacte ===== */
.e-subs-list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Carte ultra-compacte : tout en 1 ligne sur desktop, 2 lignes en wrap mobile */
.e-sub-row { overflow: hidden; }
.e-sub-row__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(29, 78, 216, 0.02));
    flex-wrap: wrap;
}
.e-sub-row__info {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.e-sub-row__title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.e-sub-row__title h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--e-text-1);
    letter-spacing: -0.2px;
}
.e-sub-row__meta {
    font-size: 12.5px;
    color: var(--e-text-2);
    line-height: 1.4;
}
.e-sub-row__meta strong { color: var(--e-text-1); font-weight: 700; }

/* Bloc quotas à droite : chiffre dominant + label muted */
.e-sub-row__quotas {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}
.e-sub-row__quota {
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1;
}
.e-sub-row__quota-num {
    font-size: 22px;
    font-weight: 700;
    color: var(--e-text-1);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}
.e-sub-row__quota-lbl {
    font-size: 12px;
    color: var(--e-text-3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.e-sub-row__warn {
    color: #b45309;
    font-size: 12px;
    font-weight: 600;
    cursor: help;
}

/* Détail des items repliable (si > 1 ligne) */
.e-sub-row__items {
    border-top: 1px solid var(--e-gray-100, #f1f5f9);
    background: #fafbfc;
}
.e-sub-row__items > summary {
    padding: 8px 20px;
    cursor: pointer;
    font-size: 12.5px;
    color: var(--e-primary);
    font-weight: 500;
    list-style: none;
    user-select: none;
}
.e-sub-row__items > summary::-webkit-details-marker { display: none; }
.e-sub-row__items > summary:hover { background: rgba(37, 99, 235, 0.04); }
.e-sub-row__items > summary::before {
    content: '▸ ';
    transition: transform 0.15s ease;
    display: inline-block;
}
.e-sub-row__items[open] > summary::before { transform: rotate(90deg); }
.e-sub-row__items[open] > summary { border-bottom: 1px solid var(--e-gray-100, #f1f5f9); }

@media (max-width: 700px) {
    .e-sub-row__main {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .e-sub-row__quotas {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }
}
.e-subs-list__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 4px;
}
.e-subs-list__head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--e-text-1);
    letter-spacing: -0.2px;
}
.e-subs-list__head .e-muted-small { font-weight: 500; }
.e-subs-list .e-sub-detail { margin: 0; }

/* Détail des lignes facturées dans une sub (visible si > 1 item) */
.e-sub-items {
    border-top: 1px solid var(--e-gray-100, #f1f5f9);
    background: #fafbfc;
}
.e-sub-item {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr auto;
    gap: 16px;
    align-items: center;
    padding: 10px 24px;
    border-bottom: 1px solid var(--e-gray-100, #f1f5f9);
    font-size: 13px;
}
.e-sub-item:last-child { border-bottom: 0; }
.e-sub-item__main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}
.e-sub-item__label {
    font-weight: 600;
    color: var(--e-text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.e-sub-item__qty {
    font-size: 12px;
    color: var(--e-text-3);
    background: rgba(15, 23, 42, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
}
.e-sub-item__quotas {
    color: var(--e-text-2);
    font-size: 12.5px;
}
.e-sub-item__price {
    font-weight: 600;
    color: var(--e-text-1);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Carte agrégat total (visible si > 1 sub) */
.e-subs-aggregate {
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    border: 1px dashed rgba(37, 99, 235, 0.25);
}
.e-subs-aggregate__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 15px;
    color: var(--e-text-1);
}
.e-subs-aggregate__row strong { font-weight: 700; }
.e-subs-aggregate__quotas {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(37, 99, 235, 0.15);
    font-size: 13px;
    color: var(--e-text-2);
}
.e-subs-aggregate__quotas strong {
    color: var(--e-primary);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
    .e-sub-item {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px 20px;
    }
    .e-sub-item__price { justify-self: flex-end; }
}

/* ===== Card toggle maintenance sur SiteDetailPage ===== */
.e-maintenance-row { margin-bottom: 20px; }
.e-maintenance-row__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.e-maintenance-row__inner > div:first-child { flex: 1; min-width: 280px; }
.e-maintenance-row__inner strong {
    display: block;
    font-size: 15px;
    color: var(--e-text-strong, #0f172a);
    margin-bottom: 4px;
}
.e-maintenance-row__inner p { margin: 0; line-height: 1.5; }

/* ===== SSL inline dans Informations du domaine ===== */
.e-dl__ssl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.e-link--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--e-border, #e2e8f0);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    color: var(--e-text-muted, #64748b);
    transition: all 0.15s;
}
.e-link--icon:hover {
    background: var(--e-bg-subtle, #f1f5f9);
    color: var(--e-text-strong, #0f172a);
    border-color: var(--e-blue-500, #2563eb);
}
.e-link--icon:disabled { opacity: 0.5; cursor: wait; }

.e-emails-wip { margin-top: 8px; }
.e-emails-wip__hint {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--e-bg-subtle, #f8fafc);
    border-left: 3px solid var(--e-blue-500, #2563eb);
    border-radius: 6px;
    text-align: left;
    line-height: 1.5;
}
.e-email-domain-card { }
.e-email-domain-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: background .15s;
}
.e-email-domain-card__head:hover { background: var(--e-gray-50); }
.e-email-domain-card__head-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.e-email-domain-card__chev {
    color: var(--e-text-muted);
    font-size: 10px;
    width: 12px;
    user-select: none;
}
.e-email-domain-card__title {
    font-weight: var(--e-fw-semibold);
    color: var(--e-gray-900);
    font-size: var(--e-fz-md);
}
.e-email-domain-card__count {
    font-size: var(--e-fz-xs);
    color: var(--e-text-muted);
    margin-top: 2px;
}
.e-email-domain-card__body {
    border-top: 1px solid var(--e-border-soft);
    padding: 0;
}

/* Modal "nouvelle adresse" : grille des plans email */
.e-email-plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 8px;
}
.e-email-plan-option {
    display: flex;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius-md);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.e-email-plan-option:hover {
    border-color: var(--e-blue-300);
    background: var(--e-blue-50);
}
.e-email-plan-option input[type=radio]:checked + .e-email-plan-option__body {
    /* le sélectionné est reconnu visuellement via la pseudo-classe sur le parent */
}
.e-email-plan-option:has(input:checked) {
    border-color: var(--e-primary);
    background: var(--e-blue-50);
    box-shadow: 0 0 0 1px var(--e-primary);
}
.e-email-plan-option input[type=radio] {
    flex-shrink: 0;
    margin-top: 4px;
    accent-color: var(--e-primary);
}
.e-email-plan-option__body { flex: 1; }
.e-email-plan-option__title {
    font-weight: var(--e-fw-semibold);
    color: var(--e-gray-900);
}
.e-email-plan-option__details {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: var(--e-fz-sm);
    color: var(--e-text-muted);
}
.e-email-plan-option__price {
    font-weight: var(--e-fw-semibold);
    color: var(--e-primary);
}
.e-email-plan-option__features {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    font-size: var(--e-fz-xs);
    color: var(--e-text-muted);
}
.e-email-plan-option__features li::before { content: '✓ '; color: var(--e-success-600); }

.e-plans-modal__footer-note {
    text-align: center;
    color: rgba(255,255,255,0.6);
    margin-top: 40px;
    font-size: 14px;
}

/* Transition modal */
.e-plans-modal-enter-active, .e-plans-modal-leave-active {
    transition: opacity .25s ease;
}
.e-plans-modal-enter-active .e-plans-modal__body,
.e-plans-modal-leave-active .e-plans-modal__body {
    transition: transform .35s cubic-bezier(0.16,1,0.3,1);
}
.e-plans-modal-enter-from, .e-plans-modal-leave-to { opacity: 0; }
.e-plans-modal-enter-from .e-plans-modal__body,
.e-plans-modal-leave-to .e-plans-modal__body { transform: translateY(20px); }

@media (max-width: 720px) {
    .e-plans-modal__header { padding: 24px 20px; flex-direction: column; gap: 12px; }
    .e-plans-modal__header h1 { font-size: 26px; }
    .e-plans-modal__body { padding: 16px 20px 48px; }
    .e-plan-hero { padding: 24px 20px; }
}

/* --------- Activity page v2 : onglets compacts + liste avatar --------- */

/* Onglets filtres - chips horizontaux */
.e-activity-tabs-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.e-activity-tab2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--e-gray-0);
    border: 1px solid var(--e-border);
    border-radius: var(--e-radius-pill);
    cursor: pointer;
    font-size: var(--e-fz-sm);
    color: var(--e-gray-700);
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s, transform .05s;
}
.e-activity-tab2:hover {
    background: var(--e-gray-50);
    border-color: var(--e-gray-300);
}
.e-activity-tab2:active { transform: translateY(1px); }
.e-activity-tab2__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.e-activity-tab2__ico svg { width: 14px; height: 14px; }
.e-activity-tab2__count {
    background: var(--e-gray-100);
    color: var(--e-gray-600);
    padding: 1px 8px;
    border-radius: var(--e-radius-pill);
    font-size: 11px;
    font-weight: var(--e-fw-semibold);
    line-height: 1.4;
    min-width: 22px;
    text-align: center;
}
.e-activity-tab2.is-active {
    background: var(--e-blue-600);
    border-color: var(--e-blue-600);
    color: white;
}
.e-activity-tab2.is-active .e-activity-tab2__count {
    background: rgba(255,255,255,0.25);
    color: white;
}

/* Groupes par jour */
.e-activity-group { }
.e-activity-group__label {
    padding: 12px 24px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--e-text-muted);
    font-weight: var(--e-fw-semibold);
    background: var(--e-gray-50);
    border-bottom: 1px solid var(--e-border-soft);
}

/* Liste */
.e-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.e-activity-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--e-border-soft);
    transition: background .15s;
}
.e-activity-row:last-child { border-bottom: 0; }
.e-activity-row:hover { background: var(--e-gray-50); }

/* Avatar coloré par catégorie */
.e-activity-row__avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.e-activity-row__avatar svg { width: 20px; height: 20px; }

.e-activity-row__avatar--blue   { background: var(--e-blue-50);    color: var(--e-blue-700); }
.e-activity-row__avatar--cyan   { background: #ecfeff;             color: #0e7490; }
.e-activity-row__avatar--indigo { background: #eef2ff;             color: #4338ca; }
.e-activity-row__avatar--teal   { background: #f0fdfa;             color: #0f766e; }
.e-activity-row__avatar--green  { background: var(--e-success-50); color: var(--e-success-700); }
.e-activity-row__avatar--amber  { background: var(--e-warning-50); color: var(--e-warning-700); }
.e-activity-row__avatar--purple { background: #f5f3ff;             color: #6d28d9; }
.e-activity-row__avatar--gray   { background: var(--e-gray-100);   color: var(--e-gray-600); }

.e-activity-row__avatar.is-error {
    background: var(--e-danger-50);
    color: var(--e-danger-700);
}

/* Body central */
.e-activity-row__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.e-activity-row__title {
    font-size: var(--e-fz-md);
    font-weight: var(--e-fw-semibold);
    color: var(--e-gray-900);
    line-height: 1.35;
}
.e-activity-row.is-error .e-activity-row__title { color: var(--e-danger-700); }
.e-activity-row__target {
    font-size: var(--e-fz-sm);
    color: var(--e-text-muted);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Right side : badge + time + ip */
.e-activity-row__right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 110px;
}
.e-activity-row__time {
    font-size: var(--e-fz-xs);
    color: var(--e-text-muted);
    font-variant-numeric: tabular-nums;
}
.e-activity-row__ip {
    font-size: 10px;
    color: var(--e-text-subtle);
    font-family: ui-monospace, Menlo, Consolas, monospace;
}

@media (max-width: 720px) {
    .e-activity-row { padding: 14px 16px; gap: 12px; }
    .e-activity-row__avatar { width: 36px; height: 36px; }
    .e-activity-row__avatar svg { width: 18px; height: 18px; }
    .e-activity-row__ip { display: none; }
    .e-activity-row__right { min-width: auto; }
    .e-activity-row__right .e-badge { display: none; }
}

/* --------- Site list (dashboard) --------- */
.e-site-list { list-style: none; margin: 0; padding: 0; }
.e-site-item + .e-site-item { border-top: 1px solid var(--e-border-soft); }
.e-site-item__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
    gap: 12px;
}
.e-site-item__link:hover .e-site-item__domain { color: var(--e-primary); }
.e-site-item__domain {
    font-weight: var(--e-fw-semibold);
    font-size: var(--e-fz-md);
    color: var(--e-gray-900);
    transition: color .15s;
}
.e-site-item__meta {
    font-size: var(--e-fz-xs);
    color: var(--e-text-muted);
    margin-top: 2px;
}

/* --------- Tables --------- */
.e-table-toolbar {
    padding: 12px 16px;
    border-bottom: 1px solid var(--e-border-soft);
}
.e-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--e-fz-sm);
}
.e-table th,
.e-table td {
    text-align: left;
    padding: 12px 18px;
    border-bottom: 1px solid var(--e-border-soft);
    vertical-align: middle;
}
.e-table th {
    color: var(--e-text-muted);
    font-weight: var(--e-fw-medium);
    font-size: var(--e-fz-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--e-gray-50);
}
.e-table tbody tr:hover { background: var(--e-gray-50); }
.e-table tbody tr:last-child td { border-bottom: 0; }
.e-table__link { color: var(--e-gray-900); font-weight: var(--e-fw-semibold); text-decoration: none; }
.e-table__link:hover { color: var(--e-primary); }
.e-table__actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    white-space: nowrap;
}

.e-file-icon { margin-right: 6px; }

/* --------- Cols 2 --------- */
.e-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 900px) {
    .e-cols-2 { grid-template-columns: 1fr; }
}

/* --------- Description list --------- */
.e-dl { margin: 0; }
.e-dl > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--e-border-soft);
    gap: 16px;
}
.e-dl > div:last-child { border-bottom: 0; }
.e-dl dt {
    color: var(--e-text-muted);
    font-size: var(--e-fz-sm);
}
.e-dl dd {
    margin: 0;
    color: var(--e-gray-900);
    font-weight: var(--e-fw-medium);
    text-align: right;
}

/* --------- Empty / muted --------- */
.e-empty {
    text-align: center;
    padding: 32px 16px;
}
.e-empty__icon { font-size: 40px; margin-bottom: 8px; }
.e-empty__title { margin: 0 0 4px; font-size: var(--e-fz-lg); }
.e-empty__desc { color: var(--e-text-muted); margin: 0 0 12px; }
.e-empty__actions { display: flex; justify-content: center; gap: 8px; }
.e-empty-mini { color: var(--e-text-muted); }
.e-empty-mini p { margin: 0 0 12px; }

.e-muted { color: var(--e-text-muted); list-style: none; padding: 0; }
.e-muted-small { color: var(--e-text-muted); font-size: var(--e-fz-xs); margin-top: 8px; }
.e-center { display: flex; justify-content: center; padding: 32px; }
.e-actions-row { display: flex; gap: 8px; margin-top: 12px; }

/* --------- Timeline (account activity) --------- */
.e-timeline { list-style: none; padding: 0; margin: 0; }
.e-timeline__item {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--e-border-soft);
}
.e-timeline__item:last-child { border-bottom: 0; }
.e-timeline__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--e-blue-500);
    margin-top: 8px;
    flex-shrink: 0;
}
.e-timeline__action { font-weight: var(--e-fw-semibold); font-size: var(--e-fz-sm); }
.e-timeline__target { color: var(--e-gray-700); font-size: var(--e-fz-sm); margin-top: 1px; word-break: break-all; }
.e-timeline__time   { color: var(--e-text-muted); font-size: var(--e-fz-xs); margin-top: 2px; }

/* --------- Upload row --------- */
.e-upload-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* --------- Modal --------- */
.e-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.e-modal {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.30);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;          /* Clip les coins arrondis */
    display: flex;
    flex-direction: column;
    opacity: 1;
    isolation: isolate;
}
.e-modal--sm { max-width: 380px; }
.e-modal--lg { max-width: 720px; }

/* Header sticky en haut */
.e-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--e-border-soft, #e5e7eb);
    background: #ffffff;
    flex-shrink: 0;
}
.e-modal__header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--e-gray-900, #0f172a);
}
.e-modal__close {
    background: none;
    border: 0;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: var(--e-gray-500, #64748b);
    padding: 0 4px;
    border-radius: 6px;
    transition: background .12s, color .12s;
}
.e-modal__close:hover {
    color: var(--e-gray-900, #0f172a);
    background: var(--e-gray-100, #f3f4f6);
}

/* Body : SEUL élément qui scroll */
.e-modal__body {
    padding: 22px;
    background: #ffffff;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

/* Footer sticky en bas */
.e-modal__footer {
    padding: 14px 22px;
    border-top: 1px solid var(--e-border-soft, #e5e7eb);
    background: #ffffff;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
/* Sécurise le rendu des boutons dans le footer modal */
.e-modal__footer .e-btn {
    font-family: var(--e-font-sans, system-ui, -apple-system, sans-serif);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 10px 18px;
    border-radius: 8px;
    min-height: 38px;
}
.e-modal__footer .e-btn--secondary {
    background: #ffffff;
    border: 1px solid var(--e-gray-300, #cbd5e1);
    color: var(--e-gray-700, #334155);
}
.e-modal__footer .e-btn--secondary:hover:not(.is-disabled) {
    background: var(--e-gray-50, #f8fafc);
    border-color: var(--e-gray-400, #94a3b8);
    color: var(--e-gray-900, #0f172a);
}
.e-modal__footer .e-btn--primary {
    background: var(--e-blue-600, #2563eb);
    border: 1px solid var(--e-blue-600, #2563eb);
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}
.e-modal__footer .e-btn--primary:hover:not(.is-disabled) {
    background: var(--e-blue-700, #1d4ed8);
    border-color: var(--e-blue-700, #1d4ed8);
}
.e-modal__footer .e-btn--primary.is-disabled,
.e-modal__footer .e-btn--primary:disabled {
    opacity: 1;
    background: var(--e-gray-300, #cbd5e1);
    border-color: var(--e-gray-300, #cbd5e1);
    color: var(--e-gray-500, #64748b);
    cursor: not-allowed;
    box-shadow: none;
}
.e-modal__footer .e-btn--danger {
    background: var(--e-danger-600, #dc2626);
    border: 1px solid var(--e-danger-600, #dc2626);
    color: #ffffff;
}
.e-modal__footer .e-btn--danger:hover:not(.is-disabled) {
    background: var(--e-danger-700, #b91c1c);
    border-color: var(--e-danger-700, #b91c1c);
}

/* --------- Toasts --------- */
.e-toast-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
}
.e-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--e-radius-md);
    background: var(--e-gray-900);
    color: white;
    font-size: var(--e-fz-sm);
    box-shadow: var(--e-shadow-lg);
    cursor: pointer;
    min-width: 250px;
    max-width: 400px;
    pointer-events: auto;
}
.e-toast__icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}
.e-toast--success { background: var(--e-success-600); }
.e-toast--error   { background: var(--e-danger-600); }
.e-toast--warning { background: var(--e-warning-600); }
.e-toast--info    { background: var(--e-gray-800); }
.e-toast__icon { background: rgba(255,255,255,.15); }
.e-toast__msg { flex: 1; }

/* --------- Auth layout --------- */
.e-auth-shell {
    display: flex;
    min-height: 100vh;
    background: var(--e-bg);
}
.e-auth-aside {
    flex: 0 0 460px;
    background: linear-gradient(180deg, var(--e-blue-700) 0%, var(--e-blue-900) 100%);
    color: white;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.e-auth-aside::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(255,255,255,0.08), transparent 50%);
    pointer-events: none;
}
.e-auth-aside__brand a {
    color: white;
    text-decoration: none;
    font-size: var(--e-fz-xl);
    font-weight: var(--e-fw-bold);
    letter-spacing: -0.02em;
}
.e-auth-aside__pitch h2 {
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 12px;
    font-weight: var(--e-fw-semibold);
    letter-spacing: -0.02em;
}
.e-auth-aside__pitch p {
    margin: 0 0 24px;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
}
.e-auth-aside__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.e-auth-aside__features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.9);
    font-size: var(--e-fz-sm);
}
.e-auth-aside__features li::before {
    content: '✓';
    color: var(--e-blue-200);
    font-weight: bold;
}
.e-auth-aside__footer {
    color: rgba(255,255,255,0.55);
    font-size: var(--e-fz-xs);
}

.e-auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}
.e-auth-card {
    width: 100%;
    max-width: 420px;
}
.e-auth-form h1 {
    font-size: var(--e-fz-2xl);
    margin: 0 0 8px;
    font-weight: var(--e-fw-semibold);
    letter-spacing: -0.02em;
}
.e-auth-form__lead {
    color: var(--e-text-muted);
    margin: 0 0 24px;
}
.e-auth-form__success {
    background: var(--e-success-50);
    color: var(--e-success-700);
    padding: 12px 16px;
    border-radius: var(--e-radius-md);
    border: 1px solid var(--e-success-500);
    margin-bottom: 20px;
}
.e-auth-form__error {
    background: var(--e-danger-50);
    color: var(--e-danger-700);
    padding: 10px 14px;
    border-radius: var(--e-radius-sm);
    border: 1px solid var(--e-danger-500);
    margin: 8px 0 16px;
    font-size: var(--e-fz-sm);
}
.e-auth-form__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -4px 0 18px;
    flex-wrap: wrap;
    gap: 8px;
}
.e-auth-form__alt {
    text-align: center;
    margin: 24px 0 0;
    font-size: var(--e-fz-sm);
    color: var(--e-text-muted);
}

/* --------- Transitions --------- */
.e-fade-enter-active, .e-fade-leave-active { transition: opacity .15s ease, transform .15s ease; }
.e-fade-enter-from, .e-fade-leave-to       { opacity: 0; transform: translateY(-4px); }

.e-route-enter-active, .e-route-leave-active { transition: opacity .2s ease; }
.e-route-enter-from, .e-route-leave-to       { opacity: 0; }

.e-modal-enter-active, .e-modal-leave-active { transition: opacity .2s ease; }
.e-modal-enter-active .e-modal, .e-modal-leave-active .e-modal { transition: transform .2s ease; }
.e-modal-enter-from, .e-modal-leave-to { opacity: 0; }
.e-modal-enter-from .e-modal, .e-modal-leave-to .e-modal { transform: scale(.95) translateY(20px); }

.e-toast-enter-active, .e-toast-leave-active { transition: opacity .25s ease, transform .25s ease; }
.e-toast-enter-from { opacity: 0; transform: translateX(20px); }
.e-toast-leave-to   { opacity: 0; transform: translateY(20px); }

/* --------- Responsive --------- */
@media (max-width: 1024px) {
    .e-auth-aside { display: none; }
}
@media (max-width: 768px) {
    .e-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }
    .e-app-shell.sidebar-open .e-sidebar { transform: translateX(0); }
    .e-app-shell.sidebar-open .e-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .5);
        z-index: 90;
    }
    .e-topbar__burger { display: inline-flex; }
    .e-app-content { padding: 20px 16px; }
    .e-user-chip__email { display: none; }
    .e-stats-grid { grid-template-columns: 1fr; }
    .e-table { font-size: var(--e-fz-xs); }
    .e-table th, .e-table td { padding: 10px 12px; }
}

/* ============================================================
 * Statistiques & Performance pages
 * ============================================================ */

/* Filtres en haut de page */
.e-stats-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
}
.e-stats-filters .e-field { flex: 0 0 auto; min-width: 180px; }
.e-stats-filters .e-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--e-fz-sm);
    color: var(--e-text-2);
}
.e-stats-filters .e-checkbox input { margin: 0; }

.e-segmented {
    display: inline-flex;
    padding: 4px;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.04);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    gap: 2px;
}
.e-segmented button {
    background: transparent;
    border: 0;
    border-radius: 7px;
    padding: 7px 14px;
    font-size: var(--e-fz-sm);
    font-weight: 500;
    color: var(--e-text-2);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}
.e-segmented button:hover:not(.is-active) {
    color: var(--e-text-1);
    background: rgba(255, 255, 255, 0.6);
}
.e-segmented button:active:not(.is-active) { transform: scale(0.96); }
.e-segmented button.is-active {
    background: #ffffff;
    color: var(--e-primary);
    font-weight: 600;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.06),
        0 2px 6px rgba(15, 23, 42, 0.06),
        0 0 0 1px rgba(37, 99, 235, 0.08);
}

/* Stats grid à 2 colonnes pour les cards de détail */
.e-stats-grid--2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 18px;
}

/* Chart SVG temporel */
.e-chart-wrap { width: 100%; }
.e-chart {
    width: 100%;
    height: 240px;
    display: block;
}
.e-chart__grid { stroke: #f1f5f9; stroke-width: 1; }
.e-chart__tick { font-size: 10px; fill: var(--e-text-3); font-family: inherit; }
.e-chart__area-views { fill: rgba(37, 99, 235, .10); }
.e-chart__line-views {
    fill: none;
    stroke: #2563eb;
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.e-chart__line-uniques {
    fill: none;
    stroke: #10b981;
    stroke-width: 2;
    stroke-dasharray: 4 3;
    stroke-linejoin: round;
}
.e-chart-legend {
    display: flex;
    gap: 18px;
    margin-top: 10px;
    font-size: var(--e-fz-sm);
    color: var(--e-text-2);
}
.e-chart-legend .e-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.e-dot--blue { background: #2563eb; }
.e-dot--green { background: #10b981; }

/* Rank lists (top pages / pays / referrers / OS / browsers) */
.e-rank-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.e-rank-list li {
    display: grid;
    grid-template-columns: 1fr 100px 70px;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--e-border);
    font-size: var(--e-fz-sm);
}
.e-rank-list li:last-child { border-bottom: 0; }
.e-rank-list__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--e-text-1);
}
.e-rank-list__bar {
    background: var(--e-bg-2);
    height: 6px;
    border-radius: 4px;
    overflow: hidden;
}
.e-rank-list__bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    border-radius: 4px;
    transition: width .35s ease;
}
.e-rank-list__value {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--e-text-2);
    font-weight: 500;
}
.e-flag {
    display: inline-block;
    margin-right: 6px;
    font-size: 16px;
    line-height: 1;
}

/* Donut chart (devices) */
.e-donut-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}
.e-donut {
    width: 140px;
    height: 140px;
    flex: 0 0 140px;
}
.e-donut__total { font-size: 6px; fill: var(--e-text-1); font-weight: 600; font-family: inherit; }
.e-donut__sub   { font-size: 3px; fill: var(--e-text-3); font-family: inherit; }
.e-donut-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    font-size: var(--e-fz-sm);
}
.e-donut-legend li {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 6px 0;
}
.e-donut-legend .e-dot { width: 10px; height: 10px; border-radius: 50%; }

/* Hour bars heatmap */
.e-hour-bars {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 4px;
    height: 120px;
    align-items: flex-end;
    padding-top: 8px;
}
.e-hour-bar {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    height: 100%;
    cursor: default;
}
.e-hour-bar__fill {
    width: 100%;
    min-height: 2px;
    background: linear-gradient(180deg, #60a5fa, #2563eb);
    border-radius: 3px 3px 0 0;
    transition: opacity .15s ease;
}
.e-hour-bar:hover .e-hour-bar__fill { opacity: .8; }
.e-hour-bar__label {
    font-size: 10px;
    color: var(--e-text-3);
    font-variant-numeric: tabular-nums;
}

/* ====== Performance ====== */
.e-perf-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}
.e-perf-score {
    background: var(--e-card-bg, #fff);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    padding: 22px 16px 18px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.e-perf-score:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.1);
}
.e-perf-score.is-good { background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%); }
.e-perf-score.is-warn { background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%); }
.e-perf-score.is-bad  { background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%); }
.e-gauge {
    width: 120px;
    height: 120px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.05));
}
.e-gauge__value {
    font-size: 10px;
    font-weight: 800;
    font-family: inherit;
    letter-spacing: -0.5px;
}
.e-perf-score__label {
    margin-top: 12px;
    font-size: 13px;
    color: var(--e-text-2);
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.e-vitals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.e-vital {
    background: var(--e-bg-2);
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-left: 3px solid var(--e-text-3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
}
.e-vital::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, currentColor 0%, transparent 70%);
    opacity: 0.06;
    pointer-events: none;
}
.e-vital:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.e-vital.is-good { border-left-color: #10b981; background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%); color: #10b981; }
.e-vital.is-warn { border-left-color: #f59e0b; background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%); color: #f59e0b; }
.e-vital.is-bad  { border-left-color: #ef4444; background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%); color: #ef4444; }
.e-vital.is-unknown { border-left-color: #cbd5e1; color: #94a3b8; }
.e-vital.crux-fast    { border-left-color: #10b981; background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%); color: #10b981; }
.e-vital.crux-average { border-left-color: #f59e0b; background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%); color: #f59e0b; }
.e-vital.crux-slow    { border-left-color: #ef4444; background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%); color: #ef4444; }
.e-vital__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    position: relative;
}
.e-vital__label {
    font-weight: 700;
    color: var(--e-text-1);
    font-size: 13px;
    letter-spacing: 0.5px;
}
.e-vital__desc {
    font-size: 11px;
    color: var(--e-text-3);
    text-align: right;
    font-weight: 500;
}
.e-vital__value {
    font-size: 24px;
    font-weight: 700;
    color: var(--e-text-1);
    margin-top: 10px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    position: relative;
}
.e-vital__threshold {
    font-size: 11px;
    color: var(--e-text-3);
    margin-top: 4px;
    position: relative;
}

.e-opps {
    list-style: none;
    padding: 0;
    margin: 0;
}
.e-opp {
    padding: 16px 18px;
    border: 1px solid var(--e-border);
    border-left: 3px solid #f59e0b;
    border-radius: 10px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 50%);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.e-opp:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
}
.e-opp:last-child { margin-bottom: 0; }
.e-opp__title {
    font-weight: 600;
    color: var(--e-text-1);
    margin-bottom: 6px;
}
.e-opp__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--e-fz-sm);
    color: var(--e-text-2);
}
.e-audit-running {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 40px 20px;
}
.e-audit-running p { margin: 0; max-width: 560px; }
.e-muted { color: var(--e-text-3); font-size: var(--e-fz-sm); }
.e-muted.e-center { text-align: center; }

/* ============================================================
   Performance page — hero, tabs, filmstrip, donut, tables, history
   ============================================================ */

/* Fix overflow bug : displayValue type "Root document took 0 ms" était trop long */
.e-vital__value {
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

/* --- Hero verdict — glow + gradient ring icon --- */
.e-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    transition: box-shadow 0.3s ease;
}
.e-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(148, 163, 184, 0.15) 0%, transparent 40%);
    pointer-events: none;
}
.e-hero.e-hero--is-good {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 60%, #dcfce7 100%);
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.06), 0 4px 16px rgba(16, 185, 129, 0.08);
}
.e-hero--is-good::before { background: radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.18) 0%, transparent 45%); }
.e-hero.e-hero--is-warn {
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 60%, #fef3c7 100%);
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.06), 0 4px 16px rgba(245, 158, 11, 0.08);
}
.e-hero--is-warn::before { background: radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.18) 0%, transparent 45%); }
.e-hero.e-hero--is-bad {
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 60%, #fee2e2 100%);
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.06), 0 4px 16px rgba(239, 68, 68, 0.08);
}
.e-hero--is-bad::before { background: radial-gradient(circle at 0% 0%, rgba(239, 68, 68, 0.18) 0%, transparent 45%); }

.e-hero__row {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
    justify-content: space-between;
}
.e-hero__verdict {
    display: flex;
    align-items: center;
    gap: 18px;
}
.e-hero__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    flex-shrink: 0;
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    box-shadow:
        0 8px 16px -4px rgba(148, 163, 184, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.e-hero:hover .e-hero__icon { transform: scale(1.05) rotate(-3deg); }
.e-hero--is-good .e-hero__icon {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 8px 16px -4px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.e-hero--is-warn .e-hero__icon {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 8px 16px -4px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.e-hero--is-bad .e-hero__icon {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 8px 16px -4px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.e-hero__label {
    font-size: 26px;
    font-weight: 700;
    color: var(--e-text-1);
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.e-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    font-size: var(--e-fz-sm);
}
.e-hero__meta > div { min-width: 0; line-height: 1.5; }
.e-hero__meta a { word-break: break-all; }
.e-hero__warnings {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

/* --- Tabs : pill segmented control, modern + soft shadow on active --- */
.e-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 20px;
    padding: 6px;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.04);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
}
.e-tab {
    background: transparent;
    border: 0;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--e-text-2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
    line-height: 1;
    position: relative;
}
.e-tab:hover:not(.is-active) {
    color: var(--e-text-1);
    background: rgba(255, 255, 255, 0.55);
}
.e-tab:active:not(.is-active) {
    transform: scale(0.97);
}
.e-tab.is-active {
    color: var(--e-primary, #2563eb);
    background: #ffffff;
    font-weight: 600;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.06),
        0 2px 8px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(37, 99, 235, 0.08);
}
.e-tab.is-active .e-tab__icon {
    transform: scale(1.1);
}
.e-tab__icon {
    font-size: 17px;
    line-height: 1;
    transition: transform 0.2s ease;
}
.e-tab-panel { animation: e-fade-in 0.25s ease-out; }

@keyframes e-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Filmstrip & screenshot --- */
.e-shots-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 16px;
}
.e-shot-final {
    display: flex;
    justify-content: center;
    background: #0f172a;
    border-radius: 8px;
    padding: 12px;
    overflow: hidden;
}
.e-shot-final img {
    max-width: 100%;
    max-height: 480px;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.e-filmstrip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}
.e-filmstrip__item {
    margin: 0;
    background: #f8fafc;
    border: 1px solid var(--e-border, #e5e7eb);
    border-radius: 6px;
    padding: 6px;
    text-align: center;
}
.e-filmstrip__item img {
    width: 100%;
    height: auto;
    border-radius: 3px;
    display: block;
}
.e-filmstrip__item figcaption {
    font-size: 11px;
    color: var(--e-text-3);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

/* --- Compact gauges (utilisé en mode comparaison) --- */
.e-perf-scores--compact { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.e-perf-scores--compact .e-perf-score { padding: 8px 4px; }
.e-perf-scores--compact .e-gauge { width: 72px; height: 72px; }
.e-perf-scores--compact .e-perf-score__label { font-size: 12px; }

/* --- Compare layout --- */
.e-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.e-compare__col { min-width: 0; }
.e-compare__title { margin: 0 0 4px; font-size: 18px; }
.e-compare__vitals {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 16px;
}
.e-compare__vital {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 3px solid #cbd5e1;
    background: #f8fafc;
    font-size: var(--e-fz-sm);
}
.e-compare__vital.is-good { border-left-color: #10b981; background: #f0fdf4; }
.e-compare__vital.is-warn { border-left-color: #f59e0b; background: #fffbeb; }
.e-compare__vital.is-bad  { border-left-color: #ef4444; background: #fef2f2; }
.e-compare__vital-label { font-weight: 600; color: var(--e-text-2); }
.e-compare__vital-value { font-variant-numeric: tabular-nums; color: var(--e-text-1); }

/* --- Scripts top list (bootup) --- */
.e-scripts {
    list-style: none;
    margin: 0;
    padding: 0;
}
.e-scripts li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--e-border, #e5e7eb);
    font-size: var(--e-fz-sm);
}
.e-scripts li:last-child { border-bottom: 0; }
.e-script__url {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--e-text-2);
    min-width: 0;
    flex: 1;
    direction: rtl; /* tronque au début pour garder le nom de fichier visible */
    text-align: left;
}
.e-script__time {
    font-variant-numeric: tabular-nums;
    color: var(--e-text-1);
    font-weight: 600;
    flex-shrink: 0;
}

/* --- Stat row (DOM size, total bytes, long tasks) --- */
.e-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* --- Tables (tiers, history) --- */
.e-table-tiers,
.e-table-history {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--e-fz-sm);
}
.e-table-tiers th,
.e-table-tiers td,
.e-table-history th,
.e-table-history td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--e-border, #e5e7eb);
    text-align: left;
    vertical-align: middle;
}
.e-table-tiers th,
.e-table-history th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--e-text-3);
    letter-spacing: 0.4px;
    background: #f8fafc;
}
.e-table-tiers tbody tr:hover,
.e-table-history tbody tr:hover { background: #f8fafc; }
.e-table-tiers .text-right,
.e-table-history .text-right { text-align: right; font-variant-numeric: tabular-nums; }
.e-table-tiers .is-warn { color: #b45309; font-weight: 600; }
.e-table-history .is-good { color: #047857; font-weight: 600; }
.e-table-history .is-warn { color: #b45309; font-weight: 600; }
.e-table-history .is-bad  { color: #b91c1c; font-weight: 600; }
.e-table-tiers td:first-child {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Failed audits list (A11y / SEO) --- */
.e-failed-audits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.e-failed-audit {
    border: 1px solid var(--e-border, #e5e7eb);
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 14px;
    background: #fffbeb;
}
.e-failed-audit__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.e-failed-audit__title {
    font-weight: 600;
    color: var(--e-text-1);
    flex: 1;
    min-width: 0;
}
.e-failed-audit__desc {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--e-text-2);
    line-height: 1.4;
}
.e-failed-audit__value {
    margin: 6px 0 0;
    font-size: 13px;
    color: #b45309;
    font-weight: 500;
}

@media (max-width: 900px) {
    .e-shots-grid { grid-template-columns: 1fr; }
    .e-compare { grid-template-columns: 1fr; }
    .e-stat-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .e-stats-grid--2col { grid-template-columns: 1fr; }
    .e-perf-scores { grid-template-columns: repeat(2, 1fr); }
    .e-donut-wrap { flex-direction: column; align-items: center; }
    .e-rank-list li { grid-template-columns: 1fr 60px 60px; }
    .e-hero__row { flex-direction: column; align-items: stretch; }
    .e-hero__meta { gap: 12px; }
    .e-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .e-tab__label { display: none; }
    .e-tab { padding: 10px 12px; }
    .e-stat-row { grid-template-columns: 1fr; }
    .e-table-tiers th:nth-child(3),
    .e-table-tiers td:nth-child(3) { display: none; }
    .e-table-history th:nth-child(n+6),
    .e-table-history td:nth-child(n+6) { display: none; }
}

/* ============================================================
   Performance — flat design override (cohérence avec le reste de l'app)
   Pas de shadow, pas de hover lift, gradients atténués.
   ============================================================ */
.e-page--perf .e-card,
.e-page--perf .e-card.is-elevated {
    box-shadow: none;
    border: 1px solid var(--e-border-soft);
}
.e-page--perf .e-perf-score {
    box-shadow: none;
    background: var(--e-gray-0);
    border: 1px solid var(--e-border-soft);
    border-radius: 12px;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.e-page--perf .e-perf-score:hover {
    box-shadow: none;
    transform: none;
    border-color: var(--e-border);
}
.e-page--perf .e-perf-score.is-good { background: #f0fdf4; border-color: #bbf7d0; }
.e-page--perf .e-perf-score.is-warn { background: #fffbeb; border-color: #fde68a; }
.e-page--perf .e-perf-score.is-bad  { background: #fef2f2; border-color: #fecaca; }
.e-page--perf .e-gauge { filter: none; }

.e-page--perf .e-vital {
    transition: none;
    background: var(--e-gray-0);
    border: 1px solid var(--e-border-soft);
    border-left: 3px solid var(--e-text-3);
}
.e-page--perf .e-vital::before { display: none; }
.e-page--perf .e-vital:hover { transform: none; box-shadow: none; }
.e-page--perf .e-vital.is-good { background: #f0fdf4; border-color: #bbf7d0; border-left-color: #10b981; }
.e-page--perf .e-vital.is-warn { background: #fffbeb; border-color: #fde68a; border-left-color: #f59e0b; }
.e-page--perf .e-vital.is-bad  { background: #fef2f2; border-color: #fecaca; border-left-color: #ef4444; }
.e-page--perf .e-vital.crux-fast    { background: #f0fdf4; border-color: #bbf7d0; border-left-color: #10b981; }
.e-page--perf .e-vital.crux-average { background: #fffbeb; border-color: #fde68a; border-left-color: #f59e0b; }
.e-page--perf .e-vital.crux-slow    { background: #fef2f2; border-color: #fecaca; border-left-color: #ef4444; }

.e-page--perf .e-opp {
    background: #fffbeb;
    border-color: #fde68a;
    transition: none;
}
.e-page--perf .e-opp:hover { transform: none; box-shadow: none; }

.e-page--perf .e-hero,
.e-page--perf .e-hero.e-hero--is-good,
.e-page--perf .e-hero.e-hero--is-warn,
.e-page--perf .e-hero.e-hero--is-bad {
    box-shadow: none;
    background: var(--e-gray-0);
    border: 1px solid var(--e-border-soft);
    transition: none;
}
.e-page--perf .e-hero::before { display: none; }
.e-page--perf .e-hero.e-hero--is-good { background: #f0fdf4; border-color: #bbf7d0; }
.e-page--perf .e-hero.e-hero--is-warn { background: #fffbeb; border-color: #fde68a; }
.e-page--perf .e-hero.e-hero--is-bad  { background: #fef2f2; border-color: #fecaca; }
.e-page--perf .e-hero__icon {
    box-shadow: none;
    background: #64748b;
    transition: none;
}
.e-page--perf .e-hero:hover .e-hero__icon { transform: none; }
.e-page--perf .e-hero--is-good .e-hero__icon { background: #10b981; box-shadow: none; }
.e-page--perf .e-hero--is-warn .e-hero__icon { background: #f59e0b; box-shadow: none; }
.e-page--perf .e-hero--is-bad .e-hero__icon  { background: #ef4444; box-shadow: none; }

.e-page--perf .e-tabs {
    background: var(--e-gray-0);
    border: 1px solid var(--e-border-soft);
    box-shadow: none;
}
.e-page--perf .e-tab.is-active {
    box-shadow: none;
    background: var(--e-blue-50, #eff6ff);
    border: 1px solid var(--e-blue-200, #bfdbfe);
}
.e-page--perf .e-tab.is-active .e-tab__icon { transform: none; }
.e-page--perf .e-tab:active:not(.is-active) { transform: none; }

.e-page--perf .e-segmented { box-shadow: none; }
.e-page--perf .e-segmented button.is-active { box-shadow: none; }
.e-page--perf .e-segmented button:active:not(.is-active) { transform: none; }

.e-page--perf .e-shot-final img { box-shadow: none; border: 1px solid var(--e-border-soft); }
.e-page--perf .e-failed-audit { background: #fffbeb; }

/* ============================================================
   File explorer (SiteDetailPage) — sidebar + editor + preview
   ============================================================ */

.e-fx-card .e-card__body { padding: 0; }
.e-fx-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.e-fx-search {
    min-width: 200px;
    max-width: 260px;
}

.e-fx {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 600px;
    border-top: 1px solid var(--e-border);
}

/* --- Sidebar --- */
.e-fx__sidebar {
    border-right: 1px solid var(--e-border);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    overflow-y: auto;
    max-height: 80vh;
    padding: 8px 0;
}
.e-fx__empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--e-text-3);
    font-size: var(--e-fz-sm);
}
.e-fx-group { margin-bottom: 4px; }
.e-fx-group__head {
    --group-color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--e-text-2);
    transition: background 0.15s ease;
    border-radius: 0;
}
.e-fx-group__head:hover { background: rgba(15, 23, 42, 0.04); }
.e-fx-group__chevron {
    color: var(--e-text-3);
    font-size: 10px;
    transition: transform 0.15s ease;
    width: 12px;
    display: inline-block;
    text-align: center;
}
.e-fx-group.is-collapsed .e-fx-group__chevron { transform: rotate(-90deg); }
.e-fx-group__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--group-color);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}
.e-fx-group__label { flex: 1; min-width: 0; }
.e-fx-group__count {
    background: rgba(15, 23, 42, 0.06);
    color: var(--e-text-2);
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.e-fx-group__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.e-fx-file {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 28px;
    cursor: pointer;
    transition: background 0.1s ease;
    border-left: 3px solid transparent;
}
.e-fx-file:hover { background: rgba(37, 99, 235, 0.06); }
.e-fx-file.is-active {
    background: rgba(37, 99, 235, 0.1);
    border-left-color: var(--e-primary);
}
.e-fx-file.is-active .e-fx-file__name { color: var(--e-primary); font-weight: 600; }
.e-fx-file__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    padding: 0 6px;
    border-radius: 4px;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    min-width: 38px;
}
.e-fx-file__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.e-fx-file__name {
    color: var(--e-text-1);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.e-fx-file__dir {
    color: var(--e-text-3);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.e-fx-file__size {
    font-size: 11px;
    color: var(--e-text-3);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* --- Editor pane --- */
.e-fx__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
}
.e-fx__welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--e-text-2);
}
.e-fx__welcome-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}
.e-fx__welcome h3 {
    margin: 0 0 8px;
    color: var(--e-text-1);
}

.e-fx-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--e-border);
    flex-wrap: wrap;
}
.e-fx-editor-toolbar__left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.e-fx-editor-toolbar__filename {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    color: var(--e-text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.e-fx-editor-toolbar__right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.e-fx-editor-toolbar__live {
    font-size: var(--e-fz-sm);
    padding: 0 6px;
}

.e-fx-editor {
    flex: 1;
    min-height: 500px;
    display: flex;
    overflow: hidden;
    background: #282c34; /* match oneDark — évite un flash blanc avant le mount */
}
.e-fx-editor__cm {
    flex: 1;
    min-width: 0;
    overflow: auto;
    background: #282c34;
}
/* CodeMirror — base sizing */
.e-fx-editor__cm .cm-editor {
    height: 100%;
    font-size: 13.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}
.e-fx-editor__cm .cm-editor.cm-focused { outline: 0; }
.e-fx-editor__cm .cm-scroller { font-family: inherit; line-height: 1.55; }
.e-fx-editor__cm .cm-gutters { font-variant-numeric: tabular-nums; }

/* CodeMirror — force fond blanc + texte noir (override toute règle qui essaie
   d'appliquer un thème dark). Pas de coloration syntaxique : juste un éditeur
   propre et lisible. */
.cm-editor,
.cm-editor .cm-scroller,
.cm-editor .cm-content {
    background-color: #ffffff !important;
    color: #1f2328 !important;
}
.cm-editor .cm-gutters {
    background-color: #f6f8fa !important;
    color: #8c959f !important;
    border-right: 1px solid #d0d7de !important;
}
.cm-editor .cm-activeLine {
    background-color: #f6f8fa !important;
}
.cm-editor .cm-activeLineGutter {
    background-color: #eaeef2 !important;
    color: #1f2328 !important;
}
.cm-editor .cm-cursor,
.cm-editor .cm-dropCursor {
    border-left-color: #0969da !important;
}

.e-fx-editor__loading {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}
.e-fx-editor__error {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Preview */
.e-fx-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    background: #f8fafc;
}
.e-fx-preview__hint {
    margin: 0;
    padding: 10px 14px;
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 12px;
    line-height: 1.4;
}
.e-fx-preview__hint code {
    background: rgba(154, 52, 18, 0.1);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
}
.e-fx-preview__frame {
    flex: 1;
    width: 100%;
    border: 0;
    background: #fff;
}

.e-fx-source {
    flex: 1;
    margin: 0;
    padding: 16px;
    background: #0f172a;
    color: #e2e8f0;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.5;
    white-space: pre;
}
.e-fx-source code { color: inherit; background: transparent; }

/* Preview image */
.e-fx-image-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: repeating-conic-gradient(#f1f5f9 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
    min-height: 400px;
}
.e-fx-image-preview img {
    max-width: 100%;
    max-height: 60vh;
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
    border-radius: 4px;
}
.e-fx-image-preview .e-muted {
    margin-top: 12px;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

@media (max-width: 900px) {
    .e-fx {
        grid-template-columns: 1fr;
    }
    .e-fx__sidebar {
        max-height: 280px;
        border-right: 0;
        border-bottom: 1px solid var(--e-border);
    }
    .e-fx-editor-toolbar__right { width: 100%; justify-content: flex-end; }
}

/* ============================================================
   Gestionnaire de fichiers — version plein écran
   (route /sites/:id/files, meta.fullscreen=true)
   ============================================================ */

.e-fx-fullscreen {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100vh;
    min-height: 0;
    background: #ffffff;
    overflow: hidden;
}
.e-fx-fullscreen__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--e-border);
    flex-wrap: wrap;
    flex-shrink: 0;
}
.e-fx-fullscreen__header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
}
.e-fx-fullscreen__back {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}
.e-fx-fullscreen__title {
    color: var(--e-text-3);
    font-size: 13px;
    padding-left: 16px;
    border-left: 1px solid var(--e-border);
}
.e-fx-fullscreen__header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.e-fx-fullscreen__loading,
.e-fx-fullscreen__empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

/* En mode fullscreen, la grille file manager prend toute la hauteur restante.
 * Important : grid-template-rows: 1fr force la rangée à fill (sinon `auto` sizing
 * = content height = 0 pour CodeMirror qui attend une hauteur de son parent). */
.e-fx--fullscreen {
    flex: 1;
    min-height: 0;
    border-top: 0;
    grid-template-rows: 1fr;
    height: 100%;
}
.e-fx--fullscreen .e-fx__sidebar {
    max-height: none;
    height: 100%;
    min-height: 0;
}
.e-fx--fullscreen .e-fx__main {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.e-fx--fullscreen .e-fx-editor,
.e-fx--fullscreen .e-fx-preview,
.e-fx--fullscreen .e-fx-image-preview {
    min-height: 0;
    flex: 1;
    overflow: hidden;
}
.e-fx--fullscreen .e-fx-editor__cm,
.e-fx--fullscreen .e-fx-editor__cm .cm-editor,
.e-fx--fullscreen .e-fx-editor__cm .cm-scroller {
    height: 100%;
    min-height: 0;
}

@media (max-width: 900px) {
    .e-fx--fullscreen { grid-template-columns: 1fr; }
    .e-fx--fullscreen .e-fx__sidebar {
        max-height: 220px;
        border-right: 0;
        border-bottom: 1px solid var(--e-border);
    }
    .e-fx-fullscreen__title { display: none; }
}

/* ============================================================
   Lien "Gestionnaire de fichiers" sur SiteDetailPage
   ============================================================ */

.e-file-manager-link {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 18px;
    padding: 22px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.e-file-manager-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12), 0 2px 4px rgba(15, 23, 42, 0.06);
    border-color: rgba(37, 99, 235, 0.3);
}
.e-file-manager-link__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.e-file-manager-link__body {
    flex: 1;
    min-width: 0;
}
.e-file-manager-link__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--e-text-1);
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}
.e-file-manager-link__desc {
    font-size: 13.5px;
    color: var(--e-text-2);
    line-height: 1.4;
}
.e-file-manager-link__cta {
    color: var(--e-primary);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}
.e-file-manager-link:hover .e-file-manager-link__cta { transform: translateX(2px); }

@media (max-width: 640px) {
    .e-file-manager-link { flex-direction: column; align-items: flex-start; text-align: left; }
    .e-file-manager-link__cta { align-self: flex-end; }
}
