/* ============================================================
   GestionFin — Feuille de style principale
   ------------------------------------------------------------
   Organisation :
     1.  Variables
     2.  Reset & base
     3.  Utilitaires généraux
     4.  Layout (header, main, footer)
     5.  Boutons
     6.  Formulaires
     7.  Cartes
     8.  Messages (alertes, flash)
     9.  Pages d'authentification
     10. Page header (titre + actions)
     11. Badges & tags
     12. Tableaux de données
     13. Pagination
     14. États vides
     15. Catégories
     16. Transactions (stats + filtres)
     17. Notes
     18. Dashboard
     19. Exports
     20. Admin (recherche, identité, onglets)
     21. Page Contact
     22. Admin — Messages
     23. Bandeau contact (dashboard)
     24. Pages d'erreur
     25. Bouton flottant Contact
     26. Responsive
   ============================================================ */


/* ============================================================
   1. VARIABLES
   ============================================================ */
:root {
    /* Couleurs principales */
    --color-primary: #2563eb;
    --color-primary-d: #1d4ed8;
    --color-success: #16a34a;
    --color-danger: #dc2626;
    --color-warning: #f59e0b;
    --color-purple: #8b5cf6;

    /* Couleurs neutres */
    --color-bg: #f8fafc;
    --color-card: #ffffff;
    --color-border: #e2e8f0;
    --color-text: #1e293b;
    --color-muted: #64748b;
    --color-soft: #f1f5f9;

    /* Effets */
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.10);
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4 {
    line-height: 1.3;
    font-weight: 600;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* ============================================================
   3. UTILITAIRES GÉNÉRAUX
   ============================================================ */
/* --- Icônes SVG --- */
.icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    stroke-width: 2;
}

.icon-sm {
    width: 14px;
    height: 14px;
}

.icon-md {
    width: 20px;
    height: 20px;
}

.icon-lg {
    width: 24px;
    height: 24px;
}

.icon-xl {
    width: 32px;
    height: 32px;
}

.btn .icon {
    margin-right: 6px;
    vertical-align: -3px;
}

/* --- Conteneur --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* --- Alignements --- */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-muted);
}


/* ============================================================
   4. LAYOUT
   ============================================================ */
main.container {
    flex: 1;
    padding-top: 30px;
    padding-bottom: 40px;
}

/* --- En-tête --- */
.main-header {
    background: var(--color-card);
    border-bottom: 1px solid var(--color-border);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.main-nav .admin-link {
    color: var(--color-danger);
    font-weight: 600;
}

.user-info {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.btn-logout {
    color: var(--color-danger) !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
    padding: 6px;
    border-radius: var(--radius);
    transition: background 0.15s;
}

.menu-toggle:hover {
    background: var(--color-soft);
}

/* --- Pied de page --- */
.main-footer {
    background: var(--color-card);
    border-top: 1px solid var(--color-border);
    padding: 20px 0;
    text-align: center;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.footer-copyright {
    margin-bottom: 4px;
}

.footer-credit {
    font-size: 0.8rem;
    color: var(--color-muted);
}

.footer-credit strong {
    color: var(--color-text);
    font-weight: 600;
}

.footer-credit a {
    color: var(--color-primary);
    text-decoration: none;
}

.footer-credit a:hover {
    text-decoration: underline;
}


/* ============================================================
   5. BOUTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    line-height: 1.4;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--color-primary-d);
}

.btn-secondary {
    background: var(--color-border);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-danger {
    background: var(--color-danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-icon {
    padding: 6px 10px;
    font-size: 0.9rem;
    background: var(--color-soft);
    color: var(--color-text);
}

.btn-icon:hover {
    background: var(--color-border);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-disabled,
.btn:disabled {
    background: var(--color-border);
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.8;
}


/* ============================================================
   6. FORMULAIRES
   ============================================================ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--color-text);
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Astérisque des champs obligatoires */
.required {
    color: var(--color-danger);
    font-weight: 700;
    margin-left: 2px;
}

.form-hint {
    display: block;
    color: var(--color-muted);
    font-size: 0.85rem;
    margin-top: 6px;
    line-height: 1.4;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

/* --- Groupe de radios --- */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.radio-group-horizontal {
    flex-direction: row;
    gap: 15px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-weight: 400;
}

.radio-group-horizontal .radio-label {
    flex: 1;
    justify-content: center;
}

.radio-label:hover {
    border-color: var(--color-primary);
    background: #f0f7ff;
}

.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    accent-color: var(--color-primary);
}

/* --- Checkbox --- */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 400;
    transition: background 0.15s;
    line-height: 1.5;
}

.checkbox-label:hover {
    background: var(--color-soft);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 2px 0 0 0;
    flex-shrink: 0;
    accent-color: var(--color-primary);
}

/* --- Sélecteur de couleur --- */
.color-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input-wrapper input[type="color"] {
    width: 60px;
    height: 44px;
    padding: 4px;
    cursor: pointer;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #ffffff;
}

.color-text-input {
    flex: 1;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

/* --- Deux champs côte à côte --- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}


/* ============================================================
   7. CARTES
   ============================================================ */
.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-header-row h2 {
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}


/* ============================================================
   8. MESSAGES (alertes, flash)
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--color-danger);
}

.alert-error ul {
    margin-left: 20px;
}

.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-top: 15px;
    margin-bottom: 15px;
}

.flash-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--color-success);
}

.flash-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--color-danger);
}


/* ============================================================
   9. PAGES D'AUTHENTIFICATION
   ============================================================ */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
    position: relative;
    background-image:
        linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(29, 78, 216, 0.75)),
        url('../img/auth-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Fallback si l'image de fond n'existe pas */
.auth-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    z-index: -1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

/* En-tête de la carte */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-logo img {
    height: 48px;
    width: auto;
}

.auth-header h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: var(--color-text);
}

.auth-header .subtitle {
    color: var(--color-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Lien bas de page */
.auth-link {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 0.92rem;
}

.auth-link a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.auth-link a:hover {
    text-decoration: underline;
}


/* ============================================================
   10. PAGE HEADER (titre + actions)
   ============================================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header>div:first-child {
    flex: 1;
    min-width: 0;
}

.page-header h1 {
    font-size: 1.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-header .dashboard-subtitle {
    margin-top: 4px;
}

.page-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


/* ============================================================
   11. BADGES & TAGS
   ============================================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--color-soft);
    color: #475569;
}

h1 .badge {
    vertical-align: middle;
    margin-left: 8px;
    font-size: 0.75rem;
}

.badge-soft {
    background: var(--color-soft);
    color: var(--color-muted);
    font-size: 0.7rem;
    padding: 2px 8px;
    margin-left: 6px;
    vertical-align: middle;
}

.badge-admin {
    background: #fef3c7;
    color: #92400e;
}

.badge-entree {
    background: #f0fdf4;
    color: var(--color-success);
}

.badge-sortie {
    background: #fef2f2;
    color: var(--color-danger);
}

.badge-nouveau {
    background: var(--color-primary);
    color: #ffffff;
}

.badge-repondu {
    background: #f0fdf4;
    color: var(--color-success);
    border: 1px solid #bbf7d0;
}

.badge-type {
    background: var(--color-soft);
    color: var(--color-muted);
}

.category-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
}

.type-badge-entree {
    background: #f0fdf4;
    color: var(--color-success);
    border: 1px solid #bbf7d0;
}

.type-badge-sortie {
    background: #fef2f2;
    color: var(--color-danger);
    border: 1px solid #fecaca;
}

/* --- Montants --- */
.amount-entree {
    color: var(--color-success);
    font-weight: 600;
    white-space: nowrap;
}

.amount-sortie {
    color: var(--color-danger);
    font-weight: 600;
    white-space: nowrap;
}


/* ============================================================
   12. TABLEAUX DE DONNÉES
   ============================================================ */
.table-wrapper {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table thead {
    background: var(--color-soft);
}

.data-table th {
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-border);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--color-bg);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table td form {
    display: inline;
}

.data-table td .btn {
    margin-left: 4px;
}

/* Groupe d'actions dans une cellule */
.table-actions {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.table-actions form {
    margin: 0;
}

/* Bouton d'action réduit à une icône */
.data-table .btn-icon-sm {
    padding: 6px 8px;
    min-width: 32px;
    text-align: center;
}

.data-table .btn-icon-sm .icon {
    margin: 0;
    vertical-align: middle;
}


/* ============================================================
   13. PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.page-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    transition: background 0.2s, border-color 0.2s;
}

.page-link:hover {
    background: #f0f7ff;
    border-color: var(--color-primary);
    text-decoration: none;
}

.page-link-disabled {
    color: var(--color-muted);
    border-color: transparent;
    cursor: default;
    pointer-events: none;
}

.page-info {
    color: var(--color-muted);
    font-size: 0.9rem;
}


/* ============================================================
   14. ÉTATS VIDES
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state h2 {
    margin-bottom: 12px;
    color: var(--color-text);
    font-size: 1.3rem;
}

.empty-state p {
    color: var(--color-muted);
    margin-bottom: 25px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}


/* ============================================================
   15. CATÉGORIES
   ============================================================ */
.categories-section {
    margin-bottom: 40px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-border);
}

.section-title .icon {
    flex-shrink: 0;
}

.section-title-entree {
    color: var(--color-success);
    border-bottom-color: #bbf7d0;
}

.section-title-sortie {
    color: var(--color-danger);
    border-bottom-color: #fecaca;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.category-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-card-header h3 {
    font-size: 1.05rem;
    margin: 0;
    word-break: break-word;
}

.category-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-count {
    color: var(--color-muted);
    font-size: 0.9rem;
    flex: 1;
}

.category-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
}

.category-actions form {
    display: inline;
}


/* ============================================================
   16. TRANSACTIONS (stats + filtres)
   ============================================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--color-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.stat-entree .stat-value {
    color: var(--color-success);
}

.stat-sortie .stat-value {
    color: var(--color-danger);
}

.stat-solde.positive .stat-value {
    color: var(--color-success);
}

.stat-solde.negative .stat-value {
    color: var(--color-danger);
}

/* --- Filtres --- */
.filters-card {
    padding: 20px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    align-items: end;
}

.filters-grid .form-group {
    margin-bottom: 0;
}

.filters-actions {
    display: flex;
    gap: 8px;
    grid-column: 1 / -1;
    justify-content: flex-end;
    margin-top: 5px;
}


/* ============================================================
   17. NOTES
   ============================================================ */
.notes-section {
    margin-bottom: 30px;
}

.section-title-epinglee {
    color: #b45309;
    border-bottom-color: #fde68a;
}

.section-title-epinglee .icon {
    color: #f59e0b;
}

.notes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.note-item {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.note-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.note-item-epinglee {
    background: #fffbeb;
    border-color: #fde68a;
    border-left: 4px solid var(--color-warning);
}

.note-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.note-item-header h3 {
    font-size: 1rem;
    margin: 0;
    color: var(--color-text);
    word-break: break-word;
}

.note-pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-warning);
    flex-shrink: 0;
}

.note-item-content {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.55;
    flex: 1;
    word-break: break-word;
}

.note-item-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
}

.note-item-date {
    font-size: 0.75rem;
    color: var(--color-muted);
}

.note-item-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.note-item-actions form {
    display: inline;
}

.note-item-actions .btn-icon {
    padding: 6px 10px;
    min-width: 34px;
    text-align: center;
}

.note-item-actions .btn-icon .icon {
    margin: 0;
}


/* ============================================================
   18. DASHBOARD
   ============================================================ */
.dashboard-header {
    margin-bottom: 25px;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.dashboard-subtitle {
    color: var(--color-muted);
    font-size: 0.95rem;
}

/* --- Sélecteur de période --- */
.period-selector {
    padding: 18px 20px;
    margin-bottom: 20px;
}

.period-form {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.period-form .form-group {
    margin-bottom: 0;
    min-width: 150px;
}

/* --- Cartes de statistiques --- */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.dash-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 15px;
    align-items: center;
    transition: transform 0.15s, box-shadow 0.15s;
    border-left: 4px solid var(--color-border);
}

.dash-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.dash-card-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--color-soft);
    color: var(--color-muted);
}

.dash-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.dash-card-label {
    display: block;
    max-width: 100%;
    margin-bottom: 8px;
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.dash-card-value {
    display: block;
    max-width: 100%;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: clamp(1.15rem, 1.8vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dash-card-hint {
    font-size: 0.78rem;
    color: var(--color-muted);
}

.dash-solde {
    border-left-color: var(--color-primary);
}

.dash-solde.positive .dash-card-value {
    color: var(--color-success);
}

.dash-solde.negative .dash-card-value {
    color: var(--color-danger);
}

.dash-entrees {
    border-left-color: var(--color-success);
}

.dash-entrees .dash-card-value {
    color: var(--color-success);
}

.dash-sorties {
    border-left-color: var(--color-danger);
}

.dash-sorties .dash-card-value {
    color: var(--color-danger);
}

.dash-net {
    border-left-color: var(--color-purple);
}

.dash-net.positive .dash-card-value {
    color: var(--color-success);
}

.dash-net.negative .dash-card-value {
    color: var(--color-danger);
}

/* --- Variations (pourcentage) --- */
.variation {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    align-self: flex-start;
    letter-spacing: 0.2px;
}

.variation-positive {
    background: #f0fdf4;
    color: var(--color-success);
}

.variation-negative {
    background: #fef2f2;
    color: var(--color-danger);
}

.variation-neutre {
    background: var(--color-soft);
    color: var(--color-muted);
}

/* --- Graphiques --- */
.dashboard-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.chart-card {
    padding: 20px;
}

.chart-card h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--color-text);
}

.chart-card .card-header-row h2 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.05rem;
    margin: 0;
}

.chart-card .card-header-row h2 .icon {
    color: var(--color-muted);
}

.chart-container {
    position: relative;
    height: 300px;
}

.chart-container-pie {
    height: 220px;
    margin-bottom: 15px;
}

.chart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-muted);
}

/* --- Top dépenses (liste sous le camembert) --- */
.top-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
}

.top-list li:last-child {
    border-bottom: none;
}

.top-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.top-name {
    flex: 1;
    color: var(--color-text);
}

.top-total {
    font-weight: 600;
    color: var(--color-danger);
}

/* --- Notes épinglées sur le dashboard --- */
.notes-epinglees-card {
    padding: 20px;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.notes-header h2 {
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.note-card {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid var(--color-warning);
    border-radius: var(--radius);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

a.note-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

a.note-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.note-card h3 {
    font-size: 0.95rem;
    margin: 0;
    color: #92400e;
}

.note-card p {
    font-size: 0.88rem;
    color: var(--color-text);
    line-height: 1.5;
    flex: 1;
}

.note-date {
    font-size: 0.75rem;
    color: var(--color-muted);
    text-align: right;
}


/* ============================================================
   19. EXPORTS
   ============================================================ */
.export-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}


/* ============================================================
   20. ADMIN
   ============================================================ */
/* --- Barre de recherche --- */
.admin-search-card {
    padding: 15px 20px;
}

.admin-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
}

.admin-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* --- Carte d'identité utilisateur --- */
.user-identity-card {
    padding: 25px;
}

.user-identity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.user-identity-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-identity-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-muted);
    font-weight: 600;
}

.user-identity-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    word-break: break-word;
}

/* --- Onglets --- */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-border);
    overflow-x: auto;
    padding-bottom: 2px;
}

.tab {
    padding: 10px 18px;
    text-decoration: none;
    color: var(--color-muted);
    font-weight: 500;
    font-size: 0.92rem;
    border-radius: var(--radius) var(--radius) 0 0;
    white-space: nowrap;
    transition: all 0.15s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab:hover {
    background: var(--color-bg);
    color: var(--color-text);
    text-decoration: none;
}

.tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: #f0f7ff;
}

/* =========================================================
   21. PAGE CONTACT
   GestionFin — Contact & Communauté
   ========================================================= */

/*
|--------------------------------------------------------------------------
| En-tête de la page
|--------------------------------------------------------------------------
*/

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: clamp(1.6rem, 2.5vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.page-header h1 svg,
.page-header h1 .icon-lg {
    width: 30px;
    height: 30px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.dashboard-subtitle {
    max-width: 720px;
    margin: 0;
    color: var(--color-muted);
    font-size: 0.98rem;
    line-height: 1.7;
}


/*
|--------------------------------------------------------------------------
| Structure principale
|--------------------------------------------------------------------------
*/

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: start;
}


/*
|--------------------------------------------------------------------------
| Carte principale du formulaire
|--------------------------------------------------------------------------
*/

.contact-form-card {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: var(--color-card);
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.04),
        0 2px 8px rgba(15, 23, 42, 0.025);
}

.contact-form-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--color-primary),
            #60a5fa);
}

.contact-form-card::after {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.035);
    pointer-events: none;
}

.contact-form-card>* {
    position: relative;
    z-index: 1;
}


/*
|--------------------------------------------------------------------------
| Titre interne du formulaire
|--------------------------------------------------------------------------
*/

.contact-form-card h2,
.contact-form-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 750;
    letter-spacing: -0.015em;
}

.contact-form-card>p {
    margin-top: 0;
    margin-bottom: 26px;
    color: var(--color-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}


/*
|--------------------------------------------------------------------------
| Formulaire
|--------------------------------------------------------------------------
*/

.contact-form-card form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contact-form-card .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.contact-form-card .form-group {
    margin-bottom: 20px;
}

.contact-form-card .form-group:last-child {
    margin-bottom: 0;
}

.contact-form-card label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: 0.88rem;
    font-weight: 650;
}

.contact-form-card label span,
.contact-form-card label .required {
    color: var(--color-danger);
}


/*
|--------------------------------------------------------------------------
| Champs de saisie
|--------------------------------------------------------------------------
*/

.contact-form-card input,
.contact-form-card select,
.contact-form-card textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.94rem;
    line-height: 1.5;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.contact-form-card input,
.contact-form-card select {
    min-height: 46px;
    padding: 11px 13px;
}

.contact-form-card textarea {
    min-height: 145px;
    padding: 13px;
    resize: vertical;
}

.contact-form-card input::placeholder,
.contact-form-card textarea::placeholder {
    color: #94a3b8;
}

.contact-form-card input:hover,
.contact-form-card select:hover,
.contact-form-card textarea:hover {
    border-color: #cbd5e1;
}

.contact-form-card input:focus,
.contact-form-card select:focus,
.contact-form-card textarea:focus {
    border-color: var(--color-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.contact-form-card input:disabled,
.contact-form-card select:disabled,
.contact-form-card textarea:disabled {
    cursor: not-allowed;
    background: #f1f5f9;
    opacity: 0.75;
}


/*
|--------------------------------------------------------------------------
| Select
|--------------------------------------------------------------------------
*/

.contact-form-card select {
    cursor: pointer;
    appearance: none;
    padding-right: 40px;
    background-image:
        linear-gradient(45deg, transparent 50%, #64748b 50%),
        linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position:
        calc(100% - 17px) 20px,
        calc(100% - 12px) 20px;
    background-size:
        5px 5px,
        5px 5px;
    background-repeat: no-repeat;
}


/*
|--------------------------------------------------------------------------
| Zone d’actions
|--------------------------------------------------------------------------
*/

.contact-form-card .form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
    padding-top: 22px;
    border-top: 1px solid #f1f5f9;
}

.contact-form-card .form-actions .btn {
    min-height: 44px;
    border-radius: 10px;
    font-weight: 650;
}

.contact-form-card .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 20px;
    box-shadow: 0 5px 12px rgba(37, 99, 235, 0.14);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.contact-form-card .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.contact-form-card .btn-primary:active {
    transform: translateY(0);
}

.contact-form-card .btn-primary svg {
    width: 17px;
    height: 17px;
}


/*
|--------------------------------------------------------------------------
| Messages d’erreur et de confirmation
|--------------------------------------------------------------------------
*/

.contact-form-card .alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.55;
}

.contact-form-card .alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.contact-form-card .alert-error {
    border: 1px solid rgba(220, 38, 38, 0.18);
    background: #fef2f2;
    color: #b91c1c;
}


/*
|--------------------------------------------------------------------------
| Colonne latérale
|--------------------------------------------------------------------------
*/

.contact-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}


/*
|--------------------------------------------------------------------------
| Cartes latérales communes
|--------------------------------------------------------------------------
*/

.contact-side>div,
.contact-side>section,
.contact-side .card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-card);
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.035),
        0 2px 6px rgba(15, 23, 42, 0.025);
}

.contact-side>div::before,
.contact-side>section::before,
.contact-side .card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--color-border);
}


/*
|--------------------------------------------------------------------------
| Titres des cartes latérales
|--------------------------------------------------------------------------
*/

.contact-side h2,
.contact-side h3,
.contact-side h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    color: var(--color-text);
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.4;
}

.contact-side h2 svg,
.contact-side h3 svg,
.contact-side h4 svg {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
}


/*
|--------------------------------------------------------------------------
| Texte des cartes latérales
|--------------------------------------------------------------------------
*/

.contact-side p {
    margin: 0 0 18px;
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.contact-side p:last-child {
    margin-bottom: 0;
}


/*
|--------------------------------------------------------------------------
| Carte WhatsApp
|--------------------------------------------------------------------------
*/

.contact-card-whatsapp {
    border-color: rgba(22, 163, 74, 0.2);
    background:
        linear-gradient(145deg,
            rgba(240, 253, 244, 0.95),
            #ffffff 70%);
}

.contact-card-whatsapp::before {
    background: var(--color-success) !important;
}

.contact-card-whatsapp h2,
.contact-card-whatsapp h3,
.contact-card-whatsapp h4 {
    color: #166534;
}

.contact-card-whatsapp h2 svg,
.contact-card-whatsapp h3 svg,
.contact-card-whatsapp h4 svg {
    color: var(--color-success);
}

.contact-card-whatsapp .btn,
.contact-card-whatsapp a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 43px;
    border: 1px solid rgba(22, 163, 74, 0.2);
    border-radius: 10px;
    background: var(--color-success);
    color: #ffffff;
    font-weight: 650;
    text-decoration: none;
    box-shadow: 0 5px 12px rgba(22, 163, 74, 0.12);
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.contact-card-whatsapp .btn:hover,
.contact-card-whatsapp a.btn:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.18);
}

.contact-card-whatsapp .btn svg,
.contact-card-whatsapp a.btn svg {
    width: 17px;
    height: 17px;
}


/*
|--------------------------------------------------------------------------
| Carte support
|--------------------------------------------------------------------------
*/

.contact-card-support {
    background:
        linear-gradient(145deg,
            rgba(239, 246, 255, 0.9),
            #ffffff 75%);
}

.contact-card-support::before {
    background: var(--color-primary) !important;
}

.contact-card-support h2 svg,
.contact-card-support h3 svg,
.contact-card-support h4 svg {
    color: var(--color-primary);
}

.contact-card-support .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 43px;
    border-radius: 10px;
    font-weight: 650;
}

.contact-card-support .btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}


/*
|--------------------------------------------------------------------------
| Carte services
|--------------------------------------------------------------------------
*/

.contact-card-services::before {
    background: #8b5cf6 !important;
}

.contact-card-services h2 svg,
.contact-card-services h3 svg,
.contact-card-services h4 svg {
    color: #7c3aed;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.services-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--color-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.services-list li::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    margin-top: 7px;
    border-radius: 50%;
    background: #8b5cf6;
}

.services-list li strong {
    color: var(--color-text);
    font-weight: 650;
}


/*
|--------------------------------------------------------------------------
| Classes optionnelles si elles sont présentes dans le HTML
|--------------------------------------------------------------------------
*/

.contact-form-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 26px;
}

.contact-form-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
}

.contact-form-heading-icon svg {
    width: 23px;
    height: 23px;
}

.contact-form-heading h2,
.contact-form-heading h3 {
    margin-bottom: 5px;
}

.contact-form-heading p {
    margin: 0;
}

.contact-side-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-card);
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.035),
        0 2px 6px rgba(15, 23, 42, 0.025);
}

.contact-side-card .contact-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    border-radius: 11px;
    background: #f1f5f9;
    color: var(--color-primary);
}

.contact-side-card .contact-card-icon svg {
    width: 21px;
    height: 21px;
}

.contact-card-content h3 {
    margin: 0 0 8px;
    color: var(--color-text);
    font-size: 1.05rem;
    font-weight: 750;
}

.contact-card-content p {
    margin: 0 0 18px;
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}


/*
|--------------------------------------------------------------------------
| Accessibilité
|--------------------------------------------------------------------------
*/

.contact-form-card a:focus-visible,
.contact-form-card button:focus-visible,
.contact-side a:focus-visible,
.contact-side button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 3px;
}


/*
|--------------------------------------------------------------------------
| Responsive — écrans moyens
|--------------------------------------------------------------------------
*/

@media (max-width: 1100px) {
    .contact-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
        gap: 20px;
    }

    .contact-form-card {
        padding: 26px;
    }

    .contact-side>div,
    .contact-side>section,
    .contact-side .card,
    .contact-side-card {
        padding: 21px;
    }
}


/*
|--------------------------------------------------------------------------
| Responsive — tablette
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .contact-side>div,
    .contact-side>section,
    .contact-side .card,
    .contact-side-card {
        height: 100%;
    }

    .contact-card-services {
        grid-column: 1 / -1;
    }
}


/*
|--------------------------------------------------------------------------
| Responsive — petits écrans
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {
    .contact-form-card {
        padding: 23px;
        border-radius: 15px;
    }

    .contact-form-card .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form-card .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .contact-form-card .form-actions .btn {
        width: 100%;
    }

    .contact-side {
        grid-template-columns: 1fr;
    }

    .contact-card-services {
        grid-column: auto;
    }
}


/*
|--------------------------------------------------------------------------
| Responsive — mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 600px) {
    .page-header {
        margin-bottom: 22px;
    }

    .page-header h1 {
        gap: 9px;
        font-size: 1.55rem;
    }

    .page-header h1 svg,
    .page-header h1 .icon-lg {
        width: 25px;
        height: 25px;
    }

    .dashboard-subtitle {
        font-size: 0.9rem;
    }

    .contact-form-card {
        padding: 20px;
    }

    .contact-form-card>p {
        margin-bottom: 22px;
    }

    .contact-side>div,
    .contact-side>section,
    .contact-side .card,
    .contact-side-card {
        padding: 20px;
    }

    .contact-form-heading {
        gap: 11px;
    }

    .contact-form-heading-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }
}


/*
|--------------------------------------------------------------------------
| Responsive — très petits écrans
|--------------------------------------------------------------------------
*/

@media (max-width: 480px) {
    .contact-form-card {
        padding: 17px;
        border-radius: 13px;
    }

    .contact-form-card input,
    .contact-form-card select {
        min-height: 44px;
        font-size: 0.9rem;
    }

    .contact-form-card textarea {
        min-height: 125px;
        font-size: 0.9rem;
    }

    .contact-side>div,
    .contact-side>section,
    .contact-side .card,
    .contact-side-card {
        padding: 18px;
        border-radius: 13px;
    }

    .contact-side h2,
    .contact-side h3,
    .contact-side h4 {
        font-size: 1rem;
    }

    .services-list {
        gap: 10px;
    }

    .services-list li {
        font-size: 0.86rem;
    }
}


/*
|--------------------------------------------------------------------------
| Réduction des animations pour les utilisateurs concernés
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {

    .contact-form-card input,
    .contact-form-card select,
    .contact-form-card textarea,
    .contact-form-card .btn-primary,
    .contact-card-whatsapp .btn,
    .contact-card-whatsapp a.btn {
        transition: none;
    }

    .contact-form-card .btn-primary:hover,
    .contact-card-whatsapp .btn:hover,
    .contact-card-whatsapp a.btn:hover {
        transform: none;
    }
}


/* ============================================================
   22. ADMIN — MESSAGES
   ============================================================ */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.message-card-non-lu {
    border-left: 4px solid var(--color-primary);
    background: #f0f7ff;
}

.message-card-header h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.message-card-meta {
    font-size: 0.85rem;
    color: var(--color-muted);
    line-height: 1.5;
}

.message-card-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text);
    padding: 14px 16px;
    background: var(--color-bg);
    border-radius: var(--radius);
    border-left: 3px solid var(--color-border);
}

.message-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.message-card-actions form {
    display: inline;
}


/* ============================================================
   23. BANDEAU CONTACT (dashboard)
   ============================================================ */
.contact-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f0f7ff, #e0e7ff);
    border: 1px solid #c7d2fe;
    flex-wrap: wrap;
}

.contact-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 250px;
}

.contact-banner-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.contact-banner-content h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--color-text);
}

.contact-banner-content p {
    font-size: 0.88rem;
    color: var(--color-muted);
    line-height: 1.5;
    margin: 0;
}


/* ============================================================
   24. PAGES D'ERREUR
   ============================================================ */
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 {
    font-size: 5rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}


/* ============================================================
   25. BOUTON FLOTTANT — CONTACT
   ============================================================ */
.floating-contact {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--color-primary);
    color: #ffffff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s ease;

    /* Animation d'apparition : glisse depuis la droite */
    animation: floatingSlideIn 0.6s ease-out 0.3s both,
        floatingPulse 2.5s ease-in-out 1s infinite;
}

/* Effet de pulsation douce (attire l'œil sans agresser) */
@keyframes floatingPulse {

    0%,
    100% {
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35),
            0 0 0 0 rgba(37, 99, 235, 0.5);
    }

    50% {
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35),
            0 0 0 10px rgba(37, 99, 235, 0);
    }
}

/* Effet d'apparition : slide depuis la droite */
@keyframes floatingSlideIn {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.floating-contact:hover {
    background: var(--color-primary-d);
    color: #ffffff;
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.5),
        0 0 0 0 rgba(37, 99, 235, 0);
    text-decoration: none;
    /* On arrête la pulsation au survol pour éviter la surcharge */
    animation-play-state: paused;
}

.floating-contact .icon {
    stroke: #ffffff;
    fill: none;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* L'icône tourne légèrement au survol */
.floating-contact:hover .icon {
    transform: rotate(-12deg) scale(1.1);
}

.floating-contact-label {
    white-space: nowrap;
}


/* ============================================================
   26. RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .dashboard-charts {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 15px;
        border-top: 1px solid var(--color-border);
    }

    .main-nav.open {
        display: flex;
    }

    .auth-card {
        padding: 25px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-actions {
        width: 100%;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
        text-align: center;
    }

    .filters-actions {
        justify-content: stretch;
    }

    .filters-actions .btn {
        flex: 1;
    }

    .pagination {
        flex-direction: column;
        gap: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .floating-contact {
        bottom: 16px;
        right: 16px;
        padding: 14px;
        border-radius: 50%;
    }

    .floating-contact-label {
        display: none;
    }

    .contact-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-banner .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.4rem;
    }

    .dashboard-header h1 {
        font-size: 1.4rem;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}

/* =========================================================
   DASHBOARD — AMÉLIORATION VISUELLE
========================================================= */

/*
|--------------------------------------------------------------------------
| En-tête principal
|--------------------------------------------------------------------------
*/

.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.dashboard-hero-content {
    min-width: 0;
}

.dashboard-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding: 6px 10px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.06);
    color: var(--color-primary);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.dashboard-hero-badge svg {
    width: 14px;
    height: 14px;
}

.dashboard-hero h1 {
    margin: 0 0 8px;
    color: var(--color-text);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.dashboard-hero h1 span {
    color: var(--color-primary);
}

.dashboard-hero .dashboard-subtitle {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.96rem;
    line-height: 1.65;
}

.dashboard-hero-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 13px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-card);
    color: var(--color-muted);
    font-size: 0.84rem;
    font-weight: 650;
}

.dashboard-hero-date svg {
    color: var(--color-primary);
}


/*
|--------------------------------------------------------------------------
| Sélecteur de période
|--------------------------------------------------------------------------
*/

.period-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    background: var(--color-card);
}

.period-selector-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 230px;
}

.period-selector-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 11px;
    background: rgba(37, 99, 235, 0.09);
    color: var(--color-primary);
}

.period-selector-heading h2 {
    margin: 0 0 4px;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 750;
}

.period-selector-heading p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.82rem;
}

.period-selector form {
    flex: 1;
}

.period-form {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 14px;
}

.period-form .form-group {
    min-width: 150px;
    margin-bottom: 0;
}

.period-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    color: var(--color-text);
    font-size: 0.82rem;
    font-weight: 650;
}

.period-form label svg {
    color: var(--color-muted);
}

.period-form select {
    width: 100%;
    min-height: 43px;
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: #ffffff;
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.period-form select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11);
}

.period-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 43px;
    padding: 10px 17px;
    border-radius: 9px;
    white-space: nowrap;
}


/*
|--------------------------------------------------------------------------
| Barre des rapports
|--------------------------------------------------------------------------
*/

.dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.dashboard-toolbar-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--color-muted);
    font-size: 0.85rem;
    font-weight: 650;
}

.toolbar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);
}

.export-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.export-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 39px;
    border-radius: 9px;
    font-size: 0.83rem;
    font-weight: 650;
}


/*
|--------------------------------------------------------------------------
| Cartes statistiques
|--------------------------------------------------------------------------
*/

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.dashboard-stats .dash-card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    padding: 21px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-card);
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.035),
        0 2px 6px rgba(15, 23, 42, 0.025);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.dashboard-stats .dash-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -52px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.035;
    pointer-events: none;
}

.dashboard-stats .dash-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 30px rgba(15, 23, 42, 0.06),
        0 3px 8px rgba(15, 23, 42, 0.03);
}

.dash-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 23px;
}

.dash-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--color-primary);
}

.dash-card-icon svg {
    width: 22px;
    height: 22px;
}

.dash-card-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-muted);
    font-size: 0.73rem;
    font-weight: 650;
}

.dash-card-status svg {
    width: 13px;
    height: 13px;
}

.dash-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-card-label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.dash-card-value {
    display: block;
    overflow: hidden;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-card-hint {
    color: var(--color-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.dash-card-footer {
    min-height: 21px;
}

.dash-card-footer .variation,
.dash-card-footer .variation-positive,
.dash-card-footer .variation-negative {
    font-size: 0.76rem;
}

.dash-solde {
    color: var(--color-primary);
}

.dash-solde .dash-card-icon {
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
}

.dash-solde.positive .dash-card-value,
.dash-net.positive .dash-card-value {
    color: var(--color-success);
}

.dash-solde.negative .dash-card-value,
.dash-net.negative .dash-card-value {
    color: var(--color-danger);
}

.dash-entrees {
    color: var(--color-success);
}

.dash-entrees .dash-card-icon {
    background: rgba(22, 163, 74, 0.1);
    color: var(--color-success);
}

.dash-sorties {
    color: var(--color-danger);
}

.dash-sorties .dash-card-icon {
    background: rgba(220, 38, 38, 0.09);
    color: var(--color-danger);
}

.dash-net {
    color: #8b5cf6;
}

.dash-net .dash-card-icon {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}


/*
|--------------------------------------------------------------------------
| Zone des graphiques
|--------------------------------------------------------------------------
*/

.dashboard-charts {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-card);
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.035),
        0 2px 6px rgba(15, 23, 42, 0.025);
}

.card-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.chart-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.chart-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 11px;
}

.chart-heading-blue {
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
}

.chart-heading-purple {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.chart-heading h2 {
    margin: 0 0 5px;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 750;
}

.chart-heading p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.chart-period {
    flex-shrink: 0;
    padding: 5px 9px;
    border: 1px solid var(--color-border);
    border-radius: 7px;
    color: var(--color-muted);
    font-size: 0.75rem;
    font-weight: 650;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 320px;
}

.chart-container-pie {
    height: 245px;
}

.chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 30px 20px;
    text-align: center;
}

.chart-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 15px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
}

.chart-empty h3 {
    margin: 0 0 7px;
    color: var(--color-text);
    font-size: 0.98rem;
    font-weight: 700;
}

.chart-empty p {
    max-width: 280px;
    margin: 0;
    color: var(--color-muted);
    font-size: 0.84rem;
    line-height: 1.6;
}


/*
|--------------------------------------------------------------------------
| Liste des dépenses
|--------------------------------------------------------------------------
*/

.top-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin: 20px 0 0;
    padding: 17px 0 0;
    border-top: 1px solid #f1f5f9;
    list-style: none;
}

.top-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.top-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
}

.top-name {
    min-width: 0;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 0.83rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-total {
    margin-left: auto;
    color: var(--color-text);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}


/*
|--------------------------------------------------------------------------
| Bandeau contact
|--------------------------------------------------------------------------
*/

.contact-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 24px 27px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 16px;
    background:
        linear-gradient(135deg,
            rgba(239, 246, 255, 0.95),
            #ffffff 75%);
}

.contact-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    min-width: 0;
}

.contact-banner-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
}

.contact-banner-icon svg {
    width: 23px;
    height: 23px;
}

.contact-banner-label {
    display: block;
    margin-bottom: 5px;
    color: var(--color-primary);
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.contact-banner h3 {
    margin: 0 0 6px;
    color: var(--color-text);
    font-size: 1.05rem;
    font-weight: 750;
}

.contact-banner p {
    max-width: 650px;
    margin: 0;
    color: var(--color-muted);
    font-size: 0.86rem;
    line-height: 1.6;
}

.contact-banner>.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    min-height: 43px;
    padding: 10px 17px;
    border-radius: 9px;
    white-space: nowrap;
}


/*
|--------------------------------------------------------------------------
| Notes épinglées
|--------------------------------------------------------------------------
*/

.notes-epinglees-card {
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-card);
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.035),
        0 2px 6px rgba(15, 23, 42, 0.025);
}

.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.notes-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.notes-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 11px;
    background: rgba(245, 158, 11, 0.11);
    color: #d97706;
}

.notes-title-wrapper h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 750;
}

.notes-title-wrapper p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.8rem;
}

.notes-header>.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.note-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 190px;
    padding: 17px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #ffffff;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.note-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    transform: translateY(-2px);
}

.note-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}

.note-pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #fff7ed;
    color: #d97706;
}

.note-date {
    color: #94a3b8;
    font-size: 0.72rem;
    white-space: nowrap;
}

.note-card h3 {
    overflow: hidden;
    margin: 0 0 9px;
    color: var(--color-text);
    font-size: 0.94rem;
    font-weight: 750;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 16px;
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.note-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.note-read-more svg {
    transition: transform 0.2s ease;
}

.note-card:hover .note-read-more svg {
    transform: translate(2px, -2px);
}

.notes-empty {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border: 1px dashed var(--color-border);
    border-radius: 12px;
    background: #f8fafc;
}

.notes-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #ffffff;
    color: #94a3b8;
}

.notes-empty h3 {
    margin: 0 0 5px;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 700;
}

.notes-empty p {
    margin: 0 0 13px;
    color: var(--color-muted);
    font-size: 0.83rem;
    line-height: 1.55;
}

.notes-empty .btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}


/*
|--------------------------------------------------------------------------
| Responsive — écrans moyens
|--------------------------------------------------------------------------
*/

@media (max-width: 1150px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-charts {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 300px;
    }

    .chart-container-pie {
        height: 270px;
    }
}


/*
|--------------------------------------------------------------------------
| Responsive — tablette
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {
    .period-selector {
        align-items: stretch;
        flex-direction: column;
        gap: 20px;
    }

    .period-form {
        justify-content: flex-start;
    }

    .period-selector-heading {
        min-width: 0;
    }

    .notes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .note-card:last-child {
        grid-column: 1 / -1;
    }
}


/*
|--------------------------------------------------------------------------
| Responsive — mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .dashboard-hero-date {
        align-self: flex-start;
    }

    .period-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
    }

    .period-form .form-group {
        min-width: 0;
    }

    .period-submit {
        width: 100%;
    }

    .dashboard-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .export-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .export-actions .btn {
        flex: 1;
    }

    .contact-banner {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .contact-banner>.btn {
        width: 100%;
    }

    .notes-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .notes-header>.btn {
        width: 100%;
        justify-content: center;
    }
}


/*
|--------------------------------------------------------------------------
| Responsive — petit mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 560px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-stats .dash-card {
        padding: 19px;
    }

    .period-form {
        grid-template-columns: 1fr;
    }

    .period-submit {
        margin-top: 4px;
    }

    .export-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .export-actions .btn {
        width: 100%;
    }

    .chart-card,
    .notes-epinglees-card {
        padding: 19px;
    }

    .chart-container {
        height: 250px;
    }

    .chart-container-pie {
        height: 230px;
    }

    .notes-grid {
        grid-template-columns: 1fr;
    }

    .note-card:last-child {
        grid-column: auto;
    }

    .notes-empty {
        align-items: flex-start;
        flex-direction: column;
    }
}


/*
|--------------------------------------------------------------------------
| Réduction des animations
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {

    .dashboard-stats .dash-card,
    .note-card,
    .note-read-more svg {
        transition: none;
    }

    .dashboard-stats .dash-card:hover,
    .note-card:hover {
        transform: none;
    }

    .note-card:hover .note-read-more svg {
        transform: none;
    }
}