/* ============================================
   STYLES — CRM CENTRAL artecaa
   ============================================ */

:root {
    --primary: #1f282f;
    --primary-dark: #161d23;
    --primary-light: #eaeef1;
    --accent: #7cb109;
    --accent-dark: #679408;
    --danger: #ae160b;
    --danger-bg: #fbe5e3;
    --warning: #f59e0b;
    --success: #7cb109;
    --text: #1a1a1a;
    --text-muted: #6b7280;
    --bg: #f7f9fc;
    --white: #ffffff;
    --border: #e5eaf1;
    --sidebar-width: 250px;
    --topbar-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    font-size: 15px;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ============================================
   LOGIN
   ============================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.login-title {
    font-size: 1.5rem;
    text-align: center;
    color: var(--primary);
    margin-bottom: 6px;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.login-form .field {
    margin-bottom: 16px;
}

.login-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: #f9fbfd;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

.login-footer {
    text-align: center;
    margin-top: 22px;
    color: var(--text-muted);
}

/* ============================================
   BOUTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-block {
    width: 100%;
}

/* ============================================
   ALERTES
   ============================================ */

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 18px;
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

/* ============================================
   APP WRAPPER
   ============================================ */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .brand-logo {
    background: var(--white);
    color: var(--primary);
}

.sidebar .brand-name {
    color: var(--white);
}

.brand-logo-img {
    width: auto;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.brand-logo-text {
    width: auto;
    height: 20px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    transition: 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
}

.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: var(--accent);
}

.nav-icon {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
}

/* ============================================
   APP MAIN
   ============================================ */

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ============================================
   TOPBAR
   ============================================ */

.topbar {
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--primary);
}

.page-title {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.btn-logout {
    background: var(--primary-light);
    color: var(--primary);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-logout:hover {
    background: #d0e6ea;
}

/* ============================================
   CONTENU
   ============================================ */

.app-content {
    flex: 1;
    padding: 28px 24px;
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-header {
    margin-bottom: 26px;
}

.dashboard-header h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.muted {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 34px;
}

@media (min-width: 640px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    border-left: 4px solid var(--primary);
}

.stat-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dashboard-section h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    .quick-actions { grid-template-columns: repeat(4, 1fr); }
}

.quick-action {
    background: var(--white);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: 0.2s;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
}

.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.quick-icon {
    font-size: 1.4rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }
}


/* ============================================
   LOGO IMAGE
   ============================================ */

.brand-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
}


/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

.page-header h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================
   BOUTON SECONDAIRE
   ============================================ */

.btn-secondary {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-secondary:hover {
    background: #d5dce0;
}

/* ============================================
   TABLEAU
   ============================================ */

.table-wrapper {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.table thead {
    background: var(--primary-light);
}

.table th {
    text-align: left;
    padding: 14px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 14px 18px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: #fafbfc;
}

.table code {
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--primary);
}

.table .actions {
    display: flex;
    gap: 10px;
    font-size: 1.1rem;
}

.table .actions a {
    transition: 0.2s;
    opacity: 0.8;
}

.table .actions a:hover {
    opacity: 1;
    transform: scale(1.15);
}

/* ============================================
   BADGES
   ============================================ */

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

.badge-success {
    background: #e8f5d4;
    color: #4d6e05;
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    background: var(--white);
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.7;
}

.empty-state h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 20px;
}

/* ============================================
   FORMULAIRE
   ============================================ */

.form-card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.field-full {
    grid-column: 1 / -1;
}

.field {
    display: flex;
    flex-direction: column;
}

.field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: #f9fbfd;
    font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
}

.field-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.field-hint code {
    background: var(--primary-light);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.alert-danger ul {
    margin: 0;
    padding-left: 18px;
}

/* ============================================
   INFO GRID (fiche détaillée)
   ============================================ */

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

@media (min-width: 640px) {
    .info-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 900px) {
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.info-card {
    background: var(--white);
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    border-left: 3px solid var(--accent);
}

.info-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
    word-break: break-word;
}

.info-value a {
    color: var(--accent);
    font-weight: 600;
}

.info-value a:hover {
    text-decoration: underline;
}

.info-value code {
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary);
}

/* ============================================
   SECTION ACTIONS
   ============================================ */

.section-actions {
    margin-top: 30px;
}

.section-actions h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.action-card {
    background: var(--white);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: 0.2s;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    border-left: 3px solid var(--accent);
}

.action-icon {
    font-size: 1.4rem;
}



.badge-info {
    background: #e0f0f3;
    color: var(--primary);
}

.action-card-danger {
    color: var(--danger);
}

.action-card-danger:hover {
    border-left: 3px solid var(--danger);
}

.field textarea {
    resize: vertical;
    min-height: 100px;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.alert-success {
    background: #e8f5d4;
    color: #4d6e05;
    border-left: 4px solid var(--accent);
}

.brand-suffix {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-left: 4px;
}

/* ============================================
   BOUTON PROFIL (topbar)
   ============================================ */

.user-profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
    transition: 0.2s;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-profile-btn:hover {
    background: var(--white);
    border: 1px solid #7cb109;
    color: var(--primary);
}

.user-profile-icon {
    line-height: 1;
}


/* ============================================
   NAV FAMILY (sidebar arborescente)
   ============================================ */

.nav-family .nav-family-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    transition: 0.2s;
    border-left: 3px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.nav-family .nav-family-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.nav-family.open .nav-family-toggle {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-family .nav-arrow {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.nav-family.open .nav-arrow {
    transform: rotate(90deg);
}

.nav-family .nav-submenu {
    display: none;
    background: rgba(0, 0, 0, 0.15);
    padding: 6px 0;
    list-style: none;
}

.nav-family.open .nav-submenu {
    display: block;
}

.nav-family .nav-submenu a {
    display: block;
    padding: 9px 20px 9px 54px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    transition: 0.2s;
    text-decoration: none;
}

.nav-family .nav-submenu a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-family .nav-submenu a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-left: 3px solid var(--accent);
    padding-left: 51px;
}

/* ============================================
   FILTRES
   ============================================ */

.filters-bar {
    background: var(--white);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filters-form input,
.filters-form select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: #f9fbfd;
    font-family: inherit;
    color: var(--text);
}

.filters-form input:focus,
.filters-form select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
}

.filters-form input {
    flex: 1;
    min-width: 180px;
}

.filters-form select {
    min-width: 180px;
}

/* ============================================
   INVOICE HEADER
   ============================================ */

.invoice-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

@media (min-width: 640px) {
    .invoice-header {
        grid-template-columns: repeat(3, 1fr);
    }
}

.invoice-header-block {
    font-size: 0.9rem;
    line-height: 1.6;
}

.invoice-header-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.invoice-header-value {
    color: var(--text);
}

/* ============================================
   INVOICE TOTALS
   ============================================ */

.invoice-totals {
    max-width: 400px;
    margin-left: auto;
    margin-top: 20px;
    background: var(--white);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.invoice-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text);
}

.invoice-totals-row-final {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 8px;
    font-size: 1rem;
}

/* ============================================
   INVOICE ITEMS TABLE (création facture)
   ============================================ */

#itemsTable {
    width: 100%;
    border-collapse: collapse;
}

#itemsTable thead th {
    background: var(--primary-light);
    text-align: left;
    padding: 10px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

#itemsTable tbody td {
    padding: 8px 6px;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

#itemsTable tbody tr:last-child td {
    border-bottom: none;
}

#itemsTable select,
#itemsTable input[type="text"],
#itemsTable input[type="number"] {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--white);
    font-family: inherit;
    color: var(--text);
    transition: 0.2s;
}

#itemsTable select:focus,
#itemsTable input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
}

#itemsTable .line-product {
    font-weight: 500;
}

#itemsTable .line-name {
    background: #f9fbfd;
}

#itemsTable .line-qty,
#itemsTable .line-price {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

#itemsTable .line-total {
    display: block;
    padding: 9px 10px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    text-align: right;
    background: #f9fbfd;
    border-radius: 6px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

#itemsTable tbody button {
    background: #fbe5e3;
    color: var(--danger);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 9px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
}

#itemsTable tbody button:hover {
    background: var(--white);
    border-color: var(--danger);
}

/* Bouton "Ajouter une ligne" */

#itemsTable + button,
button[onclick="addLine()"] {
    margin-top: 12px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px dashed var(--primary);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    transition: 0.2s;
}

button[onclick="addLine()"]:hover {
    background: var(--white);
    border-color: var(--accent);
    border-style: solid;
}

/* ============================================
   BOUTONS — VERT ARTECAA / HOVER BLEU
   ============================================ */

.btn-primary {
    background: #7cb109;
    color: #ffffff;
    border: 1px solid transparent;
    transition: 0.2s;
}

.btn-primary:hover {
    background: #1f282f;
    color: #ffffff;
    border: 1px solid #1f282f;
}

/* Garder la cohérence pour le bouton de login */
.login-form .btn-primary {
    background: #7cb109;
    color: #ffffff;
}

.login-form .btn-primary:hover {
    background: #1f282f;
}

/* ============================================
   BOUTONS D'ACTION SUR LES SHOW
   ============================================ */

.page-actions .btn-primary {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--border);
    transition: 0.2s;
}

.page-actions .btn-primary:hover {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--accent);
}

/* ============================================
   CALENDRIER — PROJETS
   ============================================ */

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.calendar-nav h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin: 0;
}

.calendar {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.calendar-header-cell {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 4px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-cell {
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 100px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calendar-cell-empty {
    background: transparent;
    border: none;
}

.calendar-cell-today {
    background: #e8f5d4;
    border-color: var(--accent);
}

.calendar-day-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.calendar-event,
.calendar-event-done {
    display: block;
    font-size: 0.72rem;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: 0.15s;
    text-decoration: none;
}

.calendar-event {
    background: var(--accent);
    color: var(--white);
}

.calendar-event:hover {
    background: var(--accent-dark);
}

.calendar-event-done {
    background: #eef1f4;
    color: var(--text-muted);
    text-decoration: line-through;
}

.calendar-event-more {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    padding-left: 4px;
}

@media (max-width: 700px) {
    .calendar-cell {
        min-height: 70px;
        padding: 5px;
    }
    .calendar-event,
    .calendar-event-done {
        font-size: 0.65rem;
    }
    .calendar-day-number {
        font-size: 0.75rem;
    }
}

.not-found-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.not-found-card {
    background: var(--white);
    border-radius: 16px;
    padding: 50px 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.not-found-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.not-found-card h2 {
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.not-found-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

