/**
 * KAPTIVIA OUTILS PRO v7.0.0 — Styles
 * @version 7.0.0
 * @date    2026-01-30
 * 
 * Préfixe svc- pour isolation. Variables --svc-*. États scopés au composant.
 * 
 * BREAKPOINTS (Bible Viewport 7.0.0 - Logique Dalia) :
 * ═══════════════════════════════════════════════════════════════════════════
 * DESKTOP/TABLETTES (max-width descendant) :
 *   992px  : Nav mobile, sidebar masquée
 *   768px  : Grid 2 colonnes, admin responsive
 * 
 * SMARTPHONES (max-width descendant, portrait) :
 *   576px  : Cartes compactes
 *   480px  : Limite haute mobiles
 *   440px  : iPhone 16 Pro Max
 *   393px  : iPhone 16/15/14 Pro
 *   375px  : iPhone SE, Mini
 *   360px  : Galaxy S24/A55, Xiaomi
 * 
 * PAYSAGE MOBILE (max-height) :
 *   500px  : Modales compactes
 *   400px  : Modales très compactes
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════════════════
   VARIABLES
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* Layout */
    --svc-sidebar-w: 260px;
    --svc-header-h: calc(56px + env(safe-area-inset-top, 0px));
    --svc-touch-min: 44px; /* Touch target minimum (WCAG 2.1) */

    /* Couleurs */
    --svc-c-bg: #f3f4f6;
    --svc-c-sidebar: #1f2937;
    --svc-c-card: #ffffff;
    --svc-c-hover: #f9fafb;
    --svc-c-text: #1f2937;
    --svc-c-muted: #6b7280;
    --svc-c-sidebar-text: #d1d5db;
    --svc-c-accent: #39ff14;
    --svc-c-accent-rgb: 57, 255, 20;
    --svc-c-sidebar-active: #ff8a00;
    --svc-c-sidebar-active-rgb: 255, 138, 0;
    --svc-c-success: #22c55e;
    --svc-c-danger: #dc2626;

    /* UI */
    --svc-radius: 16px;
    --svc-radius-sm: 10px;
    --svc-shadow: 0 2px 8px rgba(0,0,0,0.06);
    --svc-shadow-lg: 0 12px 30px rgba(0,0,0,0.12);
    --svc-ease: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --svc-z-modal: 1000;

    /* Dimensions cartes (anti-CLS) */
    --svc-card-min-h: 260px;
    --svc-card-icon-size: 115px;
    --svc-card-img-size: 85px;
    --svc-tag-size: 130px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITAIRES ACCESSIBILITÉ
   ═══════════════════════════════════════════════════════════════════════════ */

/* Screen reader only - labels invisibles mais accessibles */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT + TRANSITIONS DE PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.svc-app {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: var(--svc-header-h);
    background: var(--svc-c-bg);
    contain: layout style;
    opacity: 0;
}

body.page-enter .svc-app {
    animation: pageEnter 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

body.page-exit .svc-app {
    animation: pageExit 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

body.page-ready .svc-app {
    opacity: 1;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pageExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@supports (animation: none) {
    .svc-app {
        animation: svcFallbackReveal 0s 1s forwards;
    }
    body.page-enter .svc-app,
    body.page-ready .svc-app {
        animation: none;
        opacity: 1;
    }
}

@keyframes svcFallbackReveal {
    to { opacity: 1; }
}

/* BOUTON CONNEXION & STATUS */
.svc-login-btn,
.svc-status-group {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

@media (min-width: 768px) {
    .svc-login-btn,
    .svc-status-group {
        top: calc(100% + 0.45rem);
        transform: none;
    }
}

@media (min-width: 768px) and (max-width: 992px) {
    .svc-login-btn,
    .svc-status-group {
        top: calc(100% + var(--svc-mobile-nav-h, 56px) + 0.45rem);
    }
}
.svc-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    min-height: var(--svc-touch-min);
    background: #f3f4f6;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.svc-login-btn:hover {
    background: #ecb609;
    color: #fff;
    border-color: #ecb609;
}
.svc-login-btn:focus-visible {
    outline: 2px solid #ecb609;
    outline-offset: 2px;
}
.svc-status-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.svc-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
    font-weight: 500;
}

.svc-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.6rem;
    min-height: var(--svc-touch-min);
    font-size: 0.75rem;
    color: #6b7280;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, color 0.2s ease;
}

.svc-logout-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */

.svc-mobile-nav {
    display: none;
}

@media (max-width: 992px) {
    :root {
        --svc-mobile-nav-h: 56px;
    }

    .svc-mobile-nav {
        display: flex;
        justify-content: stretch;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem 0.75rem;
        background: #f8f9fa;
        border-bottom: 1px solid #d1d5db;
        box-shadow: 0 2px 4px rgba(0,0,0,0.06);
        position: fixed;
        top: var(--svc-header-h);
        left: 0;
        right: 0;
        z-index: 95;
        height: var(--svc-mobile-nav-h);
        box-sizing: border-box;
    }

    .svc-mobile-nav__btn {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0.25rem;
        min-height: var(--svc-touch-min);
        font-size: 0.8125rem;
        font-weight: 600;
        color: #4b5563;
        background: #ffffff;
        border: 2px solid #d1d5db;
        border-radius: 0.5rem;
        cursor: pointer;
        transition: all 0.15s ease;
        box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    }

    .svc-mobile-nav__btn:hover {
        color: #1f2937;
        border-color: #9ca3af;
        background: #f9fafb;
    }

    .svc-mobile-nav__btn.is-active {
        color: #ffffff;
        background: #7c3aed;
        border-color: #7c3aed;
        box-shadow: 0 2px 4px rgba(124,58,237,0.3);
    }

    .svc-app {
        padding-top: calc(var(--svc-header-h) + var(--svc-mobile-nav-h));
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT PRINCIPAL
   ═══════════════════════════════════════════════════════════════════════════ */

.svc-main {
    flex: 1 1 auto;
    margin-left: var(--svc-sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--svc-header-h));
    min-height: calc(100dvh - var(--svc-header-h));
    width: calc(100% - var(--svc-sidebar-w));
    contain: layout;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */

.svc-sidebar {
    position: fixed;
    top: var(--svc-header-h);
    left: 0;
    bottom: 0;
    width: var(--svc-sidebar-w);
    min-width: var(--svc-sidebar-w);
    max-width: var(--svc-sidebar-w);
    background: var(--svc-c-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 100;
    contain: layout style;
}

.svc-sidebar__nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.svc-sidebar__section {
    padding: 0.5rem 0;
}

.svc-sidebar__section-title {
    padding: 1.25rem 1.25rem 0.75rem calc(1.25rem + 26px + 0.75rem);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 0.5rem;
}

.svc-sidebar__section-icon {
    font-size: 1.1rem;
}

.svc-sidebar__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 1.25rem;
    background: none;
    border: none;
    color: var(--svc-c-sidebar-text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--svc-ease);
    text-align: left;
    font-family: inherit;
}

.svc-sidebar__item:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.svc-sidebar__item.is-active {
    background: rgba(var(--svc-c-sidebar-active-rgb), 0.15);
    color: var(--svc-c-sidebar-active);
}

.svc-sidebar__item-num {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: var(--svc-ease);
}

.svc-sidebar__item.has-unlocked .svc-sidebar__item-num {
    background: var(--svc-c-success);
    color: #fff;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.svc-sidebar__item.has-unlocked.is-active .svc-sidebar__item-num {
    background: var(--svc-c-sidebar-active);
    color: var(--svc-c-sidebar);
    box-shadow: 0 0 10px rgba(var(--svc-c-sidebar-active-rgb), 0.5);
}

.svc-sidebar__item-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.svc-sidebar__toggle {
    display: none;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENT & PANELS
   ═══════════════════════════════════════════════════════════════════════════ */

.svc-content {
    flex: 1;
    padding: 2rem;
}

/* Titre global Outils Pro (visible quel que soit le panneau actif) */
.svc-page-title-wrap {
    padding: 1.75rem 2rem 0;
    display: flex;
    justify-content: center;
}

.svc-page-title {
    margin: 0;
    width: fit-content;
}

.composed-title--outils-inline {
    --composed-title-main-color: var(--gray-900);
    --composed-title-accent-color: var(--brand-500);
    /* -10% vs charte principale */
    --composed-title-main-size: clamp(1.35rem, 3.42vw, 3.02rem);
    --composed-title-accent-size: clamp(1.4rem, 3.6vw, 3.11rem);
}

.composed-title--outils-inline .composed-title__stack {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: clamp(0.3rem, 0.75vw, 0.65rem);
    margin: 0;
    width: auto;
    white-space: nowrap;
}

.composed-title--outils-inline .composed-title__main {
    align-self: baseline;
    width: auto;
    text-align: left;
}

.composed-title--outils-inline .composed-title__accent {
    align-self: baseline;
    width: auto;
    text-align: left;
}

/* Compense la sidebar desktop pour centrer visuellement sur la page entière */
@media (min-width: 993px) {
    .svc-page-title {
        margin-left: calc(var(--svc-sidebar-w) * -0.5);
    }
}

.svc-panel {
    display: none;
}

.svc-panel.is-visible {
    display: block;
}

.svc-panel__header {
    margin-bottom: 1.5rem;
}

.svc-panel__title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--svc-c-text);
}

.svc-panel__title-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.svc-panel__count {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--svc-c-muted);
    background: var(--svc-c-hover);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.svc-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 3rem 1.5rem;
    padding-bottom: 40px;
}

.svc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0.9rem 2.5rem;
    background: var(--svc-c-card);
    border-radius: var(--svc-radius);
    border: 2px solid transparent;
    box-shadow: var(--svc-shadow);
    text-align: center;
    min-height: var(--svc-card-min-h);
    height: auto;
    --btn-bg: rgba(239,68,68,0.2);
    --btn-color: var(--svc-c-danger);
    --btn-border: rgba(239,68,68,0.3);
}

.svc-card:hover {
    z-index: 2;
}

.svc-card--active {
    --btn-bg: rgba(34,197,94,0.2);
    --btn-color: #16a34a;
    --btn-border: rgba(34,197,94,0.3);
    border-color: var(--svc-c-success);
}

.svc-card--active:hover {
    border-color: var(--svc-c-accent);
}

.svc-card--locked {
    border-color: var(--svc-c-danger);
}

.svc-card--locked:hover {
    border-color: #ff3333;
}

.svc-card__rank {
    position: absolute;
    top: 0.5rem;
    left: 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--svc-c-muted);
}

.svc-card__info {
    position: absolute;
    top: 0.35rem;
    right: 0.4rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    border: none;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--svc-c-muted);
    cursor: pointer;
}

/* Zone tactile invisible 44×44 — le cercle reste visuellement compact */
.svc-card__info::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
}

.svc-card__info:hover {
    background: #d1d5db;
}

.svc-card__icon {
    width: var(--svc-card-icon-size);
    height: var(--svc-card-icon-size);
    min-width: var(--svc-card-icon-size);
    min-height: var(--svc-card-icon-size);
    max-width: var(--svc-card-icon-size);
    max-height: var(--svc-card-icon-size);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #6b7280 0%, #4b5563 40%, #374151 100%);
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 16px rgba(0,0,0,0.25), 0 2px 4px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.25);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.svc-card__icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
    border-radius: 21px 21px 50% 50%;
    pointer-events: none;
}

.svc-card__icon img {
    width: var(--svc-card-img-size);
    height: var(--svc-card-img-size);
    min-width: var(--svc-card-img-size);
    min-height: var(--svc-card-img-size);
    max-width: var(--svc-card-img-size);
    max-height: var(--svc-card-img-size);
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    position: relative;
    z-index: 1;
}

.svc-card__content {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    padding: 0 0.15rem;
}

.svc-card__name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--svc-c-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.svc-card__desc {
    font-size: 0.7rem;
    color: var(--svc-c-muted);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.svc-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.9rem;
    min-height: 44px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-color);
    align-self: center;
    margin: 0.2rem 0 0.4rem;
}

.svc-card__btn:hover {
    filter: brightness(1.1);
}

.svc-card__btn--soon {
    background: rgba(100,100,100,0.15);
    color: var(--svc-c-muted);
    border-color: rgba(100,100,100,0.2);
    cursor: default;
    font-style: italic;
}

.svc-card__btn--soon:hover {
    filter: none;
}

.svc-card__btn--active {
    background: linear-gradient(135deg, #39ff14 0%, #00e600 100%);
    color: #000;
    border-color: #00cc00;
    font-weight: 700;
    text-shadow: 0 0 2px rgba(255,255,255,0.5);
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
}

.svc-card__btn--active:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.6);
}

.svc-card__btn--locked {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    color: #fff;
    border-color: #dc2626;
}

.svc-card__btn--locked:hover {
    filter: brightness(1.1);
}

.svc-card--doc {
    /* Style personnalisable pour les cartes document */
}

.svc-card__tag {
    position: absolute;
    bottom: calc(var(--svc-tag-size) * -0.15);
    left: 50%;
    transform: translateX(-50%);
    width: var(--svc-tag-size);
    height: auto;
    filter: drop-shadow(2px 3px 4px rgba(0,0,0,0.25));
    z-index: 3;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.svc-footer {
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--svc-c-muted);
    border-top: 1px solid rgba(0,0,0,0.06);
    background: var(--svc-c-card);
}

.svc-footer a {
    color: inherit;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */

.svc-modal-base {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--svc-z-modal);
    opacity: 0;
    visibility: hidden;
    transition: var(--svc-ease);
    padding: 1rem;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.svc-modal-base.is-active {
    opacity: 1;
    visibility: visible;
}

.svc-info-modal {
    background: rgba(0,0,0,0.5);
}

.svc-info-modal__content {
    background: var(--svc-c-card);
    padding: 1.5rem;
    border-radius: var(--svc-radius);
    max-width: 400px;
    width: 100%;
    box-shadow: var(--svc-shadow-lg);
}

.svc-info-modal__text {
    font-size: 0.95rem;
    color: var(--svc-c-text);
    line-height: 1.6;
}

.svc-modal-overlay {
    background: rgba(0,0,0,0.6);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.svc-modal-overlay:not(.is-active) {
    opacity: 0;
    visibility: hidden;
}

.svc-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.svc-modal {
    background: var(--svc-c-card);
    padding: 2.5rem;
    border-radius: var(--svc-radius);
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: var(--svc-shadow-lg);
}

.svc-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: var(--svc-c-hover);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--svc-c-muted);
    transition: var(--svc-ease);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Zone tactile invisible 44×44 — le cercle reste visuellement compact */
.svc-modal__close::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
}

.svc-modal__close:hover {
    background: #e5e7eb;
    color: var(--svc-c-text);
}

.svc-modal__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.svc-modal__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.svc-modal__title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--svc-c-text);
}

.svc-modal__text {
    color: var(--svc-c-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.svc-modal__contact {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--svc-c-text);
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--svc-ease);
}

.svc-modal__contact:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN FORM
   ═══════════════════════════════════════════════════════════════════════════ */

.svc-login-modal {
    max-width: 360px;
}

.svc-login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.svc-login-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.svc-login-form__field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--svc-c-muted);
    text-align: left;
}

.svc-login-form__field input {
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: var(--svc-radius-sm);
    font-size: 0.95rem;
    transition: var(--svc-ease);
}

.svc-login-form__field input:focus {
    outline: none;
    border-color: var(--svc-c-accent);
    box-shadow: 0 0 0 3px rgba(var(--svc-c-accent-rgb), 0.15);
}

.svc-login-form__error {
    font-size: 0.85rem;
    color: var(--svc-c-danger);
    min-height: 1.25rem;
    margin: 0;
}

.svc-login-form__submit {
    padding: 0.7rem 1.25rem;
    background: var(--svc-c-accent);
    color: #000;
    border: none;
    border-radius: var(--svc-radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--svc-ease);
}

.svc-login-form__submit:hover {
    filter: brightness(1.1);
}

.svc-login-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL CONNEXION UNIFIÉE
   ═══════════════════════════════════════════════════════════════════════════ */

.svc-modal--unified {
    width: 416px;
    max-width: 92vw;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    padding: 0 !important;
    overflow: hidden;
    border-radius: 42px !important;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.svc-modal-overlay.is-active .svc-modal--unified {
    transform: scale(1) translateY(0);
}

.svc-modal__header {
    background: #3a4548;
    padding: 21px 20px 24px;
    text-align: center;
    position: relative;
    flex: 0 0 auto;
}

.svc-modal__header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 16px;
    background: #fff;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.svc-modal__icon-wrap {
    display: inline-block;
    background: #ecb609;
    border-radius: 50%;
    padding: 16px;
    margin-bottom: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2), inset 0 -3px 10px rgba(0,0,0,0.15);
}

.svc-modal__icon-wrap img {
    display: block;
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25));
}

.svc-modal--unified .svc-modal__title {
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin: 0;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.svc-modal__body {
    padding: 8px 26px 20px;
    background: #fff;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.svc-modal__form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.svc-modal__field {
    margin-bottom: 0;
}

.svc-modal__field--password {
    position: relative;
}

.svc-modal__field--password input {
    padding-right: 48px;
}

.svc-modal__toggle-pwd {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    transition: color 0.2s ease;
    border-radius: 8px;
}

.svc-modal__toggle-pwd:hover {
    color: #6B7280;
    background: rgba(0,0,0,0.05);
}

.svc-modal__toggle-pwd:focus {
    outline: none;
    color: #ecb609;
}

.svc-modal__eye {
    width: 22px;
    height: 22px;
    display: none;
}

.svc-modal__eye--hidden {
    display: block;
}

.svc-modal__toggle-pwd.is-visible .svc-modal__eye--hidden {
    display: none;
}

.svc-modal__toggle-pwd.is-visible .svc-modal__eye--visible {
    display: block;
}

.svc-modal__field input {
    width: 100%;
    padding: 11px 13px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 16px; /* Évite le zoom automatique sur iOS */
    transition: all 0.2s ease;
    background: #F9FAFB;
}

.svc-modal__field input:focus {
    outline: none;
    border-color: #ecb609;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(236, 182, 9, 0.15);
}

.svc-modal__field input::placeholder {
    color: #9CA3AF;
}

.svc-modal__error {
    color: #DC2626;
    font-size: 0.75rem;
    text-align: center;
    margin: 0;
    min-height: 0;
}

.svc-modal__error:not(:empty) {
    margin: 5px 0;
}

.svc-modal__buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.svc-modal__btn {
    flex: 1;
    padding: 11px 13px;
    min-height: var(--svc-touch-min);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.svc-modal__btn--secondary {
    background: #F3F4F6;
    color: #374151;
    border-color: #9CA3AF;
}

.svc-modal__btn--secondary:hover {
    background: #E5E7EB;
    border-color: #6B7280;
}

.svc-modal__btn--primary {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: #fff;
    border-color: #15803D;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.svc-modal__btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.45);
}

.svc-modal__btn--primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.svc-modal--unified .svc-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(255,255,255,0.25);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.svc-modal--unified .svc-modal__close:hover {
    background: rgba(255,255,255,0.4);
    transform: rotate(90deg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PANEL ADMIN
   ═══════════════════════════════════════════════════════════════════════════ */

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #E5E7EB;
}

.admin-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-tab:hover {
    color: #374151;
    background: #F9FAFB;
}

.admin-tab.is-active {
    color: #ecb609;
    border-bottom-color: #ecb609;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.is-active {
    display: block;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-table thead {
    background: #F3F4F6;
}

.admin-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 14px 16px;
    border-top: 1px solid #E5E7EB;
    font-size: 0.9rem;
}

.admin-table tbody tr:hover {
    background: #F9FAFB;
}

.admin-table__detail {
    background: #FAFAFA !important;
}

.admin-table__detail td {
    padding: 10px 16px;
}

.admin-table--compact td {
    padding: 10px 16px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge--success {
    background: #D1FAE5;
    color: #065F46;
}

.badge--info {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge--warning {
    background: #FEF3C7;
    color: #92400E;
}

.status-icon {
    font-size: 1.2rem;
}

.status-icon--success {
    color: #10B981;
}

.status-icon--error {
    color: #EF4444;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.service-tag,
.user-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #F3F4F6;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #4B5563;
}

.service-tag {
    border-left: 3px solid #ecb609;
}

.user-tag {
    border-left: 3px solid #3B82F6;
}

.admin-category {
    margin-bottom: 30px;
}

.admin-category__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #E5E7EB;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat {
    background: linear-gradient(135deg, #ecb609 0%, #c9a008 100%);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 12px rgba(236, 182, 9, 0.3);
}

.admin-stat__value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.admin-stat__label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-json {
    background: #1F2937;
    color: #10B981;
    padding: 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.password-preview {
    background: #D1FAE5;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #065F46;
    display: inline-block;
}

.admin-note {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
    padding: 16px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.admin-note strong {
    color: #92400E;
}

.admin-note code {
    background: #FDE68A;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAVIGATION ACTIVE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Style de base neutre */
.nav-main__btn[data-view="outils-pro"] {
    background: transparent;
    color: inherit;
}

/* Style actif (page courante) - desktop */
.nav-main__btn[data-view="outils-pro"][aria-current="page"] {
    font-weight: 600;
    background: var(--brand-500);
    border-color: var(--brand-500);
    color: var(--white);
    box-shadow: 0 6px 16px rgba(236, 182, 9, 0.28);
}

/* Ancien style services (rétrocompatibilité) */
.nav-main__btn[data-view="services"] {
    font-weight: 600;
    background: var(--brand-500);
    border-color: var(--brand-500);
    color: var(--white);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablettes paysage (992px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 992px) {
    .header__actions {
        display: none !important;
    }

    .svc-main {
        margin-left: 0;
        width: 100%;
    }

    .svc-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .svc-sidebar {
        display: none;
    }

    .svc-sidebar__toggle {
        display: none;
    }

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

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablettes portrait (768px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Menu mobile - Style actif pour "Outils Pro" */
    .nav-main__btn[data-view="outils-pro"][aria-current="page"] {
        background: var(--brand-500);
        border-color: var(--brand-500);
        color: var(--white);
        box-shadow: 0 6px 16px rgba(236, 182, 9, 0.28);
    }

    .svc-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 1.25rem;
    }

    .svc-content {
        padding: 1.5rem;
    }

    .svc-login-btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
        right: 0.75rem;
    }

    .svc-status-group {
        right: 0.75rem;
        gap: 0.35rem;
    }

    .svc-status {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .svc-logout-btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .admin-tabs {
        flex-direction: column;
    }
    
    .admin-tab {
        text-align: left;
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .admin-tab.is-active {
        border-left-color: #ecb609;
        border-bottom-color: transparent;
    }
    
    .admin-table {
        font-size: 0.85rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobiles (576px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 576px) {
    :root {
        --svc-card-min-h: 220px;
        --svc-card-icon-size: 95px;
        --svc-card-img-size: 70px;
        --svc-tag-size: 95px;
    }

    .svc-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 1rem;
        padding-bottom: 30px;
    }

    .svc-card {
        padding: 0.5rem 0.75rem 2rem;
    }

    .svc-card__icon {
        border-radius: 22px;
    }

    .svc-card__rank {
        font-size: 0.8rem;
    }

    .svc-card__info {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .svc-card__name {
        font-size: 0.82rem;
    }

    .svc-card__desc {
        font-size: 0.68rem;
    }

    .svc-card__btn {
        font-size: 0.68rem;
        padding: 0.4rem 0.7rem;
    }

    .svc-card__tag {
        width: var(--svc-tag-size);
        bottom: calc(var(--svc-tag-size) * -0.15);
    }

    .svc-content {
        padding: 1rem;
    }

    .svc-page-title-wrap {
        padding: 1rem 1rem 0;
    }

    .svc-login-btn {
        font-size: 0.7rem;
        padding: 0.35rem 0.6rem;
    }

    .svc-logout-btn {
        display: none;
    }

    .svc-panel__title {
        font-size: 1.15rem;
    }

    .svc-panel__title-icon {
        width: 28px;
        height: 28px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobiles 480px (Limite haute mobiles)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    :root {
        --svc-card-min-h: 200px;
        --svc-card-icon-size: 85px;
        --svc-card-img-size: 62px;
        --svc-tag-size: 85px;
        --svc-mobile-nav-h: 52px;
    }

    .svc-mobile-nav {
        padding: 0.4rem 0.5rem 0.65rem;
        gap: 0.35rem;
    }

    .svc-mobile-nav__btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.15rem;
        border-radius: 6px;
    }

    .svc-cards-grid {
        gap: 2rem 0.75rem;
    }

    .svc-card {
        padding: 0.4rem 0.5rem 1.75rem;
        border-radius: 12px;
    }

    .svc-card__icon {
        border-radius: 18px;
    }

    .svc-card__rank {
        font-size: 0.7rem;
        top: 0.35rem;
        left: 0.4rem;
    }

    .svc-card__info {
        width: 26px;
        height: 26px;
        top: 0.25rem;
        right: 0.3rem;
        font-size: 0.8rem;
    }

    .svc-card__name {
        font-size: 0.75rem;
    }

    .svc-card__desc {
        font-size: 0.62rem;
    }

    .svc-card__btn {
        font-size: 0.62rem;
        padding: 0.35rem 0.6rem;
    }

    .svc-content {
        padding: 0.75rem;
    }

    .svc-page-title-wrap {
        padding: 0.75rem 0.75rem 0;
    }

    .svc-panel__title {
        font-size: 1.1rem;
        gap: 0.5rem;
    }

    .svc-panel__title-icon {
        width: 24px;
        height: 24px;
    }

    .svc-panel__count {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .svc-footer {
        padding: 0.75rem 1rem;
        font-size: 0.7rem;
    }

    /* Modale connexion */
    .svc-modal--unified {
        max-width: calc(100vw - 1rem);
        border-radius: 28px !important;
    }

    .svc-modal__header {
        padding: 16px 16px 20px;
    }

    .svc-modal__icon-wrap {
        padding: 12px;
    }

    .svc-modal__icon-wrap img {
        width: 56px;
        height: 56px;
    }

    .svc-modal--unified .svc-modal__title {
        font-size: 1.25rem;
    }

    .svc-modal__body {
        padding: 6px 20px 16px;
    }

    .svc-modal--unified .svc-modal__close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — iPhone 16 Pro Max (440px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 440px) {
    .svc-panel__header {
        margin-bottom: 1rem;
    }

    .svc-card__name {
        font-size: 0.72rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — iPhone 16/15/14 Pro (393px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 393px) {
    :root {
        --svc-card-min-h: 190px;
        --svc-card-icon-size: 78px;
        --svc-card-img-size: 56px;
        --svc-tag-size: 78px;
    }

    .svc-mobile-nav__btn {
        font-size: 0.65rem;
    }

    .svc-card__icon {
        border-radius: 16px;
    }

    .svc-card__name {
        font-size: 0.7rem;
    }

    .svc-card__desc {
        font-size: 0.58rem;
    }

    .svc-card__btn {
        font-size: 0.58rem;
        padding: 0.3rem 0.5rem;
    }

    .svc-panel__title {
        font-size: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — iPhone SE / Mini (375px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 375px) {
    :root {
        --svc-card-min-h: 180px;
        --svc-card-icon-size: 72px;
        --svc-card-img-size: 52px;
        --svc-tag-size: 72px;
    }

    .svc-cards-grid {
        gap: 1.75rem 0.5rem;
    }

    .svc-card {
        padding: 0.35rem 0.4rem 1.5rem;
        border-radius: 10px;
    }

    .svc-card__icon {
        border-radius: 14px;
        margin-bottom: 0.35rem;
    }

    .svc-card__info {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .svc-card__name {
        font-size: 0.65rem;
    }

    .svc-card__desc {
        font-size: 0.55rem;
    }

    .svc-card__btn {
        font-size: 0.55rem;
        padding: 0.25rem 0.45rem;
    }

    .svc-content {
        padding: 0.5rem;
    }

    .svc-panel__title {
        font-size: 0.95rem;
    }

    .svc-panel__title-icon {
        width: 22px;
        height: 22px;
    }

    /* Modale connexion */
    .svc-modal--unified {
        border-radius: 24px !important;
    }

    .svc-modal__header {
        padding: 14px 14px 18px;
    }

    .svc-modal__icon-wrap {
        padding: 10px;
    }

    .svc-modal__icon-wrap img {
        width: 48px;
        height: 48px;
    }

    .svc-modal--unified .svc-modal__title {
        font-size: 1.1rem;
    }

    .svc-modal__body {
        padding: 4px 16px 14px;
    }

    .svc-modal__field input {
        padding: 10px 12px;
    }

    .svc-modal__btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .svc-modal--unified .svc-modal__close {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Galaxy S24/A55, Xiaomi (360px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 360px) {
    :root {
        --svc-card-min-h: 170px;
        --svc-card-icon-size: 65px;
        --svc-card-img-size: 48px;
        --svc-tag-size: 65px;
    }

    .svc-mobile-nav__btn {
        font-size: 0.6rem;
        padding: 0.35rem 0.1rem;
    }

    .svc-cards-grid {
        gap: 1.5rem 0.4rem;
    }

    .svc-card {
        padding: 0.3rem 0.35rem 1.25rem;
    }

    .svc-card__icon {
        border-radius: 12px;
    }

    .svc-card__rank {
        font-size: 0.6rem;
    }

    .svc-card__info {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .svc-card__name {
        font-size: 0.6rem;
    }

    .svc-card__desc {
        display: none;
    }

    .svc-card__btn {
        font-size: 0.52rem;
        padding: 0.2rem 0.4rem;
    }

    .svc-panel__title {
        font-size: 0.9rem;
    }

    .svc-footer {
        padding: 0.5rem 0.75rem;
        font-size: 0.65rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Paysage mobile (max-height: 500px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-height: 500px) {
    .svc-modal--unified {
        max-height: calc(100dvh - 1rem);
        border-radius: 24px !important;
    }

    .svc-modal__header {
        padding: 12px 14px 16px;
    }

    .svc-modal__header::after {
        height: 10px;
    }

    .svc-modal__icon-wrap {
        padding: 8px;
        margin-bottom: 4px;
    }

    .svc-modal__icon-wrap img {
        width: 40px;
        height: 40px;
    }

    .svc-modal--unified .svc-modal__title {
        font-size: 1rem;
    }

    .svc-modal__body {
        padding: 2px 16px 12px;
    }

    .svc-modal__form {
        gap: 6px;
    }

    .svc-modal__field input {
        padding: 8px 10px;
    }

    .svc-modal__buttons {
        margin-top: 8px;
    }

    .svc-modal__btn {
        padding: 8px 10px;
        min-height: 44px;
    }

    .svc-modal--unified .svc-modal__close {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        font-size: 0.95rem;
    }

    .svc-info-modal__content {
        padding: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Paysage mobile très compact (max-height: 400px)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-height: 400px) {
    .svc-modal-base {
        align-items: flex-start;
        padding-top: 0.5rem;
    }

    .svc-modal--unified {
        max-height: calc(100dvh - 0.5rem);
        border-radius: 20px !important;
    }

    .svc-modal__header {
        padding: 10px 12px 14px;
    }

    .svc-modal__icon-wrap {
        padding: 6px;
    }

    .svc-modal__icon-wrap img {
        width: 32px;
        height: 32px;
    }

    .svc-modal--unified .svc-modal__title {
        font-size: 0.9rem;
    }

    .svc-modal__body {
        padding: 2px 14px 10px;
    }

    .svc-modal__field input {
        padding: 7px 9px;
    }

    .svc-modal__btn {
        padding: 7px 9px;
        min-height: 44px;
        font-size: 0.8rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITÉ
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .svc-app {
        opacity: 1 !important;
        animation: none !important;
    }
    body.page-enter .svc-app,
    body.page-exit .svc-app {
        animation: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN LOGS
   ═══════════════════════════════════════════════════════════════════════════ */

.logs-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.admin-table--logs {
    min-width: 800px;
}

.admin-table--logs th {
    padding: 8px 10px;
    font-size: 0.7rem;
}

.admin-table--logs td {
    vertical-align: middle;
    white-space: nowrap;
    padding: 6px 10px;
    font-size: 0.8rem;
}

.log-row {
    transition: background 0.15s;
}

.log-row:hover {
    background: #F9FAFB;
}

/* Ligne active */
.log-row--active {
    background: rgba(34, 197, 94, 0.08) !important;
}

.log-row--active td {
    border-top-color: rgba(34, 197, 94, 0.2);
}

/* Admin = orange */
.log-row--admin {
    border-left: 3px solid #F97316;
}

.log-row--admin .log-username {
    color: #EA580C;
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* Utilisateur = vert */
.log-row--user {
    border-left: 3px solid #22C55E;
}

.log-row--user .log-username {
    color: #16A34A;
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.device-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    background: #F3F4F6;
    border-radius: 4px;
    font-size: 0.7rem;
}

.browser-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #E5E7EB;
    color: #374151;
}

.browser-badge--chrome {
    background: #DEF7EC;
    color: #03543F;
}

.browser-badge--firefox {
    background: #FDF2F8;
    color: #9D174D;
}

.browser-badge--safari {
    background: #DBEAFE;
    color: #1E40AF;
}

.browser-badge--edge {
    background: #E0E7FF;
    color: #3730A3;
}

.browser-badge--opera {
    background: #FEE2E2;
    color: #991B1B;
}

.ip-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #1F2937;
    color: #10B981;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.65rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
}

.admin-logs-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid #E5E7EB;
    margin-top: 20px;
}

.btn-clear-logs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-clear-logs:hover {
    background: #FCA5A5;
    border-color: #F87171;
}

.btn-clear-logs:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-note-inline {
    font-size: 0.85rem;
    color: #6B7280;
    font-style: italic;
}

@media (max-width: 768px) {
    .admin-logs-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .admin-table--logs {
        font-size: 0.8rem;
    }
    
    .device-badge,
    .browser-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .ip-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN VISITS
   ═══════════════════════════════════════════════════════════════════════════ */

.visits-counters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.visits-counter {
    flex: 1;
    min-width: 120px;
    max-width: 180px;
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.visits-counter__value {
    font-size: 2rem;
    font-weight: 700;
    color: #ecb609;
    line-height: 1.2;
}

.visits-counter__label {
    font-size: 0.8rem;
    color: #9CA3AF;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.visits-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.admin-table--visits {
    min-width: 900px;
}

.admin-table--visits td {
    vertical-align: middle;
    white-space: nowrap;
}

.page-badge {
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 4px 10px;
    background: #EEF2FF;
    color: #4338CA;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.source-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #E5E7EB;
    color: #374151;
}

.source-badge--google {
    background: #DEF7EC;
    color: #03543F;
}

.source-badge--direct {
    background: #DBEAFE;
    color: #1E40AF;
}

.source-badge--interne {
    background: #FEF3C7;
    color: #92400E;
}

.source-badge--facebook {
    background: #DBEAFE;
    color: #1E40AF;
}

.source-badge--instagram {
    background: #FDF2F8;
    color: #9D174D;
}

.source-badge--linkedin {
    background: #E0E7FF;
    color: #3730A3;
}

.visit-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
}

.visit-status--connected {
    color: #059669;
}

.visit-status--visitor {
    color: #6B7280;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATISTIQUES ENRICHIES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sous-texte des compteurs (visiteurs uniques) */
.visits-counter__sub {
    font-size: 0.7rem;
    color: #6B7280;
    margin-top: 4px;
    font-weight: 400;
}

.visits-counter--peak {
    background: linear-gradient(135deg, #7C3AED 0%, #A855F7 100%);
}

.visits-counter--peak .visits-counter__value {
    color: #FDE68A;
}

/* Sections de statistiques */
.stats-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stats-section--compact {
    padding: 16px;
}

.stats-section__title {
    font-size: 1rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-section__title small {
    font-size: 0.75rem;
    font-weight: 400;
    color: #6B7280;
}

/* Grille pour les répartitions */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Barres de progression */
.stats-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stats-bar {
    display: grid;
    grid-template-columns: 100px 1fr 80px;
    align-items: center;
    gap: 12px;
}

.stats-bar__label {
    font-size: 0.85rem;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-bar__track {
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.stats-bar__fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.stats-bar__fill--device {
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
}

.stats-bar__fill--source {
    background: linear-gradient(90deg, #10B981, #34D399);
}

.stats-bar__fill--browser {
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.stats-bar__value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1F2937;
    text-align: right;
}

.stats-bar__value small {
    font-weight: 400;
    color: #6B7280;
}

/* Graphique d'évolution 7 jours */
.stats-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 120px;
    gap: 8px;
    padding: 10px 0;
}

.stats-chart__bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}

.stats-chart__fill {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(180deg, #ecb609 0%, #F59E0B 100%);
    border-radius: 4px 4px 0 0;
    margin-top: auto;
    min-height: 4px;
    transition: height 0.3s ease;
}

/* Variante pour graphique 3 mois (courbe SVG) */
.stats-curve {
    display: flex;
    gap: 12px;
    height: 160px;
}

.stats-curve__y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.7rem;
    color: #9CA3AF;
    padding: 5px 0;
    min-width: 35px;
}

.stats-curve__chart {
    flex: 1;
    position: relative;
    min-width: 0;
}

.stats-curve__svg {
    width: 100%;
    height: calc(100% - 24px);
    display: block;
}

.stats-curve__grid {
    stroke: #E5E7EB;
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.stats-curve__area {
    fill: url(#curveGradient);
}

.stats-curve__line {
    fill: none;
    stroke: #8B5CF6;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stats-curve__point {
    fill: #F97316;
    stroke: #fff;
    stroke-width: 2;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, r 0.15s;
}

.stats-curve__svg:hover .stats-curve__point {
    opacity: 1;
}

.stats-curve__point:hover {
    r: 6;
    fill: #EA580C;
}

.stats-curve__tooltip {
    position: absolute;
    background: #1F2937;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stats-curve__tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1F2937;
}

.stats-curve__tooltip.is-visible {
    opacity: 1;
}

.stats-curve__x-axis {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    display: flex;
    font-size: 0.7rem;
    color: #6B7280;
}

.stats-curve__x-axis span {
    position: absolute;
    transform: translateX(-50%);
}

.stats-chart__value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 4px;
}

.stats-chart__label {
    font-size: 0.7rem;
    color: #6B7280;
    text-transform: uppercase;
    margin-top: 8px;
}

/* Distribution horaire */
.stats-hours {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 80px;
    gap: 2px;
    padding: 10px 0;
}

.stats-hour {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.stats-hour__bar {
    width: 100%;
    background: #D1D5DB;
    border-radius: 2px 2px 0 0;
    margin-top: auto;
    min-height: 2px;
    transition: height 0.3s ease;
}

.stats-hour--peak .stats-hour__bar {
    background: linear-gradient(180deg, #EF4444, #F87171);
}

.stats-hour__label {
    font-size: 0.6rem;
    color: #9CA3AF;
    margin-top: 4px;
}

.stats-hour--peak .stats-hour__label {
    color: #EF4444;
    font-weight: 600;
}

/* Table Top 10 */
.stats-table-wrapper {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.stats-table th,
.stats-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.stats-table th {
    background: #F9FAFB;
    font-weight: 600;
    color: #374151;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-table tbody tr:hover {
    background: #F9FAFB;
}

.stats-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #E5E7EB;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
}

.stats-table tbody tr:nth-child(1) .stats-rank {
    background: #FEF3C7;
    color: #B45309;
}

.stats-table tbody tr:nth-child(2) .stats-rank {
    background: #E5E7EB;
    color: #4B5563;
}

.stats-table tbody tr:nth-child(3) .stats-rank {
    background: #FED7AA;
    color: #C2410C;
}

/* Details/Summary pour le tableau */
.stats-details {
    margin-top: 20px;
}

.stats-details__summary {
    cursor: pointer;
    padding: 12px 16px;
    background: #F3F4F6;
    border-radius: 8px;
    font-weight: 500;
    color: #374151;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.stats-details__summary::-webkit-details-marker {
    display: none;
}

.stats-details__summary::before {
    content: '▶';
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.stats-details[open] .stats-details__summary::before {
    transform: rotate(90deg);
}

.stats-details__summary:hover {
    background: #E5E7EB;
}

.stats-details[open] .stats-details__summary {
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.stats-details .visits-table-wrapper {
    border: 1px solid #E5E7EB;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .visits-counters {
        gap: 10px;
    }
    
    .visits-counter {
        min-width: 70px;
        padding: 14px 10px;
    }
    
    .visits-counter__value {
        font-size: 1.5rem;
    }
    
    .visits-counter__label {
        font-size: 0.65rem;
    }
    
    .visits-counter__sub {
        font-size: 0.6rem;
    }
    
    .admin-table--visits {
        font-size: 0.8rem;
    }
    
    .page-badge {
        max-width: 120px;
        font-size: 0.7rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-bar {
        grid-template-columns: 80px 1fr 60px;
        gap: 8px;
    }
    
    .stats-bar__label {
        font-size: 0.75rem;
    }
    
    .stats-bar__value {
        font-size: 0.75rem;
    }
    
    .stats-chart {
        height: 100px;
    }
    
    .stats-curve {
        height: 140px;
    }
    
    .stats-curve__y-axis {
        font-size: 0.6rem;
        min-width: 28px;
    }
    
    .stats-curve__x-axis {
        font-size: 0.6rem;
    }
    
    .stats-hours {
        height: 60px;
    }
    
    .stats-hour__label {
        display: none;
    }
    
    .stats-hour:nth-child(4n+1) .stats-hour__label {
        display: block;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITAIRES — Classes de remplacement des styles inline
   ═══════════════════════════════════════════════════════════════════════════ */

/* Formulaire de déconnexion inline */
.svc-logout-form {
    display: inline;
}

/* Emoji de titre de panel admin */
.svc-panel__title-emoji {
    font-size: 32px;
    line-height: 1;
}

/* Note admin avec espacement vertical */
.admin-note--spaced {
    margin: 20px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD - Nouveau tableau de bord v7.0.0
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sections du dashboard */
.dashboard-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.dashboard-section--muted {
    background: #F9FAFB;
}

.dashboard-section__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.kpi-grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

.kpi-card {
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.kpi-card--primary {
    background: linear-gradient(135deg, #7C3AED 0%, #A855F7 100%);
}

.kpi-card--accent {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
}

.kpi-card--warning {
    background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
}

.kpi-card--small {
    padding: 16px 12px;
}

.kpi-card__icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.kpi-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: #ecb609;
    line-height: 1.2;
}

.kpi-card--primary .kpi-card__value,
.kpi-card--accent .kpi-card__value {
    color: #fff;
}

.kpi-card--small .kpi-card__value {
    font-size: 1.5rem;
}

.kpi-card__label {
    font-size: 0.8rem;
    color: #9CA3AF;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-card__sub {
    font-size: 0.7rem;
    color: #6B7280;
    margin-top: 6px;
}

/* Stats Row (deux colonnes) */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Stats Mini (petites barres) */
.stats-mini {
    background: #F9FAFB;
    border-radius: 12px;
    padding: 16px;
}

.stats-mini--wide {
    grid-column: span 2;
}

.stats-mini__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-mini__bar {
    display: grid;
    grid-template-columns: 70px 1fr 45px;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.stats-mini__bar--peak .stats-mini__label {
    font-weight: 600;
    color: #7C3AED;
}

.stats-mini__label {
    font-size: 0.75rem;
    color: #6B7280;
}

.stats-mini__track {
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
}

.stats-mini__fill {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
    border-radius: 3px;
    transition: width 0.3s;
}

.stats-mini__fill--alt {
    background: linear-gradient(90deg, #10B981, #34D399);
}

.stats-mini__value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    text-align: right;
}

/* Profile Grid */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.profile-card {
    background: #F9FAFB;
    border-radius: 12px;
    padding: 16px;
}

.profile-card__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
}

.profile-bar {
    display: grid;
    grid-template-columns: 90px 1fr 40px;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.profile-bar__label {
    font-size: 0.75rem;
    color: #4B5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-bar__track {
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
}

.profile-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
    border-radius: 3px;
}

.profile-bar__fill--os { background: linear-gradient(90deg, #8B5CF6, #A855F7); }
.profile-bar__fill--browser { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.profile-bar__fill--lang { background: linear-gradient(90deg, #10B981, #34D399); }
.profile-bar__fill--screen { background: linear-gradient(90deg, #EC4899, #F472B6); }
.profile-bar__fill--pref { background: linear-gradient(90deg, #6366F1, #818CF8); }
.profile-bar__fill--source { background: linear-gradient(90deg, #14B8A6, #2DD4BF); }

.profile-bar__value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    text-align: right;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.content-card {
    background: #F9FAFB;
    border-radius: 12px;
    padding: 16px;
}

.content-card--large {
    padding: 20px;
}

.content-card__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
}

.content-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.content-table th,
.content-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.content-table th {
    background: #fff;
    font-weight: 600;
    color: #6B7280;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #E5E7EB;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 600;
}

.rank-badge--1 { background: #FEF3C7; color: #B45309; }
.rank-badge--2 { background: #E5E7EB; color: #4B5563; }
.rank-badge--3 { background: #FED7AA; color: #C2410C; }

.entry-page {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #E5E7EB;
}

.entry-page__count {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}

.page-badge--small {
    font-size: 0.7rem;
    padding: 2px 6px;
    max-width: 150px;
}

/* Bots */
.bots-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bot-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #E5E7EB;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #4B5563;
}

.bot-badge small {
    color: #9CA3AF;
}

/* Badge générique */
.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #E5E7EB;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #4B5563;
}

.badge--accent {
    background: #7C3AED;
    color: #fff;
}

/* Dashboard details (accordion) */
.dashboard-details {
    margin-top: 24px;
}

.dashboard-details__summary {
    cursor: pointer;
    padding: 14px 18px;
    background: #F3F4F6;
    border-radius: 10px;
    font-weight: 500;
    color: #374151;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-details__summary::-webkit-details-marker { display: none; }

.dashboard-details__summary::before {
    content: '▶';
    font-size: 0.65rem;
    transition: transform 0.2s;
}

.dashboard-details[open] .dashboard-details__summary::before {
    transform: rotate(90deg);
}

.dashboard-details[open] .dashboard-details__summary {
    border-radius: 10px 10px 0 0;
}

.dashboard-details .visits-table-wrapper {
    border: 1px solid #E5E7EB;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

/* Stats chart container */
.stats-chart-container {
    margin-bottom: 20px;
}

.stats-chart__title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6B7280;
    margin: 0 0 10px 0;
}

.stats-chart__title small {
    font-weight: 400;
    color: #9CA3AF;
}

/* Responsive dashboard */
@media (max-width: 768px) {
    .dashboard-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .kpi-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kpi-card {
        padding: 14px 10px;
    }
    
    .kpi-card__value {
        font-size: 1.5rem;
    }
    
    .kpi-card--small .kpi-card__value {
        font-size: 1.25rem;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .stats-mini--wide {
        grid-column: span 1;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-bar {
        grid-template-columns: 80px 1fr 35px;
    }
    
    .stats-mini__bar {
        grid-template-columns: 60px 1fr 40px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COURBES - Grille des 5 courbes d'évolution
   ═══════════════════════════════════════════════════════════════════════════ */

.dashboard-section__subtitle {
    font-size: 0.85rem;
    color: #6B7280;
    margin: -12px 0 20px 0;
}

/* Grille des courbes */
.curves-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.curve-card {
    background: #F9FAFB;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #E5E7EB;
}

.curve-card--full {
    grid-column: 1 / -1;
}

.curve-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.curve-card__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.curve-card__total {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6B7280;
    background: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #E5E7EB;
}

.curve-card__total small {
    font-weight: 400;
    color: #9CA3AF;
}

/* Courbe compacte */
.stats-curve--compact {
    height: 120px;
}

.stats-curve--compact .stats-curve__y-axis {
    justify-content: space-between;
}

.stats-curve--compact .stats-curve__y-axis span:nth-child(2) {
    display: none;
}

/* Couleurs des courbes */
.stats-curve__line--blue { stroke: #3B82F6; }
.stats-curve__line--green { stroke: #10B981; }
.stats-curve__line--orange { stroke: #F59E0B; }
.stats-curve__line--purple { stroke: #8B5CF6; }
.stats-curve__line--pink { stroke: #EC4899; }

/* Points au survol - couleurs assorties */
.stats-curve__svg[data-curve="7d"] .stats-curve__point { fill: #3B82F6; }
.stats-curve__svg[data-curve="15d"] .stats-curve__point { fill: #10B981; }
.stats-curve__svg[data-curve="30d"] .stats-curve__point { fill: #F59E0B; }
.stats-curve__svg[data-curve="90d"] .stats-curve__point { fill: #8B5CF6; }
.stats-curve__svg[data-curve="2y"] .stats-curve__point { fill: #EC4899; }

/* Tooltip générique pour toutes les courbes */
.curve-tooltip {
    position: absolute;
    background: #1F2937;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.curve-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1F2937;
}

.curve-tooltip.is-visible {
    opacity: 1;
}

/* Responsive - Courbes */
@media (max-width: 900px) {
    .curves-grid {
        grid-template-columns: 1fr;
    }
    
    .curve-card--full {
        grid-column: 1;
    }
}

@media (max-width: 600px) {
    .curve-card {
        padding: 12px;
    }
    
    .curve-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .stats-curve--compact {
        height: 100px;
    }
}
