/* ================================================================
   VRACO — Espace Client Design System
   "Warm Pet Boutique" — Organic, chaleureux, nature
   Fonts: Outfit (titres) + DM Sans (corps)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

/* ======================== DESIGN TOKENS ======================== */

:root {
    /* Layout */
    --sidebar-w: 260px;
    --topbar-h: 64px;
    --mobile-h: 68px;

    /* Couleurs — Palette Nature Chaleureuse */
    --green: #608E44;
    --green-dark: #4a7234;
    --green-light: #8bb86a;
    --green-bg: #eef5e7;
    --green-pale: #eef5e7;
    --green-glow: rgba(96,142,68,0.15);

    --cream: #FBF8F4;
    --cream-rich: #F5EFE6;

    --surface: #FFFFFF;
    --text: #2D2A26;
    --text-secondary: #6B6560;
    --muted: #7A756E;
    --border: #E8E2D9;
    --border-light: #F0EBE4;

    /* Rayons */
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 8px;

    /* Ombres — teinte chaude (brun) au lieu de noir */
    --shadow-xs: 0 1px 3px rgba(92,74,53,0.04);
    --shadow: 0 2px 8px rgba(92,74,53,0.06);
    --shadow-sm: 0 2px 8px rgba(92,74,53,0.06);
    --shadow-md: 0 4px 16px rgba(92,74,53,0.08);
    --shadow-lg: 0 8px 30px rgba(92,74,53,0.1);
    --shadow-green: 0 4px 14px rgba(96,142,68,0.25);

    /* Typographie */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

/* ======================== BASE ======================== */

*, *::before, *::after {
    font-family: var(--font-body);
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
}

/* ======================== LAYOUT SHELL ======================== */

.shell { display: flex; min-height: 100vh; }

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    /* margin-left : 14rem; */
}

@media (min-width: 768px) { .main { margin-left: var(--sidebar-w); } }

/* ======================== SIDEBAR ======================== */

.sidebar {
    width: var(--sidebar-w);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    background: linear-gradient(170deg, #2d4a1f 0%, #3d6629 35%, var(--green) 100%);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 85%, rgba(255,255,255,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 15%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

@media (max-width: 767.98px) { .sidebar { display: none; } }

/* Sidebar — Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 26px 22px 22px;
    text-decoration: none;
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo-wrap {
    width: 44px; height: 44px;
    border-radius: 13px;
    background: rgba(255,255,255,0.13);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.sidebar-brand:hover .sidebar-logo-wrap { transform: scale(1.05) rotate(-2deg); }

.sidebar-logo-wrap img { border-radius: 8px; }

.sidebar-brand-name {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    line-height: 1.2;
}

.sidebar-brand-sub {
    display: block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 2px;
}

/* Sidebar — Section label */
.sidebar-label {
    padding: 0 22px;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.3);
    margin: 18px 0 8px;
    position: relative;
    z-index: 1;
}

/* Sidebar — Navigation */
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 auto;
    position: relative;
    z-index: 1;
}

.snav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 2px 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.snav svg { flex-shrink: 0; opacity: 0.65; transition: opacity 0.2s, transform 0.2s; }
.snav:hover { background: rgba(255,255,255,0.08); color: #fff; }
.snav:hover svg { opacity: 1; transform: scale(1.06); }

.snav.active {
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-weight: 600;
}

.snav.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 22px;
    background: #fff;
    border-radius: 0 4px 4px 0;
}

.snav.active svg { opacity: 1; }

/* Sidebar — Footer / Logout */
.sidebar-foot {
    padding: 14px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    position: relative;
    z-index: 1;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 0 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-logout:hover { background: rgba(248,113,113,0.12); color: #fca5a5; }
.sidebar-logout svg { opacity: 0.6; }
.sidebar-logout:hover svg { opacity: 1; }

/* ======================== TOPBAR ======================== */

.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar-site, #SiteName {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 16px;
    border-radius: 50px;
    border: 1px solid var(--border-light);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.15s ease;
}

.topbar-user:hover {
    background: var(--cream);
    border-color: var(--border);
    box-shadow: var(--shadow-xs);
}

.topbar-name {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
}

.topbar-avatar { position: relative; width: 34px; height: 34px; }

.topbar-avatar img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--green-pale);
}

.avatar-dot {
    position: absolute;
    bottom: 0; right: 0;
    width: 10px; height: 10px;
    background: #22c55e;
    border: 2px solid var(--surface);
    border-radius: 50%;
}

@media (max-width: 767.98px) {
    .topbar { padding: 0 16px; height: 56px; }
    .topbar-site { font-size: 1rem; }
}

/* ======================== PAGE CONTENT ======================== */

#page-content {
    padding: 28px 28px 24px;
    flex: 1;
}

@media (max-width: 767.98px) {
    #page-content { padding: 20px 16px 16px; }
}

/* ======================== DROPDOWN ======================== */

.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 9999 !important;
    min-width: 200px;
    background: var(--surface);
}

.dropdown-header { padding: 8px 14px; }

.dd-label {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    transition: background 0.12s;
}

.dropdown-item:hover { background: var(--green-pale); color: var(--green-dark); }
.dd-logout { color: #dc2626 !important; }
.dd-logout:hover { background: #fef2f2 !important; color: #dc2626 !important; }
.dropdown-divider { border-color: var(--border-light); margin: 4px 0; }

/* ======================== MOBILE NAV (pilule flottante) ======================== */

.mobile-nav {
    position: fixed;
    bottom: 14px;
    left: 14px;
    right: 14px;
    height: var(--mobile-h);
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 22px;
    border: 1px solid rgba(232,226,217,0.5);
    box-shadow: 0 4px 24px rgba(92,74,53,0.1), 0 1px 3px rgba(92,74,53,0.05);
    display: none;
    align-items: center;
    justify-content: space-around;
    z-index: 1050;
    padding: 0 6px;
}

@media (max-width: 767.98px) { .mobile-nav { display: flex; } }

.mnav {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 0;
    text-decoration: none;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s;
    position: relative;
}

.mnav svg { transition: transform 0.2s; }

.mnav.active {
    color: var(--green);
    font-weight: 600;
}

.mnav.active svg { transform: scale(1.1); }

.mnav.active::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
}

.mnav:active { transform: scale(0.92); }

/* ======================== FOOTER ======================== */

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    padding: 20px 28px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-copy {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--muted);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--green);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover { text-decoration: underline; }

.footer-dot {
    width: 3px; height: 3px;
    background: var(--border);
    border-radius: 50%;
}

@media (max-width: 767.98px) {
    .site-footer { padding-bottom: calc(var(--mobile-h) + 34px); }
    .footer-inner { flex-direction: column; text-align: center; }
}

/* ======================== CARDS ======================== */

.card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
    background: var(--surface);
}

.card-header h2 {
    margin: 0 !important;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.card-header h2 svg { color: var(--green); flex-shrink: 0; opacity: 0.85; }

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%) !important;
    color: #fff !important;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.card-header.bg-primary::after {
    content: '';
    position: absolute;
    top: -40%; right: -10%;
    width: 110px; height: 110px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}

.card-header.bg-primary h2 { color: #fff; }
.card-header.bg-primary h2 svg { color: rgba(255,255,255,0.8); }

.card-body { padding: 22px; }

[class$="-primary"] { background-color: var(--green) !important; }

@media (max-width: 767.98px) {
    .card { border-radius: var(--radius-sm); }
    .card-header { padding: 15px 18px; }
    .card-body { padding: 18px; }
    .card-header h2 { font-size: 0.95rem; }
}

/* ======================== BOUTONS ======================== */

.btn-primary {
    background: var(--green) !important;
    border-color: var(--green) !important;
    border-radius: var(--radius-xs);
    font-family: var(--font-display);
    font-weight: 600;
    padding: 10px 24px;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--green-dark) !important;
    border-color: var(--green-dark) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-green);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline-secondary {
    border-color: var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-xs);
    font-family: var(--font-display);
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline-secondary:hover {
    background: var(--cream);
    border-color: var(--border);
    color: var(--text);
}

.btn-outline-danger {
    border-radius: var(--radius-xs);
    font-family: var(--font-display);
    font-weight: 500;
}

/* ======================== FORMULAIRES ======================== */

.form-control {
    border-radius: var(--radius-xs);
    border: 1.5px solid var(--border);
    padding: 10px 16px;
    font-size: 0.92rem;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px var(--green-glow);
    outline: none;
}

.form-label {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-check-input:checked {
    background-color: var(--green);
    border-color: var(--green);
}

.form-check-input:focus {
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px var(--green-glow);
}

.form-check-label {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* ======================== TABLEAUX ======================== */

.table {
    font-family: var(--font-body);
    font-size: 0.88rem;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--cream-rich);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    border-bottom: 2px solid var(--border);
    padding: 13px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 13px 16px;
    vertical-align: middle;
    border-color: var(--border-light);
    color: var(--text);
    transition: background 0.12s;
}

.table-striped > tbody > tr:nth-of-type(odd) > * { background: rgba(96,142,68,0.02); }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover > * { background: var(--green-pale) !important; }

.table-bordered { border: 1px solid var(--border-light); }
.table-bordered th,
.table-bordered td { border-color: var(--border-light); }

/* ======================== DATATABLES — Overrides ======================== */

.dataTables_wrapper {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text);
}

/* Barre du haut (longueur + recherche) */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-family: var(--font-body);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

/* Select (nombre d'entrées) */
.dataTables_wrapper .dataTables_length select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 6px 12px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: auto;
    margin: 0 4px;
}

.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px var(--green-glow);
    outline: none;
}

/* Input recherche */
.dataTables_wrapper .dataTables_filter input {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 8px 14px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-left: 8px;
    min-width: 200px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px var(--green-glow);
    outline: none;
}

.dataTables_wrapper .dataTables_filter input::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

/* Info (ex: "Affichage de 1 à 10 sur 50") */
.dataTables_wrapper .dataTables_info {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--muted);
    padding: 14px 0 4px;
}

/* Pagination */
.dataTables_wrapper .dataTables_paginate {
    padding: 14px 0 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    margin: 0 2px;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-xs) !important;
    background: var(--surface) !important;
    color: var(--text-secondary) !important;
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--green-pale) !important;
    border-color: var(--green-light) !important;
    color: var(--green-dark) !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--green) !important;
    border-color: var(--green) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: var(--shadow-green) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--green-dark) !important;
    border-color: var(--green-dark) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--border-light) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: var(--surface) !important;
    border-color: var(--border-light) !important;
    color: var(--text-secondary) !important;
}

/* Tri des colonnes */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    cursor: pointer;
    position: relative;
    padding-right: 28px !important;
}

table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    opacity: 0.4;
}

table.dataTable thead .sorting_asc::after { opacity: 0.8; color: var(--green); }
table.dataTable thead .sorting_desc::after { opacity: 0.8; color: var(--green); }

/* Message vide */
.dataTables_wrapper .dataTables_empty {
    text-align: center;
    padding: 40px 20px !important;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Responsive DataTables */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    background-color: var(--green) !important;
    border: none !important;
    box-shadow: 0 1px 4px rgba(96,142,68,0.3);
}

/* Style des boutons DataTables (export, etc.) */
.dt-buttons .dt-button {
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-xs) !important;
    background: var(--surface) !important;
    color: var(--text-secondary) !important;
    font-family: var(--font-display);
    font-size: 0.84rem;
    font-weight: 500;
    padding: 7px 16px !important;
    margin-right: 6px;
    transition: all 0.15s;
}

.dt-buttons .dt-button:hover {
    background: var(--green-pale) !important;
    border-color: var(--green-light) !important;
    color: var(--green-dark) !important;
}

@media (max-width: 767.98px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: left;
        float: none;
        margin-bottom: 12px;
    }
    .dataTables_wrapper .dataTables_filter input {
        min-width: 0;
        width: 100%;
        margin-left: 0;
        margin-top: 6px;
    }
    .dataTables_wrapper .dataTables_filter label {
        flex-direction: column;
        align-items: flex-start;
    }
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 0.78rem;
    }
}

/* ======================== SECTIONS ======================== */

section { margin-bottom: 22px; }

/* ======================== SECTION HEADERS ======================== */

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.section-title svg { color: var(--green); flex-shrink: 0; }

.section-link {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green);
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}

.section-link:hover { color: var(--green-dark); }

/* ======================== EMPTY STATES ======================== */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--muted);
}

.empty-state.small { padding: 32px 20px; }

.empty-icon { margin-bottom: 14px; color: var(--border); }

.empty-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 4px;
}

.empty-sub {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
}

/* ======================== SHARED CARD UI ======================== */

.tc-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--cream-rich);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

.tc-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green);
    text-decoration: none;
    padding: 5px 14px;
    border-radius: var(--radius-xs);
    background: var(--green-pale);
    border: 1px solid transparent;
    transition: all 0.15s;
}

.tc-download:hover { background: var(--green); color: #fff; }
.tc-download svg { flex-shrink: 0; }

.tc-no-ticket {
    font-size: 0.8rem;
    color: var(--muted);
    font-style: italic;
}

/* ======================== BADGES & ALERTS ======================== */

.badge {
    font-family: var(--font-display);
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
}

.alert {
    border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-size: 0.88rem;
}

.dlTicket { margin-top: 1rem; border-radius: var(--radius-xs); }

/* ======================== UTILITAIRES ======================== */

.text-gray-400 { color: #b7b9cc !important; }
.text-gray-600 { color: #858796 !important; }

.error-message-container {
    color: #dc2626;
    text-align: center;
    margin-top: 16px;
    font-size: 0.88rem;
    padding: 14px;
    background: #fef2f2;
    border-radius: var(--radius-xs);
    border: 1px solid #fecaca;
    font-family: var(--font-body);
}

/* ======================== PAGE HEADERS (réutilisé par toutes les pages) ======================== */

.page-header-bar { margin-bottom: 8px; }

.page-header-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 4px;
}

.page-header-title svg { color: var(--green); flex-shrink: 0; }

.page-header-sub {
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    margin: 0;
}

/* ======================== ANIMATIONS ======================== */

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#page-content > section {
    animation: fadeInUp 0.4s ease-out both;
}

#page-content > section:nth-child(2) { animation-delay: 0.06s; }
#page-content > section:nth-child(3) { animation-delay: 0.12s; }
#page-content > section:nth-child(4) { animation-delay: 0.18s; }
#page-content > section:nth-child(5) { animation-delay: 0.24s; }

/* ======================== SHIMMER PLACEHOLDERS ======================== */

.shimmer {
    background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

.placeholder-row { height: 38px; margin: 6px 0; border-radius: 6px; }

.placeholder-coupon {
    width: 100%; max-width: 260px;
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin: 10px auto;
}

.placeholder-badge { width: 80px; height: 20px; margin-bottom: 10px; }
.placeholder-title { width: 60%; height: 22px; margin-bottom: 10px; }
.placeholder-line { width: 90%; height: 14px; margin-bottom: 6px; }
.placeholder-line.short { width: 50%; }
.placeholder-map { width: 100%; height: 100%; border-radius: var(--radius-xs); }

/* ======================== SCROLLBAR ======================== */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

::selection { background: rgba(96,142,68,0.15); color: var(--text); }

/* ======================== PERFORMANCES ======================== */

.sidebar, .topbar, .mobile-nav { transform: translateZ(0); }
img { max-width: 100%; height: auto; }
a, button { touch-action: manipulation; }
