/* ==============================================================
   Cerfrance Admin — Feuille de style globale
   Design flat — Palette Cerfrance
   #f8b332 (or)  |  #e8501f (rouge-orange)  |  #f18a09 (ambre)  |  #4b4b4d (ardoise)
   Note : #f18a096 fourni dans le brief — interprété comme #f18a09 (typo sur le dernier chiffre)
   ============================================================== */

/* ── Variables CSS ──────────────────────────────────────────────────────── */
:root {
    /* Palette Cerfrance */
    --c-primary   : #f8b332;   /* Or / jaune-doré    */
    --c-secondary : #e8501f;   /* Rouge-orange        */
    --c-accent    : #f18a09;   /* Ambre               */
    --c-dark      : #4b4b4d;   /* Ardoise / texte     */

    /* Neutres */
    --c-white     : #ffffff;
    --c-bg        : #f4f4f5;
    --c-border    : #e2e2e4;
    --c-text      : #1e1e20;
    --c-muted     : #87878a;

    /* Feedback */
    --c-success   : #22a06b;
    --c-error     : #d93025;

    /* Layout */
    --sidebar-w   : 256px;
    --topbar-h    : 60px;

    /* Tokens */
    --radius      : 4px;
    --shadow-sm   : 0 1px 3px rgba(0, 0, 0, .07);
    --shadow-md   : 0 4px 16px rgba(0, 0, 0, .10);
    --transition  : 160ms ease;
}

/* ── Reset minimal ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size   : .9375rem;    /* 15 px */
    line-height : 1.6;
    color       : var(--c-text);
    background  : var(--c-bg);
    display     : flex;
    min-height  : 100vh;
}

a         { color: inherit; text-decoration: none; }
img, svg  { display: block; }

/* ════════════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════════════ */
.sidebar {
    width          : var(--sidebar-w);
    background     : var(--c-dark);
    display        : flex;
    flex-direction : column;
    flex-shrink    : 0;
    position       : fixed;
    inset-block    : 0;
    inset-inline-start: 0;
    height         : 100vh;
    z-index        : 200;
    overflow-y     : auto;
}

/* Logo / Marque */
.sidebar__brand {
    padding       : 20px;
    border-bottom : 1px solid rgba(255, 255, 255, .08);
    flex-shrink   : 0;
}

.sidebar__logo {
    width  : 100%;
    max-width: 186px;
    height : auto;
}

/* Navigation */
.sidebar__nav {
    flex           : 1;
    padding-block  : 12px;
}

.sidebar__link {
    display        : flex;
    align-items    : center;
    gap            : 10px;
    padding        : 11px 20px;
    color          : rgba(255, 255, 255, .72);
    font-size      : .875rem;
    font-weight    : 500;
    border-left    : 3px solid transparent;
    transition     : background var(--transition), color var(--transition),
                     border-color var(--transition);
}

.sidebar__link:hover {
    background   : rgba(255, 255, 255, .07);
    color        : var(--c-white);
}

.sidebar__link--active {
    background   : rgba(248, 179, 50, .15);
    color        : var(--c-primary);
    border-left-color: var(--c-primary);
    font-weight  : 600;
}

.sidebar__link--active:hover {
    background   : rgba(248, 179, 50, .2);
    color        : var(--c-primary);
}

.sidebar__icon {
    width       : 18px;
    height      : 18px;
    flex-shrink : 0;
    opacity     : .85;
}

/* Bloc utilisateur (bas de sidebar) */
.sidebar__user {
    display         : flex;
    align-items     : center;
    gap             : 10px;
    padding         : 14px 16px;
    border-top      : 1px solid rgba(255, 255, 255, .08);
    background      : rgba(0, 0, 0, .18);
    flex-shrink     : 0;
    min-width       : 0;
}

.sidebar__user-avatar {
    width           : 34px;
    height          : 34px;
    border-radius   : 50%;
    background      : var(--c-primary);
    color           : var(--c-dark);
    font-weight     : 700;
    font-size       : .6875rem;
    display         : flex;
    align-items     : center;
    justify-content : center;
    flex-shrink     : 0;
    letter-spacing  : .03em;
}

.sidebar__user-info {
    flex     : 1;
    overflow : hidden;
    min-width: 0;
}

.sidebar__user-name {
    display       : block;
    color         : var(--c-white);
    font-size     : .8125rem;
    font-weight   : 600;
    white-space   : nowrap;
    overflow      : hidden;
    text-overflow : ellipsis;
}

.sidebar__user-email {
    display       : block;
    color         : rgba(255, 255, 255, .45);
    font-size     : .6875rem;
    white-space   : nowrap;
    overflow      : hidden;
    text-overflow : ellipsis;
}

.sidebar__logout {
    color          : rgba(255, 255, 255, .45);
    flex-shrink    : 0;
    transition     : color var(--transition);
    line-height    : 1;
    padding        : 4px;
    border-radius  : var(--radius);
}

.sidebar__logout:hover { color: var(--c-secondary); }

/* ── Catégories de navigation (détails/résumé natifs) ───────── */
.sidebar__category {
    /* reset <details> comportement par défaut */
}

.sidebar__category > summary {
    list-style: none;
}

.sidebar__category > summary::-webkit-details-marker {
    display: none;
}

.sidebar__category-header {
    display         : flex;
    align-items     : center;
    gap             : 10px;
    padding         : 10px 20px 10px;
    margin-top      : 4px;
    cursor          : pointer;
    color           : rgba(255, 255, 255, .45);
    font-size       : .75rem;
    font-weight     : 700;
    letter-spacing  : .07em;
    text-transform  : uppercase;
    user-select     : none;
    border-left     : 3px solid transparent;
    transition      : color var(--transition), background var(--transition);
}

.sidebar__category-header:hover {
    color      : rgba(255, 255, 255, .80);
    background : rgba(255, 255, 255, .05);
}

.sidebar__category-header .sidebar__icon {
    opacity: .55;
}

.sidebar__category-chevron {
    width      : 14px;
    height     : 14px;
    flex-shrink: 0;
    margin-left: auto;
    opacity    : .50;
    transition : transform var(--transition);
}

details[open].sidebar__category .sidebar__category-chevron {
    transform: rotate(180deg);
}

.sidebar__link--sub {
    padding-left: 38px;
    font-size   : .8125rem;
}

/* ════════════════════════════════════════════════════════════════
   ZONE PRINCIPALE
════════════════════════════════════════════════════════════════ */
.main {
    flex           : 1;
    margin-left    : var(--sidebar-w);
    display        : flex;
    flex-direction : column;
    min-height     : 100vh;
    min-width      : 0;
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
    height          : var(--topbar-h);
    background      : var(--c-white);
    border-bottom   : 3px solid var(--c-primary);
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    padding-inline  : 28px;
    box-shadow      : var(--shadow-sm);
    position        : sticky;
    top             : 0;
    z-index         : 100;
    flex-shrink     : 0;
}

.topbar__title {
    font-size   : 1.0625rem;
    font-weight : 700;
    color       : var(--c-dark);
}

.topbar__date {
    font-size : .8125rem;
    color     : var(--c-muted);
}

/* ── Zone de contenu ─────────────────────────────────────────────────────── */
.content {
    padding : 28px;
    flex    : 1;
}

/* ════════════════════════════════════════════════════════════════
   COMPOSANTS — CARDS KPI
════════════════════════════════════════════════════════════════ */
.cards-grid {
    display               : grid;
    grid-template-columns : repeat(auto-fill, minmax(210px, 1fr));
    gap                   : 18px;
    margin-bottom         : 28px;
}

.card {
    background   : var(--c-white);
    border-radius: var(--radius);
    box-shadow   : var(--shadow-sm);
    padding      : 22px 20px;
    border-top   : 4px solid var(--c-primary);
}

.card--accent { border-top-color: var(--c-secondary); }
.card--amber  { border-top-color: var(--c-accent);    }
.card--dark   { border-top-color: var(--c-dark);      }

.card__label {
    font-size      : .6875rem;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .07em;
    color          : var(--c-muted);
    margin-bottom  : 6px;
}

.card__value {
    font-size   : 2.125rem;
    font-weight : 700;
    color       : var(--c-dark);
    line-height : 1.1;
}

.card__sub {
    font-size  : .8125rem;
    color      : var(--c-muted);
    margin-top : 4px;
}

/* ════════════════════════════════════════════════════════════════
   COMPOSANTS — SECTIONS / PANNEAUX
════════════════════════════════════════════════════════════════ */
.section {
    background    : var(--c-white);
    border-radius : var(--radius);
    box-shadow    : var(--shadow-sm);
    margin-bottom : 22px;
}

.section__header {
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    padding         : 16px 20px;
    border-bottom   : 1px solid var(--c-border);
}

.section__title {
    font-size   : .9375rem;
    font-weight : 700;
    color       : var(--c-dark);
}

.section__body        { padding: 20px; }

/* Grille pour les informations de session (2 colonnes) */
.section__body--grid {
    display               : grid;
    grid-template-columns : repeat(auto-fill, minmax(260px, 1fr));
    gap                   : 12px;
}

/* ════════════════════════════════════════════════════════════════
   COMPOSANTS — INFO ITEM
════════════════════════════════════════════════════════════════ */
.info-item {
    display       : flex;
    flex-direction: column;
    gap           : 3px;
}

.info-item__label {
    font-size      : .6875rem;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .06em;
    color          : var(--c-muted);
}

.info-item__value {
    font-size   : .9375rem;
    color       : var(--c-dark);
    font-weight : 500;
    word-break  : break-all;
}

.info-item__value--muted {
    font-size  : .8125rem;
    color      : var(--c-muted);
    font-family: monospace;
}

/* ════════════════════════════════════════════════════════════════
   COMPOSANTS — TABLE
════════════════════════════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; }

.table {
    width           : 100%;
    border-collapse : collapse;
    font-size       : .875rem;
}

.table th {
    background      : var(--c-bg);
    text-align      : left;
    padding         : 10px 16px;
    font-size       : .6875rem;
    font-weight     : 700;
    text-transform  : uppercase;
    letter-spacing  : .06em;
    color           : var(--c-muted);
    border-bottom   : 2px solid var(--c-border);
    white-space     : nowrap;
}

.table td {
    padding        : 11px 16px;
    border-bottom  : 1px solid var(--c-border);
    color          : var(--c-text);
    vertical-align : middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td      { background: #fafafa; transition: background var(--transition); }

.table__empty {
    text-align : center;
    color      : var(--c-muted);
    padding    : 40px 16px !important;
    font-style : italic;
}

/* ════════════════════════════════════════════════════════════════
   COMPOSANTS — BADGE
════════════════════════════════════════════════════════════════ */
.badge {
    display        : inline-flex;
    align-items    : center;
    padding        : 2px 10px;
    border-radius  : 20px;
    font-size      : .6875rem;
    font-weight    : 700;
    letter-spacing : .04em;
    text-transform : uppercase;
    white-space    : nowrap;
}

.badge--primary { background: rgba(248, 179, 50, .15);  color: #a07000; }
.badge--success { background: rgba(34, 160, 107, .14);  color: #16774c; }
.badge--danger  { background: rgba(232, 80, 31, .12);   color: var(--c-secondary); }
.badge--neutral { background: rgba(75, 75, 77, .10);    color: var(--c-dark); }

/* ════════════════════════════════════════════════════════════════
   COMPOSANTS — BOUTONS
════════════════════════════════════════════════════════════════ */
.btn {
    display         : inline-flex;
    align-items     : center;
    justify-content : center;
    gap             : 9px;
    padding         : 10px 22px;
    border-radius   : var(--radius);
    font-size       : .9375rem;
    font-weight     : 600;
    cursor          : pointer;
    border          : none;
    white-space     : nowrap;
    transition      : filter var(--transition), box-shadow var(--transition);
    line-height     : 1.4;
}

.btn:hover  { filter: brightness(.92); }
.btn:active { filter: brightness(.87); }

.btn--primary {
    background : var(--c-primary);
    color      : var(--c-dark);
}

.btn--danger {
    background : var(--c-secondary);
    color      : var(--c-white);
}

/* Bouton SSO Microsoft (page login) */
.btn--sso {
    background  : var(--c-white);
    color       : var(--c-dark);
    border      : 1px solid var(--c-border);
    width       : 100%;
    padding     : 14px 24px;
    font-size   : .9375rem;
    box-shadow  : var(--shadow-sm);
}

.btn--sso:hover {
    filter     : none;
    background : var(--c-bg);
    box-shadow : var(--shadow-md);
}

.btn__icon {
    width      : 20px;
    height     : 20px;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════
   COMPOSANTS — ALERTES
════════════════════════════════════════════════════════════════ */
.alert {
    padding       : 11px 16px;
    border-radius : var(--radius);
    font-size     : .875rem;
    margin-bottom : 18px;
    border-left   : 4px solid transparent;
}

.alert--error {
    background         : rgba(217, 48, 37, .08);
    border-left-color  : var(--c-error);
    color              : var(--c-error);
}

.alert--success {
    background         : rgba(34, 160, 107, .08);
    border-left-color  : var(--c-success);
    color              : var(--c-success);
}

.alert--info {
    background         : rgba(0, 164, 239, .08);
    border-left-color  : #00a4ef;
    color              : #005a8e;
}

/* ════════════════════════════════════════════════════════════════
   BANNIÈRE DE BIENVENUE
════════════════════════════════════════════════════════════════ */
.welcome-banner {
    font-size     : 1rem;
    color         : var(--c-muted);
    margin-bottom : 22px;
}

.welcome-banner strong {
    color       : var(--c-dark);
    font-weight : 700;
}

/* ════════════════════════════════════════════════════════════════
   PAGE LOGIN
════════════════════════════════════════════════════════════════ */
.body--login {
    display         : flex;
    align-items     : center;
    justify-content : center;
    min-height      : 100vh;
    /* Fond dégradé discret sur la palette sombre */
    background      : linear-gradient(145deg, var(--c-dark) 0%, #38383a 100%);
    padding         : 20px;
}

.login-wrapper {
    width     : 100%;
    max-width : 400px;
}

.login-card {
    background    : var(--c-white);
    border-radius : var(--radius);
    box-shadow    : var(--shadow-md);
    overflow      : hidden;
}

.login-card__header {
    background    : var(--c-dark);
    padding       : 28px 32px;
    text-align    : center;
    border-bottom : 4px solid var(--c-primary);
}

.login-card__logo {
    width  : 190px;
    height : auto;
    margin : 0 auto;
}

.login-card__body {
    padding : 28px 32px;
}

.login-card__title {
    font-size     : 1.1875rem;
    font-weight   : 700;
    color         : var(--c-dark);
    margin-bottom : 6px;
}

.login-card__subtitle {
    color         : var(--c-muted);
    font-size     : .875rem;
    margin-bottom : 22px;
    line-height   : 1.5;
}

.login-card__switch {
    margin-top  : 14px;
    text-align  : center;
    font-size   : .8125rem;
}

.link--muted {
    color           : var(--c-muted);
    text-decoration : none;
}

.link--muted:hover {
    color           : var(--c-primary);
    text-decoration : underline;
}

.login-card__footer {
    padding       : 14px 32px;
    background    : var(--c-bg);
    border-top    : 1px solid var(--c-border);
    text-align    : center;
    font-size     : .75rem;
    color         : var(--c-muted);
}

/* ════════════════════════════════════════════════════════════════
   PAGE ERREUR
════════════════════════════════════════════════════════════════ */
.error-page {
    display         : flex;
    flex-direction  : column;
    align-items     : center;
    justify-content : center;
    padding         : 60px 32px;
    text-align      : center;
    min-height      : calc(100vh - var(--topbar-h));
    gap             : 12px;
}

.error-page__code {
    font-size   : 6rem;
    font-weight : 800;
    color       : var(--c-primary);
    line-height : 1;
    letter-spacing: -.02em;
}

.error-page__title {
    font-size   : 1.375rem;
    font-weight : 700;
    color       : var(--c-dark);
}

.error-page__desc {
    color      : var(--c-muted);
    font-size  : .9375rem;
    max-width  : 380px;
    margin-bottom: 8px;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — Gestion basique tablette/mobile
════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }

    .sidebar {
        transform  : translateX(-256px);
        width      : 256px;
        transition : transform .25s ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .main          { margin-left: 0; }
    .content       { padding: 16px; }
    .topbar        { padding-inline: 16px; }
    .cards-grid    { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .cards-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════
   GESTION — FORMULAIRES
════════════════════════════════════════════════════════════════ */
.form-row {
    display               : grid;
    grid-template-columns : repeat(auto-fill, minmax(220px, 1fr));
    gap                   : 18px;
}

.form-group        { display: flex; flex-direction: column; gap: 5px; }
.form-group--sm    { max-width: 160px; }

.form-label {
    font-size      : .8125rem;
    font-weight    : 700;
    color          : var(--c-dark);
}

.form-hint {
    display      : block;
    font-size    : .6875rem;
    font-weight  : 400;
    color        : var(--c-muted);
    margin-top   : 1px;
}

.form-control {
    padding       : 8px 12px;
    border        : 1px solid var(--c-border);
    border-radius : var(--radius);
    font-size     : .875rem;
    color         : var(--c-text);
    background    : var(--c-white);
    width         : 100%;
    outline       : none;
    transition    : border-color var(--transition), box-shadow var(--transition);
    appearance    : auto;
}

.form-control:focus {
    border-color : var(--c-primary);
    box-shadow   : 0 0 0 3px rgba(248, 179, 50, .18);
}

.form-control--sm    { padding: 5px 9px; font-size: .8125rem; width: auto; }

.form-control--color {
    padding  : 2px;
    width    : 48px;
    height   : 36px;
    cursor   : pointer;
    border   : 1px solid var(--c-border);
    border-radius: var(--radius);
}

/* Formulaire inline (rôle dans le tableau) */
.form-inline {
    display    : flex;
    align-items: center;
    gap        : 6px;
    flex-wrap  : wrap;
}

/* ════════════════════════════════════════════════════════════════
   GESTION — BOUTONS TAILLE XS / SM
════════════════════════════════════════════════════════════════ */
.btn--xs {
    padding   : 5px 12px;
    font-size : .8125rem;
}

.btn--sm {
    padding   : .3rem .7rem;
    font-size : .8rem;
}

.btn--outline {
    background : transparent;
    color      : var(--c-dark);
    border     : 1px solid var(--c-border);
}
.btn--outline:hover { background: var(--c-bg); filter: none; }

.btn--outline-success {
    background : transparent;
    color      : var(--c-success);
    border     : 1px solid var(--c-success);
}
.btn--outline-success:hover { background: rgba(34, 160, 107, .08); filter: none; }

/* ════════════════════════════════════════════════════════════════
   GESTION — CELLULE UTILISATEUR (table)
════════════════════════════════════════════════════════════════ */
.user-cell {
    display    : flex;
    align-items: center;
    gap        : 10px;
}

.avatar-sm {
    width           : 32px;
    height          : 32px;
    border-radius   : 50%;
    background      : var(--c-dark);
    color           : var(--c-white);
    font-weight     : 700;
    font-size       : .6875rem;
    display         : flex;
    align-items     : center;
    justify-content : center;
    flex-shrink     : 0;
    letter-spacing  : .03em;
}

.user-cell__name  { font-weight: 600; font-size: .875rem; color: var(--c-dark); }
.user-cell__email { font-size: .75rem; color: var(--c-muted); }

.table__row--current td { background: rgba(248, 179, 50, .05); }

/* ════════════════════════════════════════════════════════════════
   GESTION — GROUPE D'ACTIONS (table)
════════════════════════════════════════════════════════════════ */
.action-group {
    display    : flex;
    align-items: center;
    gap        : 6px;
    flex-wrap  : wrap;
}

/* ════════════════════════════════════════════════════════════════
   GESTION — BADGE COULEUR DYNAMIQUE (roles)
════════════════════════════════════════════════════════════════ */
.role-dot {
    width        : 10px;
    height       : 10px;
    border-radius: 50%;
    flex-shrink  : 0;
    display      : inline-block;
}

/* ════════════════════════════════════════════════════════════════
   GESTION — PERMISSIONS (liste compacte dans le tableau)
════════════════════════════════════════════════════════════════ */
.perm-pills {
    display  : flex;
    flex-wrap: wrap;
    gap      : 4px;
}

.perm-pill {
    display      : inline-block;
    padding      : 2px 8px;
    border-radius: 20px;
    font-size    : .6875rem;
    background   : rgba(75, 75, 77, .09);
    color        : var(--c-dark);
    white-space  : nowrap;
}

/* ════════════════════════════════════════════════════════════════
   GESTION — FORMULAIRE DE CRÉATION/ÉDITION DE RÔLE
════════════════════════════════════════════════════════════════ */
.role-form {}

.perm-group {
    margin-bottom : 14px;
}

.perm-group__title {
    font-size      : .6875rem;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .07em;
    color          : var(--c-muted);
    margin-bottom  : 8px;
    padding-bottom : 4px;
    border-bottom  : 1px solid var(--c-border);
}

.perm-grid {
    display               : grid;
    grid-template-columns : repeat(auto-fill, minmax(220px, 1fr));
    gap                   : 8px;
}

.perm-check {
    display    : flex;
    align-items: center;
    gap        : 8px;
    font-size  : .875rem;
    color      : var(--c-text);
    cursor     : pointer;
    padding    : 6px 10px;
    border-radius: var(--radius);
    border     : 1px solid var(--c-border);
    background : var(--c-white);
    transition : background var(--transition), border-color var(--transition);
}

.perm-check:hover {
    background  : var(--c-bg);
}

.perm-check input[type="checkbox"] {
    width     : 15px;
    height    : 15px;
    accent-color: var(--c-primary);
    cursor    : pointer;
    flex-shrink: 0;
}

.perm-check:has(input:checked) {
    background  : rgba(248, 179, 50, .1);
    border-color: var(--c-primary);
}

/* ════════════════════════════════════════════════════════════════
   UTILITAIRES
════════════════════════════════════════════════════════════════ */
.text-muted  { color: var(--c-muted); }
.cards-grid--sm { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* ════════════════════════════════════════════════════════════════
   LOGS IMMO BOVINS — Mise en page & composants spécifiques
════════════════════════════════════════════════════════════════ */

/* En-tête de la page logs */
.logs-header {
    margin-bottom : 18px;
}

/* ── Barre de filtres compacte ──────────────────────────────────────────────── */

/* Conteneur général : une seule ligne flex qui wrap si besoin */
.filter-bar {
    display         : flex;
    align-items     : center;
    flex-wrap       : wrap;
    gap             : 8px;
    background      : var(--c-white);
    border-radius   : var(--radius);
    box-shadow      : var(--shadow-sm);
    padding         : 12px 16px;
    margin-bottom   : 18px;
}

/* Zone qui accueille les chips (occupe tout l'espace restant) */
.filter-chips {
    display     : flex;
    align-items : center;
    flex-wrap   : wrap;
    gap         : 6px;
    flex        : 1;
    min-width   : 0;
}

/* Texte affiché quand aucun filtre n'est actif */
.filter-chips__empty {
    font-size  : .8125rem;
    color      : var(--c-muted);
    font-style : italic;
}

/* Une chip de filtre : label + input + bouton supprimer */
.filter-chip {
    display     : inline-flex;
    align-items : center;
    gap         : 5px;
    background  : rgba(248, 179, 50, .1);
    border      : 1px solid rgba(248, 179, 50, .35);
    border-radius: 20px;
    padding     : 3px 4px 3px 10px;
    font-size   : .8125rem;
    white-space : nowrap;
    animation   : chip-in .15s ease;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes chip-in {
    from { opacity: 0; transform: scale(.9); }
    to   { opacity: 1; transform: scale(1);  }
}

/* Label de la chip (ex : "Date de début") */
.filter-chip__label {
    font-size      : .6875rem;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .05em;
    color          : #a07000;
    flex-shrink    : 0;
}

/* Champ de saisie intégré à la chip */
.filter-chip__input {
    border        : none !important;
    background    : transparent !important;
    box-shadow    : none !important;
    padding       : 1px 4px !important;
    font-size     : .8125rem !important;
    color         : var(--c-dark);
    width         : auto;
    min-width     : 80px;
    max-width     : 160px;
    outline       : none;
}

.filter-chip__input[type="date"] {
    min-width : 110px;
}

/* Bouton × de suppression de la chip */
.filter-chip__remove {
    display         : flex;
    align-items     : center;
    justify-content : center;
    width           : 18px;
    height          : 18px;
    border-radius   : 50%;
    border          : none;
    background      : rgba(75, 75, 77, .15);
    color           : var(--c-dark);
    cursor          : pointer;
    padding         : 0;
    flex-shrink     : 0;
    transition      : background var(--transition), color var(--transition);
}

.filter-chip__remove:hover {
    background : var(--c-secondary);
    color      : var(--c-white);
}

/* Groupe du bouton + Filtre (position relative pour le dropdown) */
.filter-add-wrap {
    position : relative;
}

/* Bouton "+ Filtre" */
#filter-add-btn {
    display     : inline-flex;
    align-items : center;
    gap         : 5px;
    white-space : nowrap;
}

/* Dropdown du menu de sélection de filtre */
.filter-menu {
    position      : absolute;
    top           : calc(100% + 6px);
    left          : 0;
    z-index       : 300;
    background    : var(--c-white);
    border        : 1px solid var(--c-border);
    border-radius : var(--radius);
    box-shadow    : var(--shadow-md);
    min-width     : 200px;
    overflow      : hidden;
    animation     : menu-in .12s ease;
}

@keyframes menu-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* Chaque item du menu */
.filter-menu__item {
    display     : block;
    width       : 100%;
    padding     : 9px 14px;
    font-size   : .875rem;
    color       : var(--c-text);
    background  : none;
    border      : none;
    text-align  : left;
    cursor      : pointer;
    transition  : background var(--transition);
}

.filter-menu__item:hover {
    background : var(--c-bg);
}

.filter-menu__item + .filter-menu__item {
    border-top : 1px solid var(--c-border);
}

/* Message quand tous les filtres sont déjà actifs */
.filter-menu__empty {
    display    : block;
    padding    : 10px 14px;
    font-size  : .8125rem;
    color      : var(--c-muted);
    font-style : italic;
}

/* Boutons de contrôle (submit, reset) alignés à droite */
.filter-controls {
    display     : flex;
    align-items : center;
    gap         : 6px;
    flex-shrink : 0;
    margin-left : auto;
}

/* ── Tableau de logs ──────────────────────────────────────────────────────── */
.logs-table th a.sort-link {
    color          : var(--c-muted);
    text-decoration: none;
    font-size      : .6875rem;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .06em;
    display        : inline-flex;
    align-items    : center;
    gap            : 4px;
    white-space    : nowrap;
    transition     : color var(--transition);
}

.logs-table th a.sort-link:hover {
    color: var(--c-dark);
}

.logs-table th a.sort-link--active {
    color: var(--c-secondary);
}

.sort-arrow {
    font-style : normal;
    font-size  : .75rem;
}

/* Cellule ID — discret */
.log-id {
    font-size   : .75rem;
    color       : var(--c-muted);
    font-family : monospace;
}

/* Cellule date + heure sur deux lignes */
.log-date {
    display     : block;
    font-size   : .875rem;
    font-weight : 600;
    color       : var(--c-dark);
    white-space : nowrap;
}

.log-time {
    display     : block;
    font-size   : .75rem;
    color       : var(--c-muted);
    font-family : monospace;
    white-space : nowrap;
}

/* IP — mono discret */
.log-ip {
    font-size   : .8125rem;
    font-family : monospace;
    color       : var(--c-dark);
}

/* N° dossier — em bold */
.log-dossier {
    font-weight : 700;
    font-size   : .875rem;
    color       : var(--c-dark);
}

/* Cellule utilisateur Windows + correspondance Entra */
.log-user {
    display        : flex;
    flex-direction : column;
    gap            : 2px;
}

.log-user__windows {
    font-size   : .875rem;
    font-weight : 600;
    font-family : monospace;
    color       : var(--c-dark);
}

/* Nom Entra affiché en légende si la correspondance est trouvée */
.log-user__entra {
    font-size      : .6875rem;
    color          : var(--c-success);
    font-style     : italic;
    white-space    : nowrap;
    overflow       : hidden;
    text-overflow  : ellipsis;
    max-width      : 160px;
}

/* PC */
.log-pc {
    font-size   : .8125rem;
    font-family : monospace;
    color       : var(--c-dark);
}

/* Action — pill colorée */
.log-action {
    display       : inline-block;
    padding       : 3px 10px;
    border-radius : 20px;
    font-size     : .6875rem;
    font-weight   : 600;
    background    : rgba(248, 179, 50, .12);
    color         : #a07000;
    white-space   : nowrap;
    max-width     : 240px;
    overflow      : hidden;
    text-overflow : ellipsis;
}

/* ── Pagination ────────────────────────────────────────────────────────────── */
.pagination-bar {
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    padding         : 14px 20px;
    border-top      : 1px solid var(--c-border);
    background      : var(--c-white);
    border-radius   : 0 0 var(--radius) var(--radius);
    gap             : 10px;
    flex-wrap       : wrap;
}

.pagination-btn {
    font-size     : .875rem;
    font-weight   : 600;
    color         : var(--c-dark);
    padding       : 6px 14px;
    border-radius : var(--radius);
    border        : 1px solid var(--c-border);
    background    : var(--c-white);
    transition    : background var(--transition), color var(--transition);
    white-space   : nowrap;
    cursor        : pointer;
}

.pagination-btn:hover {
    background : var(--c-bg);
}

.pagination-btn--disabled {
    color       : var(--c-muted);
    cursor      : default;
    border      : 1px solid var(--c-border);
    background  : var(--c-bg);
    padding     : 6px 14px;
    border-radius: var(--radius);
    font-size   : .875rem;
    font-weight : 600;
    white-space : nowrap;
}

/* ════════════════════════════════════════════════════════════════
   MODULE GESTION DU STOCK INFORMATIQUE
════════════════════════════════════════════════════════════════ */

/* ── Onglets de navigation ────────────────────────────────── */
.stock-tabs {
    display         : flex;
    gap             : 2px;
    background      : var(--c-white);
    border-radius   : var(--radius);
    box-shadow      : var(--shadow-sm);
    padding         : 6px;
    margin-bottom   : 24px;
    overflow-x      : auto;
    flex-wrap       : nowrap;
}

.stock-tab {
    display         : inline-flex;
    align-items     : center;
    gap             : 7px;
    padding         : 9px 18px;
    border-radius   : var(--radius);
    font-size       : .875rem;
    font-weight     : 600;
    color           : var(--c-muted);
    text-decoration : none;
    white-space     : nowrap;
    transition      : background var(--transition), color var(--transition);
    border          : 1px solid transparent;
}

.stock-tab:hover {
    background  : var(--c-bg);
    color       : var(--c-dark);
}

.stock-tab--active {
    background  : rgba(248, 179, 50, .12);
    color       : #a07000;
    border-color: rgba(248, 179, 50, .4);
}

.stock-tab__icon {
    width       : 16px;
    height      : 16px;
    flex-shrink : 0;
}

/* ── Onglets internes fiche ordinateur ───────────────────── */
.pc-tabs {
    display         : flex;
    gap             : 0;
    border-bottom   : 2px solid var(--c-border);
    margin-bottom   : 20px;
    overflow-x      : auto;
    flex-wrap       : nowrap;
}

.pc-tab {
    padding         : 8px 18px;
    font-size       : .875rem;
    font-weight     : 500;
    color           : var(--c-muted);
    cursor          : pointer;
    background      : none;
    border          : none;
    border-bottom   : 2px solid transparent;
    margin-bottom   : -2px;
    white-space     : nowrap;
    transition      : color var(--transition), border-color var(--transition);
}

.pc-tab:hover          { color: var(--c-dark); }
.pc-tab.pc-tab--active { color: var(--c-secondary); border-bottom-color: var(--c-secondary); }

.pc-tab-panel              { display: none; }
.pc-tab-panel.pc-tab-panel--active { display: block; }

/* Séparateur de section dans la grille info-item */
.info-section-title {
    grid-column     : 1 / -1;
    font-size       : .75rem;
    font-weight     : 700;
    text-transform  : uppercase;
    letter-spacing  : .06em;
    color           : var(--c-muted);
    margin-top      : 12px;
    padding-bottom  : 4px;
    border-bottom   : 1px solid var(--c-border);
}
.info-section-title:first-child { margin-top: 0; }

/* ── Modale / Overlay ─────────────────────────────────────── */
.modal-overlay {
    position        : fixed;
    inset           : 0;
    background      : rgba(30, 30, 32, .55);
    z-index         : 900;
    display         : flex;
    align-items     : center;
    justify-content : center;
    padding         : 20px;
    overflow-y      : auto;
    animation       : modal-fade-in .18s ease;
}

.modal-overlay[hidden] { display: none; }

@keyframes modal-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

body.modal-open { overflow: hidden; }

.modal {
    background    : var(--c-white);
    border-radius : calc(var(--radius) * 2);
    box-shadow    : var(--shadow-md);
    width         : 100%;
    max-width     : 520px;
    max-height    : calc(100vh - 40px);
    overflow-y    : auto;
    animation     : modal-slide-in .18s ease;
    position      : relative;
}

.modal--lg  { max-width: 680px; }
.modal--xl  { max-width: 860px; }

@keyframes modal-slide-in {
    from { transform: translateY(-16px); opacity: .6; }
    to   { transform: translateY(0);     opacity: 1;  }
}

.modal__header {
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    padding         : 20px 24px 16px;
    border-bottom   : 1px solid var(--c-border);
    position        : sticky;
    top             : 0;
    background      : var(--c-white);
    z-index         : 1;
}

.modal__title {
    font-size   : 1.05rem;
    font-weight : 700;
    color       : var(--c-dark);
    margin      : 0;
}

.modal__close {
    background  : none;
    border      : none;
    font-size   : 1.1rem;
    color       : var(--c-muted);
    cursor      : pointer;
    padding     : 4px 8px;
    border-radius: var(--radius);
    line-height : 1;
    transition  : color var(--transition), background var(--transition);
}
.modal__close:hover { color: var(--c-dark); background: var(--c-bg); }

.modal__body {
    padding : 20px 24px;
}

.modal__body--grid {
    display               : grid;
    grid-template-columns : repeat(2, 1fr);
    gap                   : 14px;
}

.modal__footer {
    display         : flex;
    justify-content : flex-end;
    gap             : 10px;
    padding         : 16px 24px;
    border-top      : 1px solid var(--c-border);
    background      : var(--c-bg);
    position        : sticky;
    bottom          : 0;
}

/* ── Formulaires étendus (grille 2 colonnes) ──────────────── */
.form-group--full {
    grid-column : 1 / -1;
}

.form-section-title {
    font-size      : .6875rem;
    font-weight    : 700;
    text-transform : uppercase;
    letter-spacing : .07em;
    color          : var(--c-muted);
    padding-bottom : 4px;
    border-bottom  : 1px solid var(--c-border);
    grid-column    : 1 / -1;
    margin-top     : 6px;
}

/* ── Badges supplémentaires ───────────────────────────────── */
.badge--amber { background: rgba(241, 138, 9, .15); color: #8a5200; }

/* ── Lien primaire (dans les tableaux) ────────────────────── */
.link--primary {
    color           : var(--c-dark);
    text-decoration : none;
    font-weight     : 600;
    transition      : color var(--transition);
}
.link--primary:hover { color: var(--c-secondary); }

/* ── Ligne en alerte stock ────────────────────────────────── */
tr.row--alert td { background: rgba(217, 48, 37, .04); }

/* ── Navigation retour (breadcrumb) ──────────────────────── */
.breadcrumb-back {
    display         : inline-flex;
    align-items     : center;
    gap             : 4px;
    font-size       : .8125rem;
    color           : var(--c-muted);
    text-decoration : none;
    margin-bottom   : 6px;
    transition      : color var(--transition);
}
.breadcrumb-back:hover { color: var(--c-dark); }

/* ── Timeline des interventions ───────────────────────────── */
.timeline {
    display        : flex;
    flex-direction : column;
    gap            : 0;
    border-left    : 2px solid var(--c-border);
    margin-left    : 10px;
    padding-left   : 20px;
}

.timeline-item {
    position      : relative;
    padding-bottom: 20px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item__dot {
    position      : absolute;
    left          : -28px;
    top           : 4px;
    width         : 12px;
    height        : 12px;
    border-radius : 50%;
    background    : var(--c-border);
    border        : 2px solid var(--c-white);
    box-shadow    : 0 0 0 2px var(--c-border);
}

.timeline-dot--hardware  { background: var(--c-secondary); box-shadow: 0 0 0 2px rgba(232,80,31,.25); }
.timeline-dot--software  { background: #3b82f6;             box-shadow: 0 0 0 2px rgba(59,130,246,.25); }
.timeline-dot--upgrade   { background: var(--c-success);    box-shadow: 0 0 0 2px rgba(34,160,107,.25); }
.timeline-dot--repair    { background: var(--c-error);       box-shadow: 0 0 0 2px rgba(217,48,37,.25); }
.timeline-dot--setup     { background: var(--c-primary);     box-shadow: 0 0 0 2px rgba(248,179,50,.25); }
.timeline-dot--other     { background: var(--c-muted);       box-shadow: 0 0 0 2px rgba(135,135,138,.25); }

.timeline-item__body {
    background    : var(--c-white);
    border        : 1px solid var(--c-border);
    border-radius : var(--radius);
    padding       : 12px 16px;
    box-shadow    : var(--shadow-sm);
}

.timeline-item__header {
    display     : flex;
    align-items : center;
    gap         : 8px;
    flex-wrap   : wrap;
    margin-bottom: 6px;
}

.timeline-item__title {
    font-weight : 700;
    font-size   : .9375rem;
    color       : var(--c-dark);
    flex        : 1;
}

.timeline-item__date {
    font-size  : .75rem;
    color      : var(--c-muted);
    white-space: nowrap;
}

.timeline-item__desc {
    font-size   : .875rem;
    color       : var(--c-text);
    margin      : 6px 0;
    line-height : 1.55;
}

.timeline-item__meta {
    font-size  : .75rem;
    color      : var(--c-muted);
    display    : block;
    margin-top : 6px;
}

/* ── Barre de progression licences ───────────────────────── */
.progress-bar {
    width         : 100%;
    max-width     : 80px;
    height        : 5px;
    background    : var(--c-border);
    border-radius : 3px;
    overflow      : hidden;
    margin-top    : 4px;
    display       : inline-block;
}

.progress-bar__fill {
    height        : 100%;
    background    : var(--c-success);
    border-radius : 3px;
    transition    : width .3s ease;
}

.progress-bar__fill--danger { background: var(--c-error); }

/* ── Textes colorés utilitaires ───────────────────────────── */
.text-danger { color: var(--c-error);  font-weight: 600; }
.text-amber  { color: #8a5200;         font-weight: 600; }

/* Champ requis — astérisque rouge */
.required { color: var(--c-error); margin-left: 2px; }

/* ── Responsive modales ───────────────────────────────────── */
@media (max-width: 640px) {
    .modal, .modal--lg, .modal--xl { max-width: 100%; }
    .modal__body--grid { grid-template-columns: 1fr; }
    .stock-tabs { gap: 4px; padding: 4px; }
    .stock-tab  { padding: 7px 12px; font-size: .8125rem; }
}

.pagination-pages {
    display     : flex;
    align-items : center;
    gap         : 4px;
    flex-wrap   : wrap;
}

.pagination-page {
    min-width     : 34px;
    height        : 34px;
    display       : flex;
    align-items   : center;
    justify-content: center;
    border-radius : var(--radius);
    font-size     : .875rem;
    font-weight   : 500;
    color         : var(--c-dark);
    border        : 1px solid var(--c-border);
    background    : var(--c-white);
    transition    : background var(--transition), border-color var(--transition);
    padding-inline: 6px;
}

.pagination-page:hover {
    background    : var(--c-bg);
    border-color  : var(--c-dark);
}

.pagination-page--current {
    background    : var(--c-primary);
    border-color  : var(--c-primary);
    color         : var(--c-dark);
    font-weight   : 700;
    cursor        : default;
}

.pagination-page--current:hover {
    background   : var(--c-primary);
    border-color : var(--c-primary);
}

.pagination-ellipsis {
    color     : var(--c-muted);
    font-size : .875rem;
    padding   : 0 4px;
}

/* ════════════════════════════════════════════════════════════════
   WIZARD IMMOBILISATION BOVINS
════════════════════════════════════════════════════════════════ */

/* ── En-tête du wizard ───────────────────────────────────────────────────── */
.wizard-header {
    margin-bottom : 16px;
}

.wizard-header__meta {
    display     : flex;
    align-items : center;
    flex-wrap   : wrap;
    gap         : 8px;
}

/* ── Onglets de navigation ───────────────────────────────────────────────── */
.wizard-tabs {
    display        : flex;
    align-items    : stretch;
    flex-wrap      : wrap;
    gap            : 2px;
    background     : var(--c-border);
    border-radius  : var(--radius) var(--radius) 0 0;
    padding        : 2px 2px 0;
    margin-bottom  : 0;
    border-bottom  : 2px solid var(--c-primary);
    overflow-x     : auto;
}

.wizard-tab {
    display        : flex;
    align-items    : center;
    gap            : 6px;
    padding        : 9px 14px;
    font-size      : .8125rem;
    font-weight    : 600;
    color          : var(--c-muted);
    background     : var(--c-bg);
    border-radius  : var(--radius) var(--radius) 0 0;
    white-space    : nowrap;
    text-decoration: none;
    transition     : background var(--transition), color var(--transition);
    border         : 1px solid transparent;
    border-bottom  : none;
    cursor         : default;
}

a.wizard-tab {
    cursor : pointer;
}

a.wizard-tab:hover {
    background : var(--c-white);
    color      : var(--c-dark);
}

.wizard-tab--active {
    background   : var(--c-white);
    color        : var(--c-dark);
    border-color : var(--c-border);
    margin-bottom: -2px;
    padding-bottom: 11px;
}

.wizard-tab--done .wizard-tab__num {
    color : var(--c-success);
}

.wizard-tab--locked {
    opacity : .45;
    cursor  : not-allowed;
}

.wizard-tab__num {
    display         : flex;
    align-items     : center;
    justify-content : center;
    width           : 20px;
    height          : 20px;
    border-radius   : 50%;
    background      : var(--c-border);
    font-size       : .6875rem;
    font-weight     : 800;
    flex-shrink     : 0;
    color           : var(--c-muted);
    transition      : background var(--transition), color var(--transition);
}

.wizard-tab--active .wizard-tab__num {
    background : var(--c-primary);
    color      : var(--c-dark);
}

.wizard-tab__label {
    display : block;
}

/* ── Panneau principal (section wrapper) ─────────────────────────────────── */
.wizard-panel {
    border-radius : 0 0 var(--radius) var(--radius) !important;
    border-top    : none !important;
}

/* =================================================================
   DASHBOARD — Widgets
================================================================= */

/* Barre d'outils */
.dash-toolbar {
    display       : flex;
    align-items   : center;
    gap           : 10px;
    margin-bottom : 18px;
    flex-wrap     : wrap;
}

/* Grille de widgets */
.dash-grid {
    display  : flex;
    flex-wrap: wrap;
    gap      : 18px;
    align-items: flex-start;
}

/* Widget de base */
.dash-widget {
    background    : var(--c-white);
    border-radius : var(--radius);
    border-top    : 4px solid var(--c-primary);
    box-shadow    : var(--shadow-sm);
    position      : relative;
    overflow      : hidden;
    min-height    : 100px;
    transition    : box-shadow var(--transition);
}
.dash-widget:hover {
    box-shadow : var(--shadow-md);
}
.dash-widget--full { flex: 0 0 100%; }
.dash-widget--half { flex: 0 0 calc(50% - 9px); }

/* SortableJS états */
.dash-widget--ghost   { opacity: .4; }
.dash-widget--chosen  { box-shadow: 0 0 0 2px var(--c-primary); }

/* Poignée de déplacement */
.dash-widget__handle {
    position   : absolute;
    top        : 8px;
    left       : 8px;
    cursor     : grab;
    color      : var(--c-muted);
    display    : none;
    align-items: center;
    z-index    : 5;
}
.dash-widget__handle:active { cursor: grabbing; }

/* Actions (config + suppr) */
.dash-widget__actions {
    position   : absolute;
    top        : 6px;
    right      : 8px;
    display    : none;
    gap        : 4px;
    z-index    : 5;
}

/* Boutons inline dans un widget */
.dash-widget__btn {
    background    : transparent;
    border        : 1px solid var(--c-border);
    border-radius : var(--radius);
    cursor        : pointer;
    font-size     : .78rem;
    padding       : 2px 6px;
    color         : var(--c-muted);
    transition    : background var(--transition);
}
.dash-widget__btn:hover              { background: var(--c-bg); color: var(--c-text); }
.dash-widget__btn--remove            { border-color: var(--c-error); color: var(--c-error); }
.dash-widget__btn--remove:hover      { background: var(--c-error); color: #fff; }

/* Corps du widget */
.dash-widget__body {
    padding : 16px;
}

/* Texte vide */
.dash-widget__empty {
    color      : var(--c-muted);
    font-style : italic;
    font-size  : .875rem;
    text-align : center;
    padding    : 12px 0;
}

/* Placeholder (widget nouvellement ajouté, non encore sauvegardé) */
.dash-widget__placeholder {
    text-align : center;
    color      : var(--c-muted);
    font-style : italic;
    padding    : 24px 16px;
    border     : 2px dashed var(--c-border);
    border-radius : var(--radius);
    font-size  : .875rem;
}

/* Lien "Voir tout" */
.dash-widget__link {
    display      : block;
    margin-top   : 12px;
    font-size    : .8rem;
    color        : var(--c-accent);
    text-decoration: none;
}
.dash-widget__link:hover { text-decoration: underline; }

/* ── Bloc Bienvenue ──────────────────────────────────────────────── */
.dash-welcome {
    display     : flex;
    align-items : center;
    gap         : 16px;
    flex-wrap   : wrap;
}
.dash-welcome__text {
    flex       : 1 1 200px;
    font-size  : 1rem;
    color      : var(--c-text);
}

/* ── KPI ─────────────────────────────────────────────────────────── */
.dash-kpi-grid {
    display : flex;
    gap     : 12px;
    flex-wrap: wrap;
}
.dash-kpi {
    flex          : 1 1 120px;
    background    : var(--c-bg);
    border-radius : var(--radius);
    padding       : 12px 14px;
    text-align    : center;
}
.dash-kpi--accent { background: rgba(248,179,50,.12); }
.dash-kpi--amber  { background: rgba(241,138,9,.12); }
.dash-kpi__val {
    display    : block;
    font-size  : 1.6rem;
    font-weight: 700;
    color      : var(--c-primary);
}
.dash-kpi--accent .dash-kpi__val { color: var(--c-secondary); }
.dash-kpi--amber  .dash-kpi__val { color: var(--c-accent); }
.dash-kpi__lbl {
    display   : block;
    font-size : .78rem;
    color     : var(--c-muted);
}
.dash-kpi-link {
    text-decoration : none;
}
.dash-kpi-link:hover .dash-kpi {
    box-shadow : var(--shadow-sm);
}

/* ── Stock ───────────────────────────────────────────────────────── */
.dash-stock-list {
    list-style : none;
    font-size  : .85rem;
}
.dash-stock-list__item {
    display         : flex;
    justify-content : space-between;
    padding         : 5px 0;
    border-bottom   : 1px solid var(--c-border);
}
.dash-stock-list__item:last-child { border-bottom: none; }
.dash-stock-list__item--danger    { color: var(--c-error); }
.dash-stock-list__qty             { font-weight: 600; }

/* ── Actualités ──────────────────────────────────────────────────── */
.dash-news-header {
    display         : flex;
    justify-content : space-between;
    align-items     : center;
    padding-left    : 10px;
    margin-bottom   : 10px;
    font-size       : .9rem;
    border-left     : 4px solid var(--c-primary); /* surcharge inline par pole-color */
}
.dash-news-header__more {
    font-size  : .78rem;
    color      : var(--c-accent);
    text-decoration: none;
}
.dash-news-list {
    list-style : none;
    font-size  : .85rem;
}
.dash-news-list__item {
    display         : flex;
    justify-content : space-between;
    align-items     : baseline;
    gap             : 8px;
    padding         : 5px 0;
    border-bottom   : 1px solid var(--c-border);
}
.dash-news-list__item:last-child { border-bottom: none; }
.dash-news-list__title {
    text-decoration : none;
    color           : var(--c-text);
    flex            : 1;
    white-space     : nowrap;
    overflow        : hidden;
    text-overflow   : ellipsis;
}
.dash-news-list__title:hover { color: var(--c-accent); }
.dash-news-list__date {
    color     : var(--c-muted);
    font-size : .75rem;
    white-space: nowrap;
}

/* ── Raccourcis ──────────────────────────────────────────────────── */
.dash-shortcuts {
    display  : flex;
    flex-wrap: wrap;
    gap      : 8px;
}
.dash-shortcut {
    display        : flex;
    flex-direction : column;
    align-items    : center;
    gap            : 4px;
    padding        : 10px 12px;
    background     : var(--c-bg);
    border-radius  : var(--radius);
    text-decoration: none;
    color          : var(--c-text);
    font-size      : .78rem;
    border         : 1px solid var(--c-border);
    transition     : box-shadow var(--transition);
    min-width      : 72px;
    text-align     : center;
}
.dash-shortcut:hover          { box-shadow: var(--shadow-sm); border-color: var(--c-primary); }
.dash-shortcut__icon          { font-size: 1.4rem; }
.dash-shortcut__label         { color: var(--c-muted); line-height: 1.2; }

/* ── Trombinoscope mini ──────────────────────────────────────────── */
.dash-trombi {
    display        : flex;
    flex-direction : column;
    gap            : 8px;
}
.dash-trombi__results {
    background    : var(--c-white);
    border        : 1px solid var(--c-border);
    border-radius : var(--radius);
    box-shadow    : var(--shadow-md);
    max-height    : 200px;
    overflow-y    : auto;
}
.trombi-mini-result {
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    gap             : 10px;
    padding         : 7px 12px;
    text-decoration : none;
    color           : var(--c-text);
    border-bottom   : 1px solid var(--c-border);
    font-size       : .85rem;
}
.trombi-mini-result:last-child   { border-bottom: none; }
.trombi-mini-result:hover        { background: var(--c-bg); }
.trombi-mini-result__name        { font-weight: 500; }
.trombi-mini-result__info        { color: var(--c-muted); font-size: .78rem; }

/* ── Carte d'ajout de widget ─────────────────────────────────────── */
.add-widget-grid {
    display               : grid;
    grid-template-columns : repeat(auto-fill, minmax(140px, 1fr));
    gap                   : 10px;
}
.add-widget-card {
    display        : flex;
    flex-direction : column;
    align-items    : center;
    padding        : 14px 10px;
    background     : var(--c-bg);
    border         : 2px solid var(--c-border);
    border-radius  : var(--radius);
    cursor         : pointer;
    text-align     : center;
    gap            : 6px;
    transition     : border-color var(--transition), box-shadow var(--transition);
}
.add-widget-card:hover:not(:disabled) {
    border-color : var(--c-primary);
}
.add-widget-card--selected {
    border-color : var(--c-primary);
    background   : rgba(248,179,50,.08);
}
.add-widget-card--disabled {
    opacity : .45;
    cursor  : not-allowed;
}
.add-widget-card__label  { font-size: .875rem; font-weight: 500; }
.add-widget-card__width  { font-size: .75rem;  color: var(--c-muted); }
.add-widget-card__reason { font-size: .72rem;  color: var(--c-error);  font-style: italic; }

/* ── Lignes de raccourcis (config modal) ─────────────────────────── */
.shortcut-row {
    display     : flex;
    gap         : 8px;
    align-items : center;
    margin-bottom: 8px;
}
.shortcut-row .form-control { margin-bottom: 0; }

/* ── Zones vides du dashboard ────────────────────────────────────── */
.dash-empty {
    width       : 100%;
    padding     : 40px;
    text-align  : center;
    color       : var(--c-muted);
    font-size   : .9rem;
    background  : var(--c-white);
    border-radius: var(--radius);
    border      : 2px dashed var(--c-border);
}

/* ── Mode responsive ─────────────────────────────────────────────── */
@media (max-width: 720px) {
    .dash-widget--half { flex: 0 0 100%; }
}

/* =================================================================
   TROMBINOSCOPE
================================================================= */

/* ── Barre d'outils trombinoscope ────────────────────────── */
.trombi-toolbar {
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    gap             : 12px;
    margin-bottom   : 20px;
    flex-wrap       : wrap;
}

/* Groupe gauche : champ de recherche + filtres */
.trombi-filters {
    display     : flex;
    align-items : center;
    gap         : 8px;
    flex        : 1 1 auto;
    flex-wrap   : wrap;
}

.trombi-search-wrap {
    position : relative;
    flex     : 1 1 220px;
    max-width: 360px;
}
.trombi-search-icon {
    position   : absolute;
    left       : 10px;
    top        : 50%;
    transform  : translateY(-50%);
    color      : var(--c-muted);
    pointer-events: none;
    height     : 24px;
}
.trombi-search {
    width         : 100%;
    padding       : 8px 12px 8px 36px;
    border        : 1px solid var(--c-border);
    border-radius : var(--radius);
    font-size     : .9rem;
    background    : var(--c-white);
    transition    : border-color var(--transition);
}
.trombi-search:focus {
    outline      : none;
    border-color : var(--c-primary);
}
/* Groupe droit : compteur + bouton sync */
.trombi-toolbar__right {
    display     : flex;
    align-items : center;
    gap         : 12px;
    flex-shrink : 0;
}

.trombi-count {
    font-size   : .85rem;
    color       : var(--c-muted);
    white-space : nowrap;
}

/* Grille de cartes */
.trombi-grid {
    display               : grid;
    grid-template-columns : repeat(auto-fill, minmax(190px, 1fr));
    gap                   : 16px;
}

/* Carte masquée par le filtre JS — doit être explicité car display:flex
   sur .trombi-card prend le dessus sur l'attribut [hidden] du navigateur */
.trombi-card[hidden] { display: none !important; }

/* Carte collaborateur */
.trombi-card {
    background    : var(--c-white);
    border-radius : var(--radius);
    box-shadow    : var(--shadow-sm);
    overflow      : hidden;
    cursor        : pointer;
    transition    : transform var(--transition), box-shadow var(--transition);
    display       : flex;
    flex-direction: column;
    align-items   : center;
    padding       : 18px 12px 14px;
    text-align    : center;
    gap           : 8px;
}
.trombi-card:hover {
    transform  : translateY(-2px);
    box-shadow : var(--shadow-md);
}
.trombi-card--highlight {
    border : 2px solid var(--c-primary);
}

/* Photo / initiales */
.trombi-card__photo-wrap {
    width         : 72px;
    height        : 72px;
    border-radius : 50%;
    overflow      : hidden;
    flex-shrink   : 0;
    position      : relative;
}
.trombi-card__photo {
    width      : 100%;
    height     : 100%;
    object-fit : cover;
    display    : block;
}
.trombi-card__initials {
    position        : absolute;
    inset           : 0;
    display         : flex;
    align-items     : center;
    justify-content : center;
    color           : #fff;
    font-weight     : 700;
    font-size       : 1.3rem;
    border-radius   : 50%;
}

/* Infos texte */
.trombi-card__info { width: 100%; }
.trombi-card__name {
    font-weight : 600;
    font-size   : .9rem;
    color       : var(--c-text);
    margin-bottom: 2px;
}
.trombi-card__job {
    font-size : .78rem;
    color     : var(--c-muted);
}
.trombi-card__dept {
    font-size  : .75rem;
    color      : var(--c-muted);
    font-style : italic;
}

/* Résultat vide */
.trombi-no-result {
    width       : 100%;
    text-align  : center;
    color       : var(--c-muted);
    padding     : 40px 0;
    font-style  : italic;
}

/* Modal fiche collaborateur */
.modal--trombi { max-width: 600px; }

.trombi-modal-body {
    display  : flex;
    gap      : 24px;
    flex-wrap: wrap;
}
.trombi-modal-photo-col {
    display        : flex;
    flex-direction : column;
    align-items    : center;
    gap            : 12px;
    flex           : 0 0 120px;
}
.trombi-modal-photo-wrap {
    width         : 110px;
    height        : 110px;
    border-radius : 50%;
    overflow      : hidden;
    position      : relative;
    background    : var(--c-bg);
}
.trombi-modal-photo {
    width      : 100%;
    height     : 100%;
    object-fit : cover;
}
.trombi-modal-initials {
    position        : absolute;
    inset           : 0;
    display         : none;
    align-items     : center;
    justify-content : center;
    color           : #fff;
    font-weight     : 700;
    font-size       : 2rem;
    border-radius   : 50%;
}
.trombi-modal-info-col  { flex: 1 1 200px; }

.trombi-detail-list {
    display               : grid;
    grid-template-columns : auto 1fr;
    gap                   : 6px 16px;
    font-size             : .9rem;
}
.trombi-detail-list dt {
    color       : var(--c-muted);
    font-weight : 500;
    white-space : nowrap;
}
.trombi-detail-list dd {
    color : var(--c-text);
}

/* =================================================================
   ACTUALITÉS
================================================================= */

/* Barre de pôles */
.news-pole-bar {
    display     : flex;
    align-items : center;
    gap         : 6px;
    flex-wrap   : wrap;
    margin-bottom : 20px;
    border-bottom : 1px solid var(--c-border);
    padding-bottom: 12px;
}
.news-pole-tab {
    padding       : 6px 14px;
    border-radius : 20px;
    text-decoration: none;
    font-size     : .85rem;
    color         : var(--c-muted);
    border        : 1px solid var(--c-border);
    transition    : background var(--transition), color var(--transition);
    white-space   : nowrap;
}
.news-pole-tab:hover { background: var(--c-bg); color: var(--c-text); }
.news-pole-tab--active {
    background    : var(--pole-color, var(--c-primary));
    color         : #fff;
    border-color  : var(--pole-color, var(--c-primary));
}
.news-create-btn {
    margin-left : auto;
}

/* Badge pôle (vue détail) */
.news-pole-badge {
    display       : inline-block;
    padding       : 3px 10px;
    border-radius : 12px;
    font-size     : .78rem;
    color         : #fff;
    margin-bottom : 8px;
}

/* Grille d'articles */
.news-grid {
    display               : grid;
    grid-template-columns : repeat(auto-fill, minmax(280px, 1fr));
    gap                   : 18px;
}

/* Carte article */
.news-card {
    background    : var(--c-white);
    border-radius : var(--radius);
    border-left   : 4px solid var(--pole-color, var(--c-primary));
    box-shadow    : var(--shadow-sm);
    padding       : 16px 18px;
    display       : flex;
    flex-direction: column;
    gap           : 8px;
}
.news-card__pole {
    font-size  : .75rem;
    color      : var(--c-muted);
    font-weight: 500;
}
.news-card__title {
    font-size  : 1rem;
    font-weight: 600;
    margin     : 0;
}
.news-card__link {
    text-decoration : none;
    color           : var(--c-text);
}
.news-card__link:hover { color: var(--c-accent); }
.news-card__excerpt {
    font-size : .85rem;
    color     : var(--c-muted);
    flex      : 1;
}
.news-card__footer {
    display         : flex;
    align-items     : center;
    justify-content : space-between;
    font-size       : .78rem;
    color           : var(--c-muted);
    border-top      : 1px solid var(--c-border);
    padding-top     : 8px;
    margin-top      : auto;
}

/* Vue détail d'un article */
.news-back-link {
    display       : inline-block;
    font-size     : .85rem;
    color         : var(--c-accent);
    text-decoration: none;
    margin-bottom : 10px;
}
.news-back-link:hover { text-decoration: underline; }

.news-article-detail {
    max-width     : 800px;
    background    : var(--c-white);
    border-radius : var(--radius);
    box-shadow    : var(--shadow-sm);
    padding       : 28px 32px;
}
.news-article-detail__title {
    font-size    : 1.5rem;
    font-weight  : 700;
    margin-bottom: 6px;
    line-height  : 1.3;
}
.news-article-detail__meta {
    display     : flex;
    align-items : center;
    gap         : 8px;
    font-size   : .82rem;
    color       : var(--c-muted);
    margin-bottom: 18px;
}
.news-article-detail__body {
    line-height : 1.8;
    font-size   : .95rem;
}
.news-article-detail__body img {
    max-width     : 100%;
    height        : auto;
    border-radius : var(--radius);
    margin        : 12px 0;
}
.news-article-detail__body h2,
.news-article-detail__body h3,
.news-article-detail__body h4 { margin: 18px 0 8px; }
.news-article-detail__body p  { margin-bottom: 12px; }
.news-article-detail__body ul,
.news-article-detail__body ol { padding-left: 24px; margin-bottom: 12px; }
.news-article-detail__body blockquote {
    border-left  : 4px solid var(--c-primary);
    padding-left : 16px;
    color        : var(--c-muted);
    font-style   : italic;
    margin       : 12px 0;
}

/* Vide */
.news-empty {
    text-align  : center;
    padding     : 48px 24px;
    color       : var(--c-muted);
    display     : flex;
    flex-direction: column;
    align-items : center;
    gap         : 14px;
}

/* Éditeur (layout) */
.news-editor-wrap { max-width: 1100px; }

.news-editor-layout {
    display  : flex;
    gap      : 20px;
    align-items: flex-start;
}
.news-editor-main { flex: 1 1 0; min-width: 0; }

.news-editor-sidebar {
    flex      : 0 0 260px;
    display   : flex;
    flex-direction: column;
    gap       : 14px;
}
.news-editor-card {
    background    : var(--c-white);
    border-radius : var(--radius);
    box-shadow    : var(--shadow-sm);
    padding       : 16px 18px;
}
.news-editor-card__title {
    font-size    : .8rem;
    font-weight  : 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color        : var(--c-muted);
    margin-bottom: 12px;
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 6px;
}
.news-editor-card--muted { opacity: .8; }

.news-editor-actions {
    display        : flex;
    flex-direction : column;
    gap            : 8px;
}

/* Conteneur Quill */
.news-quill-container {
    border        : 1px solid var(--c-border);
    border-radius : 0 0 var(--radius) var(--radius);
    background    : var(--c-white);
    min-height    : 320px;
}
.ql-toolbar { border-radius: var(--radius) var(--radius) 0 0 !important; }
.ql-container { font-family: inherit !important; font-size: .9375rem !important; }

/* Badges statut */
.news-status-badge {
    display       : inline-block;
    padding       : 3px 10px;
    border-radius : 12px;
    font-size     : .78rem;
    font-weight   : 500;
}
.news-status-badge--draft     { background: rgba(135,135,138,.12); color: var(--c-muted); }
.news-status-badge--published { background: rgba(34,160,107,.12);  color: var(--c-success); }
.news-status-badge--archived  { background: rgba(217,48,37,.12);   color: var(--c-error); }

/* Admin — pôles */
/* ═══════════════════════════════════════════════════════════════════════════
   PARTAGE DE FICHIERS
═══════════════════════════════════════════════════════════════════════════ */

/* ── Formulaire de création ──────────────────────────────────────────────── */

/* Section avec titre iconé */
.form-section {
    padding        : 20px 24px;
    border-bottom  : 1px solid var(--c-border);
}
.form-section:last-of-type { border-bottom: none; }
.form-section__title {
    display     : flex;
    align-items : center;
    gap         : 8px;
    font-size   : .95rem;
    font-weight : 600;
    color       : var(--c-text);
    margin      : 0 0 16px;
}

/* Zone de dépôt drag & drop */
.fileshare-dropzone {
    border        : 2px dashed var(--c-border);
    border-radius : var(--radius);
    cursor        : pointer;
    transition    : border-color var(--transition), background var(--transition);
    min-height    : 140px;
    display       : flex;
    align-items   : center;
    justify-content: center;
    padding       : 24px;
    text-align    : center;
    position      : relative;
}
.fileshare-dropzone:hover,
.fileshare-dropzone:focus-visible,
.fileshare-dropzone--over {
    border-color : var(--c-primary);
    background   : rgba(248, 179, 50, .05);
    outline      : none;
}
.fileshare-dropzone__input {
    position : absolute;
    width    : 1px;
    height   : 1px;
    opacity  : 0;
    pointer-events : none;
}
.fileshare-dropzone__icon  { color: var(--c-muted); margin-bottom: 8px; display: block; }
.fileshare-dropzone__text  { font-size: .9rem; color: var(--c-text); margin: 0 0 4px; }
.fileshare-dropzone__hint  { font-size: .8rem; color: var(--c-muted); margin: 0; }
.fileshare-dropzone__add   {
    font-size    : .85rem;
    color        : var(--c-muted);
    margin-top   : 8px;
    padding-top  : 8px;
    border-top   : 1px solid var(--c-border);
    width        : 100%;
    text-align   : center;
}

/* Liste des fichiers sélectionnés */
.fileshare-filelist {
    list-style : none;
    margin     : 12px 0 0;
    padding    : 0;
    display    : flex;
    flex-direction: column;
    gap        : 6px;
}
.fileshare-filelist__item {
    display        : flex;
    align-items    : center;
    gap            : 8px;
    background     : var(--c-bg);
    border         : 1px solid var(--c-border);
    border-radius  : var(--radius);
    padding        : 8px 10px;
    font-size      : .88rem;
}
.fileshare-filelist__item--error {
    border-color : var(--c-error);
    background   : rgba(217, 48, 37, .05);
}
.fileshare-filelist__icon  { color: var(--c-muted); flex-shrink: 0; }
.fileshare-filelist__name  { flex: 1; word-break: break-word; }
.fileshare-filelist__size  { color: var(--c-muted); white-space: nowrap; font-size: .8rem; }
.fileshare-filelist__err   { color: var(--c-error); font-size: .8rem; white-space: nowrap; }
.fileshare-filelist__remove {
    flex-shrink : 0;
    color       : var(--c-muted);
    padding     : 4px;
    line-height : 0;
}
.fileshare-filelist__remove:hover { color: var(--c-error); }

/* Sliders durée / accès */
.fileshare-slider-wrap {
    display     : flex;
    align-items : center;
    gap         : 10px;
}
.fileshare-slider {
    flex       : 1;
    accent-color: var(--c-primary);
    height     : 4px;
    cursor     : pointer;
}
.fileshare-number-input {
    width      : 72px;
    flex-shrink: 0;
    text-align : center;
}
.fileshare-unit {
    font-size  : .85rem;
    color      : var(--c-muted);
    flex-shrink: 0;
}

/* Rangée destinataire */
.fileshare-recipient-row {
    display        : flex;
    align-items    : center;
    gap            : 8px;
    margin-bottom  : 8px;
}
.fileshare-recipient-row .form-control { flex: 1; }

/* ── Panneau succès ──────────────────────────────────────────────────────── */
.fileshare-success {
    text-align : center;
    padding    : 40px 24px;
}
.fileshare-success__icon {
    display         : flex;
    justify-content : center;
    margin-bottom   : 16px;
    color           : var(--c-success);
}
.fileshare-success__title {
    font-size   : 1.4rem;
    font-weight : 700;
    color       : var(--c-text);
    margin      : 0 0 8px;
}
.fileshare-success__meta {
    color        : var(--c-muted);
    font-size    : .9rem;
    margin       : 0 0 24px;
    display      : flex;
    align-items  : center;
    justify-content: center;
    gap          : 8px;
    flex-wrap    : wrap;
}
.fileshare-link-box {
    text-align   : left;
    max-width    : 540px;
    margin       : 0 auto 24px;
}
.fileshare-link-row {
    display  : flex;
    gap      : 8px;
    margin-top: 6px;
}
.fileshare-link-input {
    flex         : 1;
    font-family  : monospace;
    font-size    : .88rem;
    color        : var(--c-muted);
}
.fileshare-success__actions {
    display         : flex;
    justify-content : center;
    gap             : 12px;
    flex-wrap       : wrap;
}

/* ── Page publique de téléchargement ─────────────────────────────────────── */
.public-share__icon {
    display         : flex;
    justify-content : center;
    margin-bottom   : 16px;
    color           : var(--c-primary);
}
.public-share__icon--error { color: var(--c-error); }

.public-share__header {
    display        : flex;
    align-items    : flex-start;
    gap            : 12px;
    background     : var(--c-bg);
    border         : 1px solid var(--c-border);
    border-radius  : var(--radius);
    padding        : 14px 16px;
    margin-bottom  : 16px;
}
.public-share__share-icon { color: var(--c-primary); flex-shrink: 0; margin-top: 2px; }
.public-share__sender     { margin: 0 0 2px; font-size: .95rem; }
.public-share__expires    { margin: 0; font-size: .82rem; color: var(--c-muted); }

.public-share__message {
    border-left  : 3px solid var(--c-primary);
    margin       : 0 0 16px;
    padding      : 10px 14px;
    background   : rgba(248, 179, 50, .06);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style   : italic;
    font-size    : .9rem;
    color        : var(--c-text);
}

.public-share__files-title {
    font-size   : .9rem;
    font-weight : 600;
    color       : var(--c-muted);
    margin      : 0 0 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.public-share__filelist {
    list-style  : none;
    margin      : 0 0 8px;
    padding     : 0;
    display     : flex;
    flex-direction: column;
    gap         : 8px;
}
.public-share__file {
    display        : flex;
    align-items    : center;
    justify-content: space-between;
    gap            : 12px;
    background     : var(--c-bg);
    border         : 1px solid var(--c-border);
    border-radius  : var(--radius);
    padding        : 10px 14px;
}
.public-share__file-info {
    display    : flex;
    align-items: center;
    gap        : 10px;
    min-width  : 0;
}
.public-share__file-icon { color: var(--c-muted); flex-shrink: 0; }
.public-share__file-name {
    margin        : 0 0 2px;
    font-size     : .9rem;
    font-weight   : 500;
    word-break    : break-word;
}
.public-share__file-size { margin: 0; font-size: .78rem; color: var(--c-muted); }
.public-share__dl-btn    { flex-shrink: 0; }

.public-share__key-form  { margin-top: 16px; }

/* ── Historique admin ────────────────────────────────────────────────────── */
.fileshare-history-filters {
    display     : flex;
    align-items : flex-end;
    gap         : 12px;
    flex-wrap   : wrap;
    padding     : 16px 24px;
}

/* Admin Farméo */
.news-pole-dot {
    display       : inline-block;
    width         : 10px;
    height        : 10px;
    border-radius : 50%;
    margin-right  : 6px;
    flex-shrink   : 0;
}

/* =================================================================
   TOAST NOTIFICATIONS
================================================================= */
.toast {
    position      : fixed;
    bottom        : 24px;
    right         : 24px;
    z-index       : 9999;
    padding       : 12px 20px;
    background    : var(--c-dark);
    color         : #fff;
    border-radius : var(--radius);
    box-shadow    : var(--shadow-md);
    font-size     : .875rem;
    max-width     : 380px;
    opacity       : 0;
    transform     : translateY(12px);
    transition    : opacity .25s ease, transform .25s ease;
    pointer-events: none;
}
.toast--visible {
    opacity   : 1;
    transform : translateY(0);
}
.toast--success { background: var(--c-success); }
.toast--error   { background: var(--c-error);   }
.toast--info    { background: var(--c-accent);  }

/* =================================================================
   UTILITAIRES COMMUNS
================================================================= */
.btn--sm {
    padding   : 5px 12px;
    font-size : .8rem;
}
.btn--danger {
    background   : var(--c-error);
    color        : #fff;
    border       : none;
    border-radius: var(--radius);
    cursor       : pointer;
    transition   : background var(--transition);
}
.btn--danger:hover { background: #b71c1c; }

/* Grille de formulaire (2 colonnes) */
.form-row {
    display  : flex;
    gap      : 14px;
    flex-wrap: wrap;
}
.form-row .form-group { flex: 1 1 160px; }

/* ── Description de l'étape ─────────────────────────────────────────────── */
.wizard-step-desc {
    font-size     : .875rem;
    color         : var(--c-muted);
    margin-bottom : 16px;
    line-height   : 1.6;
}

/* ── Footer de formulaire (boutons Précédent / Suivant) ─────────────────── */
.wizard-form-footer {
    display         : flex;
    align-items     : center;
    gap             : 10px;
    margin-top      : 22px;
    padding-top     : 16px;
    border-top      : 1px solid var(--c-border);
}

.wizard-form-footer .btn--primary {
    margin-left : auto;
}

/* ── Upload zone (étape 2) ───────────────────────────────────────────────── */
.upload-zone {
    display         : flex;
    flex-direction  : column;
    align-items     : center;
    justify-content : center;
    gap             : 10px;
    border          : 2px dashed var(--c-border);
    border-radius   : var(--radius);
    padding         : 40px 24px;
    background      : var(--c-bg);
    cursor          : pointer;
    transition      : border-color var(--transition), background var(--transition);
    color           : var(--c-muted);
    text-align      : center;
}

.upload-zone:hover,
.upload-zone--drag {
    border-color : var(--c-primary);
    background   : rgba(248, 179, 50, .05);
}

.upload-zone--ready {
    border-color : var(--c-success);
    background   : rgba(34, 160, 107, .04);
}

.upload-zone__text {
    font-size : .9375rem;
    color     : var(--c-dark);
}

.upload-zone__link {
    color           : var(--c-secondary);
    text-decoration : underline;
    cursor          : pointer;
    font-weight     : 600;
}

.upload-zone__hint {
    font-size : .8125rem;
}

.upload-zone__filename {
    font-size   : .8125rem;
    font-weight : 600;
    color       : var(--c-success);
    font-family : monospace;
}

/* ── Tableau des bovins (étapes 3-8) ─────────────────────────────────────── */

/* Ligne mise en évidence quand cochée */
.immo-row--active {
    background : rgba(248, 179, 50, .07) !important;
}

/* Numéro d'identification */
.immo-num {
    font-family : monospace;
    font-size   : .8125rem;
    color       : var(--c-dark);
    background  : transparent;
}

/* Toolbar au-dessus du tableau (sélectionner tout) */
.wizard-table-toolbar {
    display       : flex;
    align-items   : center;
    gap           : 10px;
    margin-bottom : 10px;
}

/* État vide d'une étape sans bovins */
.wizard-empty {
    padding     : 40px;
    text-align  : center;
    color       : var(--c-muted);
    font-style  : italic;
    display     : flex;
    flex-direction: column;
    align-items : center;
    gap         : 14px;
}

/* ── Récapitulatif étape 9 ───────────────────────────────────────────────── */
.wizard-summary {
    background    : var(--c-bg);
    border-radius : var(--radius);
    padding       : 16px 20px;
    margin-bottom : 8px;
}

.wizard-summary__title {
    font-size     : .875rem;
    font-weight   : 700;
    color         : var(--c-dark);
    margin-bottom : 14px;
}

/* tfoot du tableau récapitulatif */
.wizard-panel tfoot td {
    padding    : 10px 16px;
    border-top : 2px solid var(--c-border);
    background : var(--c-bg);
}

/* ── Accessibilité ───────────────────────────────────────────────────────── */
.sr-only {
    position : absolute;
    width    : 1px;
    height   : 1px;
    padding  : 0;
    margin   : -1px;
    overflow : hidden;
    clip     : rect(0,0,0,0);
    border   : 0;
}

/* ── Interlocutor chip picker ─────────────────────────────────────────────── */
.iloc-picker {
    display         : flex;
    flex-wrap       : wrap;
    align-items     : center;
    gap             : 5px;
    border          : 1px solid var(--c-border);
    border-radius   : 6px;
    padding         : 5px 8px;
    background      : var(--c-white, #fff);
    cursor          : text;
    min-height      : 42px;
    transition      : border-color .15s;
}
.iloc-picker:focus-within { border-color: var(--c-primary); }
.iloc-chip {
    display         : inline-flex;
    align-items     : center;
    gap             : 4px;
    background      : var(--c-primary);
    color           : var(--c-dark);
    border-radius   : 20px;
    padding         : 3px 6px 3px 10px;
    font-size       : .8rem;
    font-weight     : 600;
    line-height     : 1.4;
    flex-shrink     : 0;
    user-select     : none;
}
.iloc-chip button {
    background  : none;
    border      : none;
    cursor      : pointer;
    padding     : 0 0 0 2px;
    font-size   : 1rem;
    line-height : 1;
    color       : var(--c-dark);
    opacity     : .55;
    display     : flex;
    align-items : center;
}
.iloc-chip button:hover { opacity: 1; }
.iloc-input-wrap {
    flex        : 1 1 120px;
    position    : relative;
    min-width   : 0;
}
.iloc-search {
    border      : none;
    outline     : none;
    background  : transparent;
    font-size   : .875rem;
    width       : 100%;
    padding     : 3px 0;
}
.iloc-dropdown {
    position    : absolute;
    top         : calc(100% + 4px);
    left        : 0;
    z-index     : 2000;
    background  : var(--c-white, #fff);
    border      : 1px solid var(--c-border);
    border-radius : 8px;
    box-shadow  : 0 4px 20px rgba(0,0,0,.12);
    min-width   : 220px;
    max-height  : 200px;
    overflow-y  : auto;
}
.iloc-option {
    padding     : 9px 14px;
    cursor      : pointer;
    font-size   : .875rem;
}
.iloc-option:hover { background: var(--c-bg); }

/* ── File attachment drop-zone ────────────────────────────────────────────── */
.attach-drop-zone {
    display         : block;
    position        : relative;
    border          : 2px dashed var(--c-border);
    border-radius   : 8px;
    padding         : 18px;
    text-align      : center;
    cursor          : pointer;
    font-size       : .875rem;
    color           : var(--c-muted);
    transition      : border-color .15s, background .15s, color .15s;
}
.attach-drop-zone:hover,
.attach-drop-zone.is-dragover {
    border-color : var(--c-primary);
    background   : rgba(0,0,0,.02);
    color        : var(--c-dark);
}
.attach-file-chip {
    display         : inline-flex;
    align-items     : center;
    gap             : 5px;
    background      : var(--c-bg);
    border          : 1px solid var(--c-border);
    border-radius   : 20px;
    padding         : 4px 10px;
    font-size       : .8rem;
    text-decoration : none;
    color           : inherit;
}
