/* ============================================================
   LBAC Link — direction Productivité (Notion/Linear style)
   Charte graphique officielle LBAC (Big Studio)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@600;700&display=swap');

:root {
    /* Palette officielle (conversion CMJN -> RGB) */
    --bleu-roy:       #07275E;  /* couleur principale */
    --bleu-roy-soft:  #0a3373;  /* hover/active subtle */
    --indigo:         #0DB8DE;  /* accent cyan */
    --ruby:           #B5000A;  /* alertes/erreurs */

    /* Neutres */
    --blanc:          #ffffff;
    --gris-0:         #fbfcfd;  /* fond sidebar très clair */
    --gris-1:         #f4f6f9;  /* fond très clair */
    --gris-2:         #e7eaf0;  /* borders */
    --gris-3:         #c9cfdb;  /* borders accentuées */
    --gris-4:         #8a93a3;  /* texte secondaire */
    --gris-5:         #5b6577;  /* texte gris foncé */
    --gris-6:         #2d3441;  /* texte body */

    /* Ombres très douces */
    --shadow-xs:  0 1px 2px rgba(7, 39, 94, 0.04);
    --shadow-sm:  0 1px 3px rgba(7, 39, 94, 0.06), 0 1px 2px rgba(7, 39, 94, 0.04);
    --shadow-md:  0 4px 12px rgba(7, 39, 94, 0.08);

    /* Typographie */
    --font-body:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-title: 'Montserrat', 'Inter', sans-serif;

    /* Géométrie */
    --sidebar-w: 260px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--gris-6);
    background: var(--blanc);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   Bandeau « mode LOCAL » — visible quand on bosse sur 127.0.0.1
   Discret mais reconnaissable (ambre tamisé). Cf. config.is_prod.
   ============================================================ */
.local-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
    color: #78350f;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 1px solid #fcd34d;
    letter-spacing: 0.02em;
}
.local-banner strong {
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #92400e;
}
.local-banner-sep { color: #b45309; opacity: 0.5; }
.local-banner-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
    animation: local-banner-pulse 2s ease-in-out infinite;
}
@keyframes local-banner-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25); }
    50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.1); }
}
/* Décalage du contenu pour ne pas être masqué par le bandeau fixe */
body:has(.local-banner) {
    padding-top: 26px;
}

/* ============================================================
   Widget feedback flottant — bouton bulle en bas à droite
   Style doux et discret, sans casser la mise en page.
   ============================================================ */
#fb-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9000;
    font-family: var(--font-body);
}
#fb-trigger {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(7, 39, 94, 0.08);
    background: white;
    color: var(--bleu-roy);
    box-shadow: 0 4px 12px rgba(7, 39, 94, 0.12), 0 1px 3px rgba(7, 39, 94, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#fb-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(7, 39, 94, 0.16), 0 2px 4px rgba(7, 39, 94, 0.1);
    background: var(--gris-1);
}
#fb-trigger:active { transform: translateY(0); }

#fb-popover {
    position: absolute;
    right: 0;
    bottom: 60px;
    width: 340px;
    background: white;
    border: 1px solid var(--gris-2);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(7, 39, 94, 0.15), 0 4px 8px rgba(7, 39, 94, 0.08);
    padding: 18px;
    animation: fb-pop-in 0.18s ease;
}
@keyframes fb-pop-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
#fb-popover header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
#fb-popover h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gris-7);
    margin: 0;
}
#fb-close {
    background: none;
    border: none;
    color: var(--gris-4);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
#fb-close:hover { color: var(--gris-6); }
.fb-help {
    font-size: 12px;
    color: var(--gris-5);
    margin: 4px 0 10px 0;
    line-height: 1.4;
}
#fb-message {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid var(--gris-2);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    color: var(--gris-7);
    resize: vertical;
    min-height: 80px;
}
#fb-message:focus {
    outline: none;
    border-color: var(--bleu-roy);
    box-shadow: 0 0 0 2px rgba(7, 39, 94, 0.08);
}
.fb-actions-img {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.fb-btn-sec {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--gris-1);
    border: 1px solid var(--gris-2);
    border-radius: 6px;
    font-size: 12px;
    color: var(--gris-6);
    cursor: pointer;
    transition: background 0.1s;
}
.fb-btn-sec:hover { background: var(--gris-2); }
#fb-preview {
    position: relative;
    margin-top: 10px;
    border: 1px solid var(--gris-2);
    border-radius: 6px;
    overflow: hidden;
    max-height: 140px;
}
#fb-preview img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 140px;
    object-fit: cover;
}
#fb-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.fb-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    gap: 8px;
}
#fb-status {
    font-size: 11px;
    color: var(--gris-5);
}
#fb-status[data-kind="error"] { color: var(--rouge-alerte, #dc2626); }
.fb-btn-primary {
    padding: 7px 16px;
    background: var(--bleu-roy);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.1s;
}
.fb-btn-primary:hover { background: #0a3270; }

#fb-toast {
    position: fixed;
    bottom: 90px;
    right: 24px;
    background: #15803d;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    z-index: 9999;
    animation: fb-toast-in 0.2s ease;
}
@keyframes fb-toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   Page admin /admin/feedbacks
   ============================================================ */
.filter-chip {
    display: inline-block;
    padding: 5px 12px;
    background: var(--gris-1);
    border: 1px solid var(--gris-2);
    border-radius: 16px;
    font-size: 12px;
    color: var(--gris-6);
    text-decoration: none;
    transition: background 0.1s;
}
.filter-chip:hover { background: var(--gris-2); }
.filter-chip.active {
    background: var(--bleu-roy);
    color: white;
    border-color: var(--bleu-roy);
}
.feedbacks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.feedback-item {
    background: white;
    border: 1px solid var(--gris-2);
    border-radius: 8px;
    padding: 14px 16px;
    border-left: 3px solid var(--gris-3);
}
.feedback-item.feedback-status-nouveau { border-left-color: #f59e0b; }
.feedback-item.feedback-status-en_cours { border-left-color: var(--bleu-roy); }
.feedback-item.feedback-status-fait { border-left-color: #15803d; }
.feedback-item.feedback-status-rejete { border-left-color: var(--gris-3); opacity: 0.65; }
.feedback-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}
.feedback-meta {
    font-size: 12px;
    color: var(--gris-5);
}
.feedback-author { font-weight: 600; color: var(--gris-7); }
.feedback-email { color: var(--gris-4); }
.feedback-sep { margin: 0 4px; opacity: 0.5; }
.feedback-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.feedback-status-badge-nouveau { background: #fef3c7; color: #92400e; }
.feedback-status-badge-en_cours { background: #dbeafe; color: #1e40af; }
.feedback-status-badge-fait { background: #d1fae5; color: #065f46; }
.feedback-status-badge-rejete { background: var(--gris-2); color: var(--gris-5); }
.feedback-message {
    font-size: 14px;
    color: var(--gris-7);
    line-height: 1.5;
    margin-bottom: 8px;
    white-space: pre-wrap;
}
.feedback-page {
    font-size: 11px;
    color: var(--gris-5);
    margin-bottom: 8px;
}
.feedback-page a { color: var(--bleu-roy); text-decoration: none; }
.feedback-page a:hover { text-decoration: underline; }
.feedback-screenshot {
    margin-top: 8px;
    margin-bottom: 8px;
}
.feedback-screenshot summary {
    cursor: pointer;
    color: var(--gris-6);
    font-size: 12px;
    padding: 4px 0;
}
.feedback-screenshot img {
    max-width: 100%;
    border: 1px solid var(--gris-2);
    border-radius: 6px;
    margin-top: 8px;
}
.feedback-note {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #78350f;
    margin-top: 8px;
}
.feedback-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--gris-1);
    padding-top: 10px;
}
.feedback-btn-status {
    padding: 4px 10px;
    font-size: 11px;
    border: 1px solid var(--gris-2);
    border-radius: 5px;
    background: var(--gris-1);
    color: var(--gris-6);
    cursor: pointer;
    transition: background 0.1s;
}
.feedback-btn-status:hover { background: var(--gris-2); }
.feedback-btn-en_cours:hover { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.feedback-btn-fait:hover { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.feedback-btn-rejete:hover { background: var(--gris-2); color: var(--gris-7); }
.feedback-note-edit summary {
    cursor: pointer;
    font-size: 11px;
    color: var(--gris-5);
    padding: 4px 0;
}
.feedback-note-edit textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    border: 1px solid var(--gris-2);
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    margin-top: 6px;
    margin-bottom: 6px;
    min-height: 50px;
    resize: vertical;
}

/* ============================================================
   LAYOUT — pages connectées (sidebar + content)
   ============================================================ */
.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--gris-0);
    border-right: 1px solid var(--gris-2);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.content {
    flex: 1;
    min-width: 0;
    padding: 3rem 4rem;
    background: var(--blanc);
}

/* ============================================================
   SIDEBAR — branding
   ============================================================ */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.5rem;
    text-decoration: none;
    margin-bottom: 2rem;
}
.sidebar-brand img {
    height: 32px;
    width: auto;
    display: block;
}
.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    border-left: 1.5px solid var(--gris-2);
    padding-left: 0.85rem;
}
.sidebar-brand-link {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--bleu-roy);
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.sidebar-brand-sub {
    color: var(--gris-4);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    margin-top: 0.35rem;
    text-transform: uppercase;
}

/* ============================================================
   SIDEBAR — nav
   ============================================================ */
.nav-section-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--gris-4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 1.25rem 0.65rem 0.5rem 0.65rem;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-sm);
    color: var(--gris-5);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.nav-item:hover {
    background: rgba(7, 39, 94, 0.05);
    color: var(--bleu-roy);
}
.nav-item.active {
    background: rgba(7, 39, 94, 0.08);
    color: var(--bleu-roy);
    font-weight: 600;
}
.nav-item.disabled {
    color: var(--gris-3);
    cursor: not-allowed;
    pointer-events: none;
}
.nav-item .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================================
   SIDEBAR — footer (user)
   ============================================================ */
.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--gris-2);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.65rem;
}
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bleu-roy);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    overflow: hidden;
}
.user-name {
    font-weight: 600;
    color: var(--gris-6);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role {
    font-size: 0.7rem;
    color: var(--gris-4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.65rem;
    margin-top: 0.35rem;
    border-radius: var(--radius-sm);
    color: var(--gris-4);
    font-size: 0.85rem;
    transition: background 0.12s, color 0.12s;
}
.sidebar-logout:hover {
    background: rgba(181, 0, 10, 0.05);
    color: var(--ruby);
}
.sidebar-logout .icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================================
   CONTENT — header zone
   ============================================================ */
.content-header {
    margin-bottom: 3rem;
}
.content-greeting {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--bleu-roy);
    font-size: 1.875rem;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.content-date {
    color: var(--gris-4);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}
.content-intro {
    color: var(--gris-5);
    font-size: 0.95rem;
    margin-top: 0.5rem;
    line-height: 1.6;
    max-width: 720px;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    margin-bottom: 3rem;
}
.section-title {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--bleu-roy);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 1.25rem 0;
}

/* ============================================================
   MODULE CARDS
   ============================================================ */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.module {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--blanc);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-md);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.module:hover {
    border-color: var(--bleu-roy);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.module.disabled {
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.7;
}
.module-icon {
    width: 40px;
    height: 40px;
    background: rgba(7, 39, 94, 0.06);
    color: var(--bleu-roy);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.module-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.module-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--gris-6);
    margin: 0 0 0.4rem 0;
}
.module-description {
    color: var(--gris-5);
    font-size: 0.88rem;
    margin: 0 0 1.25rem 0;
    line-height: 1.45;
    flex: 1;
}
.module-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--gris-2);
}
.module-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gris-4);
}
.module-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.module-status.soon {
    color: var(--indigo);
}
.module-status.active {
    color: #0ea975;
}
.module-arrow {
    color: var(--gris-3);
    transition: color 0.15s, transform 0.15s;
}
.module:hover .module-arrow {
    color: var(--bleu-roy);
    transform: translateX(2px);
}
.module-arrow svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================================
   PAGE LOGIN (sans sidebar)
   ============================================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gris-1);
    padding: 2rem;
}
.auth-card {
    background: var(--blanc);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
    text-align: center;
}
.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}
.auth-brand img {
    height: 36px;
    width: auto;
    margin-bottom: 0.85rem;
}
.auth-brand-link {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--bleu-roy);
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gris-6);
    margin: 0 0 0.5rem 0;
}
.auth-subtitle {
    color: var(--gris-4);
    margin: 0 0 2rem 0;
    font-size: 0.92rem;
}
.btn-primary {
    background: var(--bleu-roy);
    color: var(--blanc);
    border: none;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s, transform 0.1s;
    font-family: var(--font-body);
}
.btn-primary:hover {
    background: var(--bleu-roy-soft);
}
.btn-primary:active {
    transform: scale(0.99);
}
.auth-note {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--gris-1);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--gris-5);
    text-align: left;
    line-height: 1.5;
    border-left: 2px solid var(--indigo);
}
.auth-note strong { color: var(--gris-6); }
.auth-note code {
    background: var(--gris-2);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--bleu-roy);
}

/* Magic link : formulaire email + page de confirmation */
.auth-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gris-6);
    margin-bottom: 0.5rem;
}
.auth-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--gris-3);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--gris-7);
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-form-input:focus {
    outline: none;
    border-color: var(--bleu-roy);
    box-shadow: 0 0 0 3px rgba(7, 39, 94, 0.1);
}
.auth-confirmation {
    text-align: center;
    padding: 1rem 0;
}
.auth-confirmation-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}
.auth-confirmation-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gris-7);
    margin-bottom: 0.75rem;
}
.auth-confirmation-text {
    color: var(--gris-6);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}
.auth-confirmation-help {
    color: var(--gris-5);
    font-size: 0.85rem;
    line-height: 1.5;
}
.auth-link {
    color: var(--bleu-roy);
    text-decoration: none;
    font-size: 0.9rem;
}
.auth-link:hover {
    text-decoration: underline;
}

/* ============================================================
   STEPPER (frise horizontale d'étapes)
   ============================================================ */
.ago-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 2rem 0 2.5rem 0;
    width: 100%;
}
.ago-stepper .step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.ago-stepper .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gris-2);
    color: var(--gris-4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-title);
    transition: background 0.15s, color 0.15s;
}
.ago-stepper .step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gris-4);
    transition: color 0.15s;
}
.ago-stepper .step-bar {
    flex: 1;
    height: 1px;
    background: var(--gris-2);
    margin: 0 1rem;
    transition: background 0.15s;
}
.ago-stepper .step.active .step-num {
    background: var(--bleu-roy);
    color: var(--blanc);
    box-shadow: 0 0 0 4px rgba(7, 39, 94, 0.10);
}
.ago-stepper .step.active .step-label {
    color: var(--bleu-roy);
    font-weight: 600;
}
.ago-stepper .step.done .step-num {
    background: var(--indigo);
    color: var(--blanc);
}
.ago-stepper .step.done .step-label {
    color: var(--gris-5);
}
.ago-stepper .step.done + .step-bar {
    background: var(--indigo);
}

/* ============================================================
   BREADCRUMB (au-dessus du titre de page)
   ============================================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gris-4);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.breadcrumb a {
    color: var(--gris-4);
    transition: color 0.12s;
}
.breadcrumb a:hover {
    color: var(--bleu-roy);
}
.breadcrumb .bc-current {
    color: var(--bleu-roy);
}
.breadcrumb .bc-sep {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    opacity: 0.5;
}

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-form { margin: 0; }

.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 2rem;
    border: 2px dashed var(--gris-3);
    border-radius: var(--radius-md);
    background: var(--gris-0);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    text-align: center;
}
.upload-zone:hover {
    border-color: var(--bleu-roy);
    background: rgba(7, 39, 94, 0.02);
}
.upload-icon {
    width: 42px;
    height: 42px;
    stroke: var(--bleu-roy);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.7;
}
.upload-zone:hover .upload-icon {
    opacity: 1;
}
.upload-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.upload-text strong {
    color: var(--gris-6);
    font-weight: 600;
    font-size: 1rem;
}
.upload-text span {
    color: var(--gris-4);
    font-size: 0.85rem;
}

/* ============================================================
   UPLOADS LIST (pièces détectées)
   ============================================================ */
.uploads-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.upload-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: var(--blanc);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-sm);
    transition: border-color 0.12s, box-shadow 0.12s;
}
.upload-item:hover {
    border-color: var(--gris-3);
}
.upload-item-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(7, 39, 94, 0.06);
    color: var(--bleu-roy);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.upload-item-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}
.upload-item-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}
.upload-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gris-6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.upload-item-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.upload-item-type {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: rgba(7, 39, 94, 0.08);
    color: var(--bleu-roy);
}
.upload-item-fiche .upload-item-type   { background: rgba(13, 184, 222, 0.12); color: #086e85; }
.upload-item-inpi .upload-item-type    { background: rgba(7, 39, 94, 0.10);    color: var(--bleu-roy); }
.upload-item-comptes .upload-item-type { background: rgba(135, 90, 0, 0.10);    color: #6b4500; }
.upload-item-ago_n1 .upload-item-type  { background: rgba(94, 0, 120, 0.10);    color: #5a0070; }
.upload-item-\? .upload-item-type      { background: var(--gris-2);             color: var(--gris-5); }
.upload-item-size {
    font-size: 0.72rem;
    color: var(--gris-4);
}
.upload-item-remove {
    margin: 0;
}
.upload-item-remove button {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--gris-4);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s;
}
.upload-item-remove button:hover {
    background: rgba(181, 0, 10, 0.10);
    color: var(--ruby);
}
.upload-item-remove svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

/* ============================================================
   ACTIONS BAR (bouton primaire + secondaire en bas de section)
   ============================================================ */
.actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}
.btn-secondary {
    background: var(--blanc);
    color: var(--gris-5);
    border: 1px solid var(--gris-3);
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: border-color 0.12s, color 0.12s, background 0.12s;
    font-family: var(--font-body);
}
.btn-secondary:hover {
    border-color: var(--bleu-roy);
    color: var(--bleu-roy);
}
.btn-primary-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bleu-roy);
    color: var(--blanc);
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s;
    font-family: var(--font-body);
}
.btn-primary-inline:hover {
    background: var(--bleu-roy-soft);
}
.btn-primary-inline svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.empty-hint {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--gris-1);
    border-left: 3px solid var(--indigo);
    border-radius: var(--radius-sm);
    color: var(--gris-5);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ============================================================
   SECTION TITLE ROW (titre + tag à droite)
   ============================================================ */
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.source-tag {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gris-4);
    background: var(--gris-1);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

/* ============================================================
   SOURCES GRID (étape 2 — sources analysées)
   ============================================================ */
.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}
.source-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--blanc);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-sm);
    gap: 1rem;
}
.source-key {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gris-5);
    flex-shrink: 0;
}
.source-val {
    font-size: 0.82rem;
    color: var(--gris-6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    min-width: 0;
}
.source-val.ok       { color: #0ea975; font-weight: 500; }
.source-val.missing  { color: var(--ruby); font-style: italic; opacity: 0.85; }
.source-val.neutral  { color: var(--gris-4); font-style: italic; }

/* ============================================================
   DATA GRID (étape 2 — fiches lecture seule)
   ============================================================ */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem 1.5rem;
    padding: 1.5rem;
    background: var(--blanc);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-md);
}
.data-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}
.data-field-wide { grid-column: 1 / -1; }
.data-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gris-4);
}
.data-value {
    font-size: 0.95rem;
    color: var(--gris-6);
    font-weight: 500;
    line-height: 1.45;
}

/* ============================================================
   PEOPLE LIST (mandataires, associés)
   ============================================================ */
.people-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}
.person-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    background: var(--blanc);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-sm);
}
.person-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bleu-roy);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
}
.person-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.person-name {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--gris-6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.person-role {
    font-size: 0.78rem;
    color: var(--gris-4);
}

/* Bouton désactivé */
.btn-primary-inline:disabled {
    background: var(--gris-2);
    color: var(--gris-4);
    cursor: not-allowed;
}

/* ============================================================
   ALERTE (erreur, info, etc.)
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.alert-error {
    background: rgba(181, 0, 10, 0.06);
    border-left: 3px solid var(--ruby);
    color: var(--gris-6);
}
.alert-error strong { color: var(--ruby); }
.alert-success {
    background: rgba(14, 169, 117, 0.08);
    border-left: 3px solid #0ea975;
    color: var(--gris-6);
}
.alert-success strong { color: #0a7a55; }

/* ============================================================
   FORMS ÉDITABLES (étape 2)
   ============================================================ */
.ago-form { display: block; }

/* === Table des matières sticky en haut === */
.form-toc {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    margin: 0 -1rem 2rem -1rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--gris-2);
    overflow-x: auto;
    scrollbar-width: thin;
}
.toc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gris-5);
    background: var(--gris-1);
    transition: background 0.15s, color 0.15s, transform 0.12s;
    white-space: nowrap;
    text-decoration: none;
}
.toc-link:hover {
    background: var(--gris-2);
    color: var(--gris-6);
}
.toc-link.active {
    background: var(--bleu-roy);
    color: var(--blanc);
    box-shadow: 0 1px 4px rgba(7, 39, 94, 0.18);
}
.toc-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.10);
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-title);
    flex-shrink: 0;
}
.toc-link.active .toc-num {
    background: rgba(255, 255, 255, 0.25);
}

/* === Titres de section bien visibles === */
.section-title-big {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    margin: 0 0 1.25rem 0;
    background: linear-gradient(90deg, rgba(7, 39, 94, 0.08) 0%, rgba(7, 39, 94, 0.02) 100%);
    border-left: 4px solid var(--bleu-roy);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--bleu-roy);
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    scroll-margin-top: 80px;
}
.section-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bleu-roy);
    color: var(--blanc);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    flex-shrink: 0;
}
.section-title-big-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.section-title-big-row .section-title-big {
    margin: 0;
    flex: 1;
    min-width: 280px;
}

/* Scroll-margin-top pour que l'ancre ne soit pas masquée par la TOC sticky */
section[id^="sec-"] { scroll-margin-top: 80px; }

/* === Badge résultat (Bénéfice / Déficit) === */
.badge-result {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    align-self: flex-start;
}
.badge-result-benefice {
    background: rgba(14, 169, 117, 0.10);
    color: #0a7a55;
    border: 1px solid rgba(14, 169, 117, 0.25);
}
.badge-result-perte {
    background: rgba(181, 0, 10, 0.08);
    color: var(--ruby);
    border: 1px solid rgba(181, 0, 10, 0.25);
}

/* === Petit hint inline dans un label === */
.form-help-inline {
    color: var(--gris-4);
    font-weight: 400;
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0;
    margin-left: 0.4rem;
}

/* === Hint sous un champ (texte italique gris) === */
.form-hint {
    color: var(--gris-4);
    font-size: 0.74rem;
    margin-top: 0.3rem;
    font-style: italic;
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem 1.25rem;
    padding: 1.5rem;
    background: var(--blanc);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-md);
}
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}
.form-field-wide  { grid-column: 1 / -1; }
.form-field-small { max-width: 100px; }
.form-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gris-5);
}
.form-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-sm);
    background: var(--blanc);
    color: var(--gris-6);
    font-size: 0.92rem;
    font-family: var(--font-body);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
    outline: none;
    border-color: var(--bleu-roy);
    box-shadow: 0 0 0 3px rgba(7, 39, 94, 0.08);
}
select.form-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6577' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 14px;
    padding-right: 2rem;
    appearance: none;
    -webkit-appearance: none;
}

/* Checkbox personnalisée */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    cursor: pointer;
    color: var(--gris-6);
    font-size: 0.92rem;
}
.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--bleu-roy);
    cursor: pointer;
    margin: 0;
}
.form-check input[type="checkbox"]:focus {
    outline: 2px solid var(--bleu-roy);
    outline-offset: 2px;
}

/* Texte d'aide sous un titre de section */
.form-help {
    color: var(--gris-4);
    font-size: 0.85rem;
    margin: -0.5rem 0 1rem 0;
    line-height: 1.5;
    max-width: 720px;
}

/* === Cards éditables personne (mandataire / associé) === */
.person-list-editable {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.person-card-editable {
    background: var(--blanc);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
}
.person-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--gris-2);
}
.person-card-label {
    font-family: var(--font-title);
    font-weight: 600;
    color: var(--bleu-roy);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.person-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

/* === Boutons spéciaux des forms === */
.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.55rem 1.1rem;
    background: var(--blanc);
    color: var(--bleu-roy);
    border: 1px dashed var(--gris-3);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    font-family: var(--font-body);
}
.btn-add:hover {
    background: rgba(7, 39, 94, 0.04);
    border-color: var(--bleu-roy);
    border-style: solid;
}
.btn-add svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}
.btn-icon-danger {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--gris-4);
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s;
}
.btn-icon-danger:hover {
    background: rgba(181, 0, 10, 0.08);
    color: var(--ruby);
}
.btn-icon-danger svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

/* === Actions sticky === */
.actions-bar-sticky {
    position: sticky;
    bottom: 0;
    background: var(--blanc);
    border-top: 1px solid var(--gris-2);
    padding-top: 1.25rem;
    margin-top: 2rem;
    margin-left: -4rem;
    margin-right: -4rem;
    padding-left: 4rem;
    padding-right: 4rem;
    padding-bottom: 1.25rem;
    z-index: 10;
}
@media (max-width: 900px) {
    .actions-bar-sticky {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ============================================================
   UPLOAD ZONE secondaire (AGO N-1, optionnel, plus discrete)
   ============================================================ */
.upload-section-secondary {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--gris-2);
}
.upload-section-secondary-title {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--gris-5);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 0.5rem 0;
}
.upload-section-secondary-help {
    color: var(--gris-4);
    font-size: 0.85rem;
    margin: 0 0 1.25rem 0;
    line-height: 1.5;
    max-width: 720px;
}
.upload-zone-secondary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: 1.5px dashed var(--gris-3);
    border-radius: var(--radius-md);
    background: var(--gris-0);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.upload-zone-secondary:hover {
    border-color: var(--bleu-roy);
    background: rgba(7, 39, 94, 0.02);
}
.upload-zone-secondary .upload-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.upload-zone-secondary .upload-text strong { font-size: 0.92rem; }
.upload-zone-secondary .upload-text span { font-size: 0.8rem; }

/* ============================================================
   RESPONSIVE — mobile (cache la sidebar, simplifie)
   ============================================================ */
@media (max-width: 900px) {
    .app { flex-direction: column; }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--gris-2);
        padding: 1rem;
    }
    .sidebar-footer { display: none; }
    .content { padding: 2rem 1.5rem; }
    .content-greeting { font-size: 1.4rem; }
}


/* ============================================================
   MODULE JURIDIQUE — Tabs, filtres, tableau, badges
   ============================================================ */

/* --- Tabs Global / Mes dossiers / Collaborateurs --- */
.tabs-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0 1.25rem 0;
    border-bottom: 1px solid var(--gris-2);
}
.tab-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    color: var(--gris-5);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}
.tab-link:hover { color: var(--bleu-roy); }
.tab-link.active {
    color: var(--bleu-roy);
    border-bottom-color: var(--bleu-roy);
    font-weight: 600;
}
.tab-link-right {
    margin-left: auto;
    font-size: 0.82rem;
}
.tab-badge {
    background: var(--bleu-roy);
    color: white;
    font-size: 0.68rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* --- Barre de filtres --- */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    padding: 1rem 1.25rem;
    background: var(--gris-0);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1 1 180px;
    min-width: 0;
}
.filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gris-5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.filter-input {
    width: 100%;
    padding: 0.5rem 0.7rem;
    font-size: 0.88rem;
}
.filter-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* --- Tableau de données --- */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-md);
    background: white;
    max-width: 100%;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}
.data-table th,
.data-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gris-1);
    vertical-align: middle;
    white-space: nowrap;
}
.data-table th {
    background: var(--gris-0);
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--bleu-roy);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    position: sticky;
    top: 0;
    z-index: 5;
}
.data-table tbody tr:hover { background: rgba(7, 39, 94, 0.025); }
.td-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.8rem; color: var(--gris-5); }
.td-strong { font-weight: 600; color: var(--gris-6); }
.td-email { font-size: 0.78rem; color: var(--gris-5); max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.td-comment { max-width: 240px; white-space: normal; font-size: 0.8rem; color: var(--gris-5); }
.td-empty { text-align: center; color: var(--gris-4); font-style: italic; padding: 2rem; }

/* --- Badges avancement & pills --- */
.badge-avancement {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(7, 39, 94, 0.08);
    color: var(--bleu-roy);
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
}
.pill-ok    { background: rgba(46, 160, 67, 0.14); color: #1f6e34; }
.pill-warn  { background: rgba(218, 122, 22, 0.14); color: #a3590a; }
.pill-muted { background: var(--gris-1); color: var(--gris-5); }

/* --- Inputs inline (édition rapide dans le tableau) --- */
.inline-select,
.inline-input {
    border: 1px solid transparent;
    background: transparent;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: inherit;
    color: inherit;
    width: 100%;
    min-width: 110px;
    transition: border-color 0.12s, background 0.12s;
}
.inline-select:hover,
.inline-input:hover {
    border-color: var(--gris-2);
    background: white;
}
.inline-select:focus,
.inline-input:focus {
    outline: none;
    border-color: var(--bleu-roy);
    background: white;
}
.inline-assign-form { display: inline; margin: 0; }
.btn-sm { padding: 0.32rem 0.7rem; font-size: 0.78rem; }

/* --- Form-field actions (bouton ajouter en bas de form) --- */
.form-field-actions {
    flex: 1 1 100%;
    align-self: flex-end;
}

/* --- Flash info --- */
.flash {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0 1.5rem 0;
    font-size: 0.9rem;
}
.flash-info {
    background: rgba(13, 184, 222, 0.12);
    color: #0a6e85;
    border-left: 3px solid var(--indigo);
}

/* ============================================================
   MODULE FICHES NAVETTE — vue allégée comptable
   ============================================================ */

/* --- Onglets de filtre par statut (À faire / Faite / etc.) --- */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
    padding: 0.85rem;
    background: var(--gris-0);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-md);
}
.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--gris-2);
    color: var(--gris-6);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.filter-tab:hover {
    border-color: var(--bleu-roy);
    color: var(--bleu-roy);
}
.filter-tab.active {
    background: var(--bleu-roy);
    border-color: var(--bleu-roy);
    color: white;
    box-shadow: 0 1px 3px rgba(7, 39, 94, 0.2);
}
.filter-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 0.4rem;
    background: var(--gris-1);
    color: var(--gris-6);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-title);
}
.filter-tab.active .filter-tab-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}
.filter-tab-count.filter-tab-warn {
    background: rgba(218, 122, 22, 0.18);
    color: #a3590a;
}
.filter-tab-count.filter-tab-ok {
    background: rgba(46, 160, 67, 0.18);
    color: #1f6e34;
}

.filters-bar-compact {
    padding: 0.5rem 0.85rem;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

/* --- Tableau "cards" pour fiches navette (plus aéré) --- */
.data-table-cards {
    font-size: 0.92rem;
}
.data-table-cards th,
.data-table-cards td {
    padding: 0.9rem 1rem;
}
.data-table-cards .col-client     { width: 28%; }
.data-table-cards .col-siren      { width: 18%; }
.data-table-cards .col-comment    { width: 32%; }
.data-table-cards .col-status     { width: 22%; }
.td-client { padding-left: 1.25rem; }
.link-client {
    color: var(--bleu-roy);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dotted var(--bleu-roy);
}
.link-client:hover { background: rgba(7, 39, 94, 0.06); }
.td-meta {
    font-size: 0.72rem;
    color: var(--gris-4);
    margin-top: 0.2rem;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.td-comment-large {
    white-space: normal;
    max-width: 360px;
    color: var(--gris-5);
    line-height: 1.4;
}

/* --- Coloration du select statut selon valeur courante --- */
.status-select { font-weight: 600; }
.status-select.status-afaire { color: #a3590a; }
.status-select.status-faite { color: #1f6e34; }
.status-select.status-nonclient,
.status-select.status-nonavocat,
.status-select.status-nonautres { color: var(--gris-5); }

/* ============================================================
   DENSIFICATION du tableau Suivi juridique (vue Vincent)
   ============================================================ */
.data-table-dense {
    font-size: 0.74rem;
}
.data-table-dense th,
.data-table-dense td {
    padding: 0.3rem 0.45rem;
}
.data-table-dense th {
    font-size: 0.62rem;
    padding: 0.4rem 0.5rem;
}
.data-table-dense .td-comment {
    max-width: 160px;
    font-size: 0.7rem;
}
.data-table-dense .td-email {
    max-width: 130px;
    font-size: 0.68rem;
}
.data-table-dense .badge-avancement {
    font-size: 0.66rem;
    padding: 0.12rem 0.4rem;
}
.data-table-dense .pill {
    font-size: 0.62rem;
    padding: 0.1rem 0.4rem;
}
.data-table-dense .inline-select {
    font-size: 0.7rem;
    padding: 0.15rem 0.3rem;
    min-width: 90px;
}

/* --- Sélecteur "Connecter en tant que" dans la sidebar --- */
.sidebar-mock-switcher {
    margin-top: auto;
    margin-bottom: 1rem;
    padding: 0.6rem;
    background: rgba(7, 39, 94, 0.04);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--gris-2);
}
.sidebar-mock-label {
    font-size: 0.62rem;
    color: var(--gris-4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.sidebar-mock-select {
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.82rem;
    border: 1px solid var(--gris-2);
    border-radius: 4px;
    background: white;
    font-family: inherit;
    color: var(--gris-6);
}


/* ============================================================
   MODULE FICHES NAVETTE — onglets statuts + tableau cartes
   ============================================================ */

/* Onglets statuts avec compteur */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem 0;
}
.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    background: var(--gris-1);
    color: var(--gris-5);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    border: 1px solid transparent;
}
.filter-tab:hover {
    background: var(--gris-2);
    color: var(--gris-6);
}
.filter-tab.active {
    background: var(--bleu-roy);
    color: white;
    box-shadow: 0 1px 4px rgba(7, 39, 94, 0.18);
}
.filter-tab-count {
    display: inline-block;
    min-width: 22px;
    padding: 0.1rem 0.5rem;
    background: rgba(0, 0, 0, 0.10);
    color: inherit;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}
.filter-tab.active .filter-tab-count {
    background: rgba(255, 255, 255, 0.25);
}
.filter-tab-count.filter-tab-ok {
    background: rgba(46, 160, 67, 0.18);
    color: #1f6e34;
}
.filter-tab-count.filter-tab-warn {
    background: rgba(218, 122, 22, 0.18);
    color: #a3590a;
}

/* Barre de filtres compacte (recherche seule) */
.filters-bar-compact {
    padding: 0.65rem 1rem;
    margin-bottom: 1.25rem;
}

/* Tableau "cartes" — pour la vue comptable, plus dense maintenant */
.data-table-cards {
    font-size: 0.88rem;
}
.data-table-cards th,
.data-table-cards td {
    padding: 0.55rem 0.85rem;
    white-space: normal;
    vertical-align: middle;
}
.data-table-cards .td-comment-right-cell { padding: 0.45rem 0.85rem; }
.data-table-cards .col-client { width: 30%; }
.data-table-cards .col-siren { width: 14%; }
.data-table-cards .col-comment { width: 32%; }
.data-table-cards .col-status { width: 24%; }
.data-table-cards .row-clickable {
    transition: background 0.15s;
}
.data-table-cards .row-clickable:hover {
    background: rgba(13, 184, 222, 0.04);
}
.td-client .link-client {
    color: var(--bleu-roy);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}
.td-client .link-client:hover { text-decoration: underline; }
.td-meta {
    color: var(--gris-4);
    font-size: 0.72rem;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.td-comment-large {
    max-width: 360px;
    font-size: 0.85rem;
    color: var(--gris-5);
    line-height: 1.45;
}

/* Coloration du dropdown selon le statut (côté comptable) */
.status-select { font-weight: 600; min-width: 200px; }
.status-select.statusfaite          { color: #1f6e34; }
.status-select.statusàfaire,
.status-select.statusà-faire        { color: #a3590a; }
.status-select.statusnon-client,
.status-select.statusnon-avocat,
.status-select.statusnon-autres     { color: var(--gris-4); }


/* ============================================================
   MODULE JURIDIQUE — densification (vue Vincent)
   ============================================================ */
.data-table-dense {
    font-size: 0.76rem;
}
.data-table-dense th {
    font-size: 0.62rem;
    padding: 0.45rem 0.5rem;
}
.data-table-dense td {
    padding: 0.35rem 0.5rem;
}
.data-table-dense .td-mono { font-size: 0.72rem; }
.data-table-dense .td-comment { font-size: 0.72rem; max-width: 200px; }
.data-table-dense .td-email { font-size: 0.7rem; max-width: 160px; }
.data-table-dense .inline-select { font-size: 0.74rem; min-width: 90px; padding: 0.18rem 0.35rem; }
.data-table-dense .badge-avancement { font-size: 0.7rem; padding: 0.12rem 0.45rem; }
.data-table-dense .pill { font-size: 0.66rem; padding: 0.12rem 0.45rem; }


/* ============================================================
   FICHES NAVETTE — refonte B.2a
   ============================================================ */

/* Header avec bouton à droite */
.content-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* En-têtes triables */
.data-table-cards th.sortable a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}
.data-table-cards th.sortable a:hover { color: var(--bleu-roy); }

/* Colonne commentaire à droite */
.data-table-cards .col-comment-right { width: 35%; text-align: right; }
.data-table-cards .td-comment-right-cell { vertical-align: top; }

/* Textarea inline (commentaire éditable) */
.inline-textarea {
    width: 100%;
    border: 1px solid var(--gris-2);
    background: white;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-family: inherit;
    color: var(--gris-6);
    resize: vertical;
    min-height: 2.4rem;
    line-height: 1.4;
    transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.inline-textarea:hover { border-color: var(--gris-3); }
.inline-textarea:focus {
    outline: none;
    border-color: var(--bleu-roy);
    box-shadow: 0 0 0 3px rgba(7, 39, 94, 0.08);
}

/* Modal "Nouveau dossier" */
.modal {
    border: none;
    border-radius: var(--radius-md);
    padding: 0;
    background: transparent;
    box-shadow: var(--shadow-md);
}
.modal::backdrop {
    background: rgba(7, 39, 94, 0.35);
    backdrop-filter: blur(2px);
}
.modal-form {
    background: white;
    padding: 2rem 2.25rem;
    border-radius: var(--radius-md);
    min-width: 420px;
    max-width: 520px;
}
.modal-title {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--bleu-roy);
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
}
.modal-help {
    color: var(--gris-5);
    font-size: 0.88rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}
.modal-form .form-field { margin-bottom: 1rem; }
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--gris-2);
    padding-top: 1.25rem;
}

/* Cartes upload (détail fiche) */
.uploads-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
@media (max-width: 900px) {
    .uploads-grid { grid-template-columns: 1fr; }
}
.upload-card {
    background: white;
    border: 1.5px solid var(--gris-2);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.upload-card:hover {
    border-color: var(--bleu-roy);
    box-shadow: var(--shadow-sm);
}
.upload-card-title {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--bleu-roy);
    font-size: 0.95rem;
}
.upload-card-help {
    color: var(--gris-5);
    font-size: 0.82rem;
    margin: 0;
    line-height: 1.4;
}
.upload-current {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(46, 160, 67, 0.08);
    color: #1f6e34;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}
.upload-input {
    font-size: 0.82rem;
    border: 1px dashed var(--gris-3);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--gris-0);
    cursor: pointer;
    margin-top: auto;
}
.upload-input::file-selector-button {
    background: var(--bleu-roy);
    color: white;
    border: none;
    padding: 0.35rem 0.7rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 0.75rem;
    font-size: 0.78rem;
}
.empty-hint {
    color: var(--gris-4);
    font-style: italic;
    padding: 1.5rem;
    background: var(--gris-0);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--gris-2);
}


/* ============================================================
   SIDEBAR — collapsable (15/05/2026)
   ============================================================ */

/* Bouton réduire/agrandir : positionné a droite de la sidebar (sur la
   bordure), n'empiète pas sur le brand */
.sidebar-top {
    position: relative;
    margin-bottom: 2rem;
    padding-right: 30px; /* réserve l'espace du bouton, évite chevauchement avec le brand */
}
.sidebar-top .sidebar-brand { margin-bottom: 0; }
.sidebar-collapse-btn {
    position: absolute;
    top: 50%;
    right: -11px;
    transform: translateY(-50%);
    background: white;
    border: 1px solid var(--gris-2);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    padding: 0;
    cursor: pointer;
    color: var(--gris-5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.12s;
    box-shadow: var(--shadow-xs);
    z-index: 5;
}
.sidebar-collapse-btn:hover {
    background: var(--gris-1);
    color: var(--bleu-roy);
    border-color: var(--gris-3);
}
.sidebar-collapse-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.18s;
}

/* État collapsé : sidebar étroite, labels masqués */
html.sidebar-collapsed .sidebar { width: 64px; padding: 1.25rem 0.5rem; }
html.sidebar-collapsed .sidebar-brand { display: none; }
html.sidebar-collapsed .sidebar-top { margin-bottom: 1rem; min-height: 28px; }
html.sidebar-collapsed .nav-section-label { display: none; }
html.sidebar-collapsed .nav-item { justify-content: center; padding: 0.6rem 0.4rem; }
html.sidebar-collapsed .nav-label { display: none; }
html.sidebar-collapsed .sidebar-mock-switcher { display: none; }
html.sidebar-collapsed .sidebar-footer { padding: 0.5rem 0; }
html.sidebar-collapsed .sidebar-user { padding: 0; justify-content: center; }
html.sidebar-collapsed .user-meta { display: none; }
html.sidebar-collapsed .sidebar-logout {
    justify-content: center;
    padding: 0.5rem 0.4rem;
}
html.sidebar-collapsed .sidebar-collapse-icon { transform: rotate(180deg); }


/* ============================================================
   SÉLECTEUR USER MOCK — 2 niveaux (optgroup stylé)
   ============================================================ */
.sidebar-mock-select optgroup {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bleu-roy);
    background: var(--gris-0);
}
.sidebar-mock-select option {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--gris-6);
    padding: 0.25rem 0.5rem;
}


/* ============================================================
   INDICATEUR "Enregistré" sur les inputs inline
   (apparaît brièvement après un save inline réussi)
   ============================================================ */
.save-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #1f6e34;
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}
.save-indicator.show { opacity: 1; }
.save-indicator svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ============================================================
   COMMENTAIRES — permanent vs annuel (visible distinction)
   ============================================================ */
.comment-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.comment-tag {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gris-4);
}
.comment-tag.tag-permanent { color: var(--bleu-roy); }
.comment-tag.tag-annuel { color: #a3590a; }
.inline-textarea-mini {
    width: 100%;
    min-height: 38px;
    padding: 0.4rem 0.55rem;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--gris-6);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-sm);
    background: white;
    resize: vertical;
    transition: border-color 0.12s, box-shadow 0.12s;
}
.inline-textarea-mini:focus {
    outline: none;
    border-color: var(--bleu-roy);
    box-shadow: 0 0 0 2px rgba(7, 39, 94, 0.08);
}


/* ============================================================
   ALERTE capitaux propres < 1/2 capital social
   ============================================================ */
.alert-capitaux-row {
    background: rgba(181, 0, 10, 0.04) !important;
    border-left: 3px solid var(--ruby);
}
.alert-capitaux-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.55rem;
    background: rgba(181, 0, 10, 0.12);
    color: var(--ruby);
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.alert-capitaux-badge svg {
    width: 11px; height: 11px;
    stroke: currentColor; fill: none; stroke-width: 2.5;
}

/* Commentaires inline compacts (vue comptable Samuel) */
.comment-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.comment-inline-form {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
    margin: 0;
}
.comment-icon {
    font-size: 0.85rem;
    opacity: 0.55;
    flex-shrink: 0;
}
.comment-input {
    flex: 1;
    min-width: 0;
    padding: 0.32rem 0.55rem;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.82rem;
    color: var(--gris-6);
    transition: background 0.12s, border-color 0.12s;
}
.comment-input::placeholder { color: var(--gris-3); font-style: italic; }
.comment-input:hover {
    background: var(--gris-0);
    border-color: var(--gris-2);
}
.comment-input:focus {
    outline: none;
    background: white;
    border-color: var(--bleu-roy);
    box-shadow: 0 0 0 2px rgba(7, 39, 94, 0.06);
}
.comment-input:not(:placeholder-shown) { color: var(--gris-6); }

/* Toggle case alerte capitaux propres (page détail) */
.alert-toggle-form { margin: 1rem 0 0 0; }
.alert-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.1rem;
    background: var(--gris-0);
    border: 1.5px solid var(--gris-2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.alert-toggle-label:hover {
    background: rgba(181, 0, 10, 0.04);
    border-color: rgba(181, 0, 10, 0.2);
}
.alert-toggle-label input { width: 18px; height: 18px; cursor: pointer; }
.alert-toggle-text {
    font-size: 0.92rem;
    color: var(--gris-6);
    font-weight: 500;
}

/* Méthode alternative (dépôt PDF) — accordéon discret */
.alt-method-block {
    margin: 2rem 0 3rem 0;
    border: 1px dashed var(--gris-2);
    border-radius: var(--radius-md);
    background: var(--gris-0);
}
.alt-method-summary {
    list-style: none;
    cursor: pointer;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--gris-5);
    font-size: 0.88rem;
    font-weight: 500;
}
.alt-method-summary::-webkit-details-marker { display: none; }
.alt-method-summary:hover { color: var(--bleu-roy); }
.alt-method-chevron {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    transition: transform 0.18s;
}
.alt-method-block[open] .alt-method-chevron { transform: rotate(180deg); }
.alt-method-content {
    padding: 0 1.25rem 1.25rem 1.25rem;
}
.upload-card-muted {
    opacity: 0.85;
    background: var(--gris-1);
    border-style: dashed;
}


/* ============================================================
   VUE VINCENT — tableau type Pennylane (colonnes groupées + chips)
   ============================================================ */

/* Header de page avec bouton Export à droite */
.content-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Barre de filtres en chips horizontales */
.filters-chips-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0 1.25rem 0;
    padding: 0.6rem 0.85rem;
    background: var(--gris-0);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-md);
}
.filter-chip,
.filter-chip-search {
    padding: 0.42rem 0.7rem;
    font-size: 0.82rem;
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--gris-6);
    font-family: inherit;
    transition: border-color 0.12s, background 0.12s;
    min-width: 0;
}
.filter-chip-search { flex: 1 1 240px; }
.filter-chip { min-width: 150px; }
.filter-chip:hover,
.filter-chip-search:hover { border-color: var(--gris-3); }
.filter-chip:focus,
.filter-chip-search:focus {
    outline: none;
    border-color: var(--bleu-roy);
    box-shadow: 0 0 0 2px rgba(7, 39, 94, 0.08);
}

/* Tableau groupé : 2 lignes de thead. Police = body (Inter 0.88rem) pour
   harmoniser avec le descriptif "Suivez l'avancement..." */
.data-table-grouped {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--gris-6);
    line-height: 1.4;
}
.data-table-grouped th,
.data-table-grouped td {
    padding: 0.55rem 0.65rem;
    white-space: nowrap;
    vertical-align: middle;
    border-bottom: 1px solid var(--gris-1);
}
.data-table-grouped thead .thead-group th {
    padding: 0.5rem 0.55rem;
    background: var(--gris-1);
    text-align: center;
    text-transform: uppercase;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    border-bottom: 2px solid var(--gris-2);
    color: var(--gris-5);
}
.data-table-grouped thead .thead-group .group-header-identif {
    background: white;
    border-bottom: none;
}
.data-table-grouped thead .thead-group .group-fiche       { color: #a3590a; background: rgba(218, 122, 22, 0.06); }
.data-table-grouped thead .thead-group .group-redaction   { color: var(--bleu-roy); background: rgba(7, 39, 94, 0.06); }
.data-table-grouped thead .thead-group .group-signature   { color: #1a6f8c; background: rgba(13, 184, 222, 0.07); }
.data-table-grouped thead .thead-group .group-facture     { color: #1f6e34; background: rgba(46, 160, 67, 0.07); }
.data-table-grouped thead tr:not(.thead-group) th {
    background: white;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gris-5);
    border-bottom: 1px solid var(--gris-2);
    font-weight: 600;
    padding: 0.5rem 0.65rem;
}

/* Cellules statut (À faire / Faite / N/A) */
.cell-status {
    display: inline-block;
    padding: 0.18rem 0.6rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.cell-status-todo {
    background: rgba(218, 122, 22, 0.12);
    color: #a3590a;
}
.cell-status-ok {
    background: rgba(46, 160, 67, 0.12);
    color: #1f6e34;
}
.cell-status-ok small { color: inherit; opacity: 0.7; margin-left: 0.2rem; }
.cell-status-na {
    background: var(--gris-1);
    color: var(--gris-4);
}

/* Avatar coloré rond avec initiales */
.avatar-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.col-collab-cell {
    text-align: center;
    width: 50px;
}

/* Cellule "Commentaires" minimaliste : icône 💬 si commentaire */
.td-com-cell {
    text-align: center;
    width: 32px;
    cursor: help;
}
.td-com-icon {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* Cellule date "muet" (gris léger) */
.td-mute {
    color: var(--gris-4);
    font-size: 0.72rem;
}

/* Badge avancement compact */
.badge-avancement-sm {
    font-size: 0.66rem !important;
    padding: 0.12rem 0.45rem !important;
    text-transform: none;
    letter-spacing: 0;
}

/* Ligne N/A (fiche pas à faire) — discrète, lecture seule */
.data-table-grouped tbody tr.row-na {
    background: var(--gris-0);
    color: var(--gris-4);
}
.data-table-grouped tbody tr.row-na .td-strong { color: var(--gris-5); }
.data-table-grouped tbody tr.row-na .td-meta { color: var(--gris-3); }

/* Hover sur les lignes pour aide à la lecture (sauf N/A déjà grisées) */
.data-table-grouped tbody tr:not(.row-na):hover {
    background: rgba(7, 39, 94, 0.03);
}
.data-table-grouped tbody tr:not(.row-na):hover .td-strong {
    color: var(--bleu-roy);
}

/* Bandes alternées subtiles pour les lignes très denses (zebra) */
.data-table-grouped tbody tr:not(.row-na):nth-child(even) {
    background: rgba(7, 39, 94, 0.015);
}
.data-table-grouped tbody tr:not(.row-na):nth-child(even):hover {
    background: rgba(7, 39, 94, 0.05);
}

/* Numéro de dossier moins prégnant (l'œil va d'abord sur le client) */
.data-table-grouped .td-mono { color: var(--gris-4); font-size: 0.78rem; }

/* Cellules dates encore plus discrètes */
.data-table-grouped .td-mute { font-size: 0.8rem; color: var(--gris-5); }

/* Cellule Client (Vincent) : nom + SIREN dans MÊME famille (Inter), tailles
   et poids cohérents pour tous les dossiers */
.td-client-cell {
    font-family: var(--font-body);
    min-width: 220px;
    padding: 0.55rem 0.65rem;
}
.client-name {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--gris-6);
    font-size: 0.88rem;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none;
}
.client-siren {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--gris-4);
    font-size: 0.74rem;
    line-height: 1.3;
    margin-top: 0.2rem;
    letter-spacing: 0;
    text-transform: none;
}
.data-table-grouped tbody tr:not(.row-na):hover .client-name { color: var(--bleu-roy); }

/* Rangée d'onglets avec label à gauche (Vincent) */
.filter-tabs-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 0.85rem 0;
    flex-wrap: wrap;
}
.filter-tabs-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gris-5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 130px;
}
.filter-tabs-row .filter-tabs { margin: 0; flex: 1; }

/* Chips collaborateurs (avatar + prénom, cliquable) */
.collab-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1;
}
.collab-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem 0.25rem 0.35rem;
    background: var(--gris-0);
    color: var(--gris-6);
    border: 1px solid var(--gris-2);
    border-radius: 999px;
    font-size: 0.78rem;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s;
}
.collab-chip:hover {
    background: var(--gris-1);
    border-color: var(--gris-3);
}
.collab-chip.active {
    background: var(--bleu-roy);
    color: white;
    border-color: var(--bleu-roy);
}
.collab-chip.active .avatar-pill {
    background: rgba(255,255,255,0.18) !important;
    color: white !important;
}
.collab-chip-label {
    padding: 0 0.3rem;
    font-weight: 600;
}
.collab-chip-name { font-weight: 500; }
.collab-chip .avatar-pill {
    width: 22px; height: 22px;
    font-size: 0.6rem;
}

/* Dropdown Mode envoi (compact, neutre, sans couleur pill) */
.mode-envoi-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--gris-2);
    background: white;
    color: var(--gris-6);
    font-family: inherit;
    font-size: 0.78rem;
    padding: 0.22rem 1.3rem 0.22rem 0.55rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%235b6577' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    background-size: 10px 10px;
    max-width: 180px;
}
.mode-envoi-select:hover { border-color: var(--gris-3); }
.mode-envoi-select:focus { outline: none; border-color: var(--bleu-roy); }
.td-mode-envoi { min-width: 175px; }

/* Filtre dropdown directement dans un <th> du tableau (Vincent) */
.th-with-filter { padding: 0 !important; }
.th-filter-form { margin: 0; padding: 0; }
.th-filter-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    border: none;
    background: transparent;
    font-family: var(--font-title);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gris-5);
    padding: 0.5rem 0.65rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%235b6577' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.35rem center;
    background-size: 10px 10px;
}
.th-filter-select:hover { background-color: var(--gris-1); }
.th-filter-select:focus { outline: none; background-color: var(--gris-1); }


/* ============================================================
   Inputs DATE inline (Vincent : édition rapide des dates workflow)
   ============================================================ */
.td-date { padding: 0.4rem 0.5rem !important; min-width: 130px; }
.date-input {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--gris-6);
    font-family: inherit;
    font-size: 0.78rem;
    padding: 0.25rem 0.4rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
}
.date-input:hover {
    border-color: var(--gris-2);
    background: white;
}
.date-input:focus {
    outline: none;
    border-color: var(--bleu-roy);
    background: white;
    box-shadow: 0 0 0 2px rgba(7, 39, 94, 0.06);
}
/* Vide = affichage très discret (placeholder fantôme) */
.date-input:not(:focus):not(:hover)[value=""] { color: var(--gris-3); }

/* Cellule "Envoi client" : 3 dates empilées (envoi 1 / relance 1 / relance 2) */
.td-envoi-multi {
    padding: 0.4rem 0.5rem !important;
    min-width: 170px;
}
.envoi-stack {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.envoi-line {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
}
.envoi-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--gris-1);
    color: var(--gris-5);
    font-size: 0.62rem;
    font-weight: 700;
    flex-shrink: 0;
}
.date-input-mini {
    font-size: 0.74rem;
    padding: 0.15rem 0.35rem;
    flex: 1;
}

/* Alerte relance due : pastille de la ligne concernée passe en orange */
.envoi-line-warn .envoi-num {
    background: rgba(218, 122, 22, 0.18);
    color: #a3590a;
}
.envoi-line-warn .date-input {
    border-color: rgba(218, 122, 22, 0.35);
    background: rgba(218, 122, 22, 0.05);
}

/* Badge "Relance due" sous les 3 envois */
/* Toggle "Anomalie signature" sous la date retour signé */
.anomalie-form { margin-top: 0.25rem; }
.anomalie-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.12rem 0.5rem;
    background: var(--gris-0);
    border: 1px dashed var(--gris-2);
    border-radius: 999px;
    font-size: 0.66rem;
    color: var(--gris-4);
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.anomalie-toggle:hover {
    background: rgba(181, 0, 10, 0.04);
    border-color: rgba(181, 0, 10, 0.2);
    color: var(--ruby);
}
.anomalie-toggle input { display: none; }
.anomalie-toggle.anomalie-on {
    background: rgba(181, 0, 10, 0.14);
    border-style: solid;
    border-color: rgba(181, 0, 10, 0.3);
    color: var(--ruby);
    font-weight: 700;
}
.anomalie-icon { font-size: 0.78rem; }


/* ============================================================
   FICHE NAVETTE EN LIGNE — formulaire saisie comptable
   ============================================================ */
.fiche-form { display: block; }

/* Textarea standard du form fiche */
.form-textarea {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--gris-6);
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-sm);
    background: white;
    resize: vertical;
    line-height: 1.5;
    width: 100%;
}
.form-textarea:focus {
    outline: none;
    border-color: var(--bleu-roy);
    box-shadow: 0 0 0 2px rgba(7, 39, 94, 0.08);
}
.form-textarea::placeholder { color: var(--gris-3); }

/* Radio inline (bénéfice / perte) */
.radio-row {
    display: flex;
    gap: 1rem;
    padding: 0.55rem 0;
}
.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gris-6);
}
.radio-label input { cursor: pointer; }


/* ============================================================
   LISTES ÉDITABLES (mandataires / associés) — style écran 2 AGO Studio
   ============================================================ */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}
.item-card {
    background: var(--gris-0);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    position: relative;
}
.item-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.item-card-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    background: var(--bleu-roy);
    color: white;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
}
.item-remove-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--gris-4);
    font-size: 1.1rem;
    line-height: 1;
    width: 26px; height: 26px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.item-remove-btn:hover {
    background: rgba(181, 0, 10, 0.08);
    color: var(--ruby);
    border-color: rgba(181, 0, 10, 0.2);
}
.item-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.85rem;
}
.btn-add-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    background: rgba(7, 39, 94, 0.05);
    color: var(--bleu-roy);
    border: 1px dashed rgba(7, 39, 94, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.btn-add-item:hover {
    background: rgba(7, 39, 94, 0.1);
    border-color: var(--bleu-roy);
    border-style: solid;
}


.envoi-relance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    background: rgba(218, 122, 22, 0.14);
    color: #a3590a;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.15rem;
    align-self: flex-start;
}


/* ============================================================
   Cellule Facturation : bouton dépôt PDF + lien voir + remplacer
   ============================================================ */
.td-facture {
    padding: 0.4rem 0.5rem !important;
    min-width: 130px;
    text-align: center;
}
/* Bouton "Déposer" — couleur neutre bleu marine (différencie du statut Faite vert) */
.facture-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    background: rgba(7, 39, 94, 0.08);
    color: var(--bleu-roy);
    border: 1px solid rgba(7, 39, 94, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.facture-upload-btn:hover {
    background: rgba(7, 39, 94, 0.14);
    border-color: rgba(7, 39, 94, 0.32);
}

/* Facture déposée — pill verte avec check, sans date */
.facture-deposee {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.6rem;
    background: rgba(46, 160, 67, 0.14);
    color: #1f6e34;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
}
.facture-deposee:hover {
    background: rgba(46, 160, 67, 0.22);
}
.facture-deposee-icon {
    width: 11px; height: 11px;
    stroke: currentColor;
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.facture-replace-form { display: inline-block; margin-left: 0.3rem; vertical-align: middle; }
.facture-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    padding: 0;
    background: transparent;
    color: var(--gris-4);
    border: 1px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.facture-remove-btn svg {
    width: 11px; height: 11px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.facture-remove-btn:hover {
    background: rgba(181, 0, 10, 0.08);
    color: var(--ruby);
    border-color: rgba(181, 0, 10, 0.2);
}

/* Bouton "Déposée" comme bouton cliquable (style identique à un lien) */
button.facture-deposee {
    border: none;
    font-family: inherit;
    cursor: pointer;
}

/* ============================================================
   Modale visionneuse PDF
   ============================================================ */
.pdf-modal {
    position: fixed;
    inset: 0;
    background: rgba(7, 39, 94, 0.45);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2vh 2vw;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.pdf-modal[hidden] { display: none; }
.pdf-modal-content {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 1100px;
    height: 96vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--gris-2);
}
.pdf-modal-title {
    margin: 0;
    font-family: var(--font-title);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bleu-roy);
}
.pdf-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--gris-2);
    border-radius: 50%;
    cursor: pointer;
    color: var(--gris-5);
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.pdf-modal-close svg {
    width: 14px; height: 14px;
    stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.pdf-modal-close:hover {
    background: var(--gris-1);
    color: var(--ruby);
    border-color: var(--gris-3);
}
.pdf-modal-frame {
    flex: 1;
    border: none;
    background: var(--gris-0);
}

/* Variante compacte du status-pill pour le tableau Vincent (plus petit) */
.status-pill-sm {
    font-size: 0.72rem;
    padding: 0.2rem 1.3rem 0.2rem 0.55rem;
    background-position: right 0.35rem center;
    background-size: 9px 9px;
}

/* Cellule commentaires dans la vue Vincent : 2 mini inputs empilés verticalement */
.td-com-vincent {
    min-width: 180px;
    max-width: 220px;
    padding: 0.35rem 0.55rem !important;
}
.comment-stack {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.comment-inline-form-mini {
    padding: 0.1rem 0.4rem;
    background: var(--gris-0);
}
.comment-inline-form-mini .comment-icon { font-size: 0.78rem; }
.comment-inline-form-mini .comment-input { font-size: 0.74rem; }


/* ============================================================
   VUE COMPTABLE — commentaires compactés sur une seule ligne
   (📌 permanent + 📅 annuel côte à côte, 1 ligne = 1 input)
   ============================================================ */
.comment-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.comment-inline-form {
    display: inline-flex;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    gap: 0.3rem;
    margin: 0;
    padding: 0.18rem 0.45rem;
    background: var(--gris-0);
    border: 1px solid var(--gris-2);
    border-radius: var(--radius-sm);
    transition: border-color 0.12s, background 0.12s;
}
.comment-inline-form:hover { border-color: var(--gris-3); background: white; }
.comment-inline-form:focus-within {
    border-color: var(--bleu-roy);
    background: white;
    box-shadow: 0 0 0 2px rgba(7, 39, 94, 0.06);
}
.comment-icon {
    font-size: 0.9rem;
    opacity: 0.75;
    flex-shrink: 0;
}
.comment-input {
    flex: 1 1 0;
    min-width: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.78rem;
    color: var(--gris-6);
    padding: 0.15rem 0;
    outline: none;
}
.comment-input::placeholder { color: var(--gris-4); font-style: italic; }

/* Lignes du tableau comptable plus serrées et centrées verticalement */
.data-table-cards tbody tr td {
    padding: 0.6rem 0.85rem;
    vertical-align: middle;
}
.data-table-cards .td-client { padding-top: 0.55rem; padding-bottom: 0.55rem; }
.data-table-cards .td-comment-right-cell {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    vertical-align: middle;
}


/* ============================================================
   DROPDOWN STATUT type "pill colorée" (style Pennylane)
   ============================================================ */
.status-form { margin: 0; display: inline-block; }
.status-pill {
    /* Reset du select natif */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.28rem 1.5rem 0.28rem 0.7rem;
    border-radius: 999px;
    line-height: 1.2;
    /* Chevron en background SVG, juste à droite du texte */
    background-repeat: no-repeat;
    background-position: right 0.45rem center;
    background-size: 10px 10px;
    transition: filter 0.12s, border-color 0.12s;
}
.status-pill:hover { filter: brightness(0.96); border-color: rgba(0,0,0,0.1); }
.status-pill:focus { outline: none; border-color: rgba(0,0,0,0.2); }

/* Variantes couleur — calquées sur cell-status-* / .pill-* */
.status-pill.status-ok {
    background-color: rgba(46, 160, 67, 0.15);
    color: #1f6e34;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%231f6e34' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.status-pill.status-todo {
    background-color: rgba(218, 122, 22, 0.15);
    color: #a3590a;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23a3590a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.status-pill.status-na {
    background-color: var(--gris-1);
    color: var(--gris-5);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%235b6577' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.status-pill.status-prep {
    background-color: #fff7ed;
    color: #7a3d00;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%237a3d00' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* Options du dropdown (limité, dépend du navigateur) */
.status-pill option { color: var(--gris-6); background: white; font-weight: 500; }

/* Header "Commentaire" centré entre les 2 inputs (permanent + annuel) */
.th-comment-centered { text-align: center !important; }


/* ============================================================
   DROPZONE GLOBALE multi-fichiers (auto-détection du type)
   ============================================================ */
/* === Zone unique de drop (vide) — style AGO Studio écran 1 === */
.big-dropzone {
    position: relative;
    display: block;
    margin: 1.25rem 0 0 0;
    padding: 0;
    border: 2px dashed var(--gris-3);
    border-radius: var(--radius-md);
    background: var(--gris-0);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.big-dropzone:hover {
    border-color: var(--bleu-roy);
    background: rgba(7, 39, 94, 0.04);
}
.big-dropzone.is-dragging {
    border-color: var(--bleu-roy);
    background: rgba(7, 39, 94, 0.08);
    box-shadow: 0 0 0 4px rgba(7, 39, 94, 0.10);
}
.big-dropzone.is-dragging * { pointer-events: none; }
.big-dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
    padding: 3rem 1.5rem;
    pointer-events: none;
}
.big-dropzone-icon {
    width: 48px; height: 48px;
    stroke: var(--bleu-roy);
    fill: none;
    stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.big-dropzone-title {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--bleu-roy);
    font-size: 1.15rem;
}
.big-dropzone-sub {
    color: var(--gris-5);
    font-size: 0.88rem;
    line-height: 1.5;
    max-width: 580px;
}

/* === Ancienne global-dropzone — gardée pour compat, plus utilisée par défaut === */
.global-dropzone {
    position: relative;
    display: block;
    margin: 1rem 0 0 0 !important;
    padding: 0 !important;
    border: 2px dashed var(--bleu-roy) !important;
    border-radius: var(--radius-md) !important;
    background: rgba(7, 39, 94, 0.05) !important;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.global-dropzone:hover {
    background: rgba(7, 39, 94, 0.07);
}
.global-dropzone.is-dragging {
    background: rgba(7, 39, 94, 0.12);
    border-color: var(--bleu-roy);
    box-shadow: 0 0 0 4px rgba(7, 39, 94, 0.10);
}
/* Pendant le drag, on désactive pointer-events sur les enfants pour que
   le drop atterrisse sur le form parent (capture fiable du dataTransfer) */
.global-dropzone.is-dragging * { pointer-events: none; }
.global-dropzone-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 1.75rem;
    color: var(--bleu-roy);
    pointer-events: none; /* enfants ne capturent pas le clic, c'est le form qui gère */
}
.global-dropzone-icon {
    width: 44px; height: 44px;
    stroke: currentColor; fill: none;
    stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0;
}
.global-dropzone-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.global-dropzone-text strong {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.02rem;
}
.global-dropzone-text span {
    color: var(--gris-5);
    font-size: 0.85rem;
    line-height: 1.45;
}

.dropzone-separator {
    text-align: center;
    color: var(--gris-4);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    margin: 1.25rem 0 0.5rem 0;
    text-transform: uppercase;
    font-weight: 500;
}


/* ============================================================
   DROPZONE — carte upload moderne avec drag & drop
   ============================================================ */
.uploads-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
@media (max-width: 700px) {
    .uploads-grid-2col { grid-template-columns: 1fr; }
}

.dropzone-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem 1.1rem 1.1rem 1.1rem;
    background: white;
    border: 1.5px solid var(--gris-2);
    border-radius: var(--radius-md);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    margin: 0;
}
.dropzone-card.is-dragging {
    border-color: var(--bleu-roy);
    background: rgba(7, 39, 94, 0.04);
    box-shadow: 0 0 0 3px rgba(7, 39, 94, 0.12);
}
.dropzone-card-filled {
    background: rgba(46, 160, 67, 0.04);
    border-color: rgba(46, 160, 67, 0.35);
}
.dropzone-card-muted {
    background: var(--gris-0);
    border-style: dashed;
}

/* Input file caché (label gère le clic) */
.dropzone-input {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

.dropzone-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.dropzone-title {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--bleu-roy);
    font-size: 0.95rem;
}
.dropzone-star { color: #a3590a; }
.dropzone-desc {
    margin: 0;
    color: var(--gris-5);
    font-size: 0.78rem;
    line-height: 1.4;
}

/* Actions header (oeil + croix) */
.dropzone-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Bouton "voir le PDF" */
.dropzone-view-btn,
.dropzone-delete-btn-inline {
    background: var(--gris-1);
    border: 1px solid var(--gris-2);
    border-radius: 50%;
    width: 26px; height: 26px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.dropzone-view-btn { color: var(--bleu-roy); }
.dropzone-view-btn:hover {
    background: rgba(7, 39, 94, 0.08);
    border-color: var(--bleu-roy);
}
.dropzone-view-btn svg,
.dropzone-delete-btn-inline svg {
    width: 13px; height: 13px;
    stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Bouton croix suppression */
.dropzone-delete-btn-inline { color: var(--gris-4); }
.dropzone-delete-btn-inline:hover {
    background: rgba(181, 0, 10, 0.08);
    color: var(--ruby);
    border-color: rgba(181, 0, 10, 0.3);
}

/* Zone "vide" : grosse zone cliquable + drop */
.dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 0.5rem;
    border: 2px dashed var(--gris-2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--gris-5);
    background: var(--gris-0);
    transition: border-color 0.12s, background 0.12s, color 0.12s;
    margin-top: 0.25rem;
}
.dropzone-empty:hover {
    border-color: var(--bleu-roy);
    background: rgba(7, 39, 94, 0.03);
    color: var(--bleu-roy);
}
.dropzone-card.is-dragging .dropzone-empty {
    border-color: var(--bleu-roy);
    background: rgba(7, 39, 94, 0.06);
    color: var(--bleu-roy);
}
.dropzone-icon {
    width: 28px; height: 28px;
    stroke: currentColor; fill: none;
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.dropzone-cta {
    font-size: 0.88rem;
    font-weight: 600;
}
.dropzone-cta u { color: var(--bleu-roy); text-decoration: underline; }
.dropzone-hint {
    font-size: 0.72rem;
    color: var(--gris-4);
}

/* Zone "fichier déposé" */
.dropzone-filled {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: rgba(46, 160, 67, 0.10);
    border-radius: var(--radius-sm);
    margin-top: 0.25rem;
    overflow: hidden;
}
.dropzone-check {
    width: 14px; height: 14px;
    stroke: #1f6e34;
    fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0;
}
.dropzone-filename {
    font-size: 0.84rem;
    color: #1f6e34;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.dropzone-size {
    font-size: 0.72rem;
    color: var(--gris-5);
    flex-shrink: 0;
}
.dropzone-wrapper {
    display: block;
    min-width: 0;
}
.dropzone-wrapper > form { width: 100%; }

/* "Extra upload" (Fiche PDF en accordéon discret) */
.extra-upload {
    margin-top: 1rem;
    border: 1px dashed var(--gris-2);
    border-radius: var(--radius-sm);
    background: var(--gris-0);
}
.extra-upload-summary {
    cursor: pointer;
    list-style: none;
    padding: 0.7rem 1rem;
    color: var(--gris-5);
    font-size: 0.85rem;
    font-weight: 500;
}
.extra-upload-summary::-webkit-details-marker { display: none; }
.extra-upload-summary:hover { color: var(--bleu-roy); }
.extra-upload[open] .extra-upload-summary {
    border-bottom: 1px solid var(--gris-2);
    color: var(--bleu-roy);
}
.extra-upload-body {
    padding: 1rem;
    max-width: 480px;
}

/* Verrouillage des sections fiche navette tant que INPI + comptes pas déposés */
.form-locked-block.is-locked {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
    filter: grayscale(0.3);
}
.form-locked-block.is-locked .section { position: relative; }

/* Flash d'avertissement (orange) */
.flash-warn {
    padding: 1rem 1.25rem;
    margin: 1.25rem 0 1.5rem 0;
    background: rgba(218, 122, 22, 0.10);
    border: 1px solid rgba(218, 122, 22, 0.35);
    border-left: 4px solid #a3590a;
    color: #6b3d09;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Boutons disabled */
.btn-primary-inline:disabled,
.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}




