/* ================================================
   VARIABLES CSS
   ================================================ */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --weekend-bg: #fef3c7;
    --holiday-bg: #fecaca;
}

/* ================================================
   RESET & BASE
   ================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'OCR A', monospace !important;
}

body {
    font-family: 'OCR A',monospace,'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

/* ================================================
   LAYOUT
   ================================================ */
.container {
    display: flex;
    min-height: 100vh;
}

/* ================================================
   SIDEBAR
   ================================================ */
.sidebar {
    width: 260px;
    background: #f9fafb;
    border-right: 1px solid var(--gray-200);
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 38px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    background: var(--gray-100);
    color: var(--primary-color);
}

.nav-link.active {
    background: #eef2ff;
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* ================================================
   MAIN CONTENT
   ================================================ */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    max-width: 1600px;
    margin-left: 260px;
    margin-right: auto;
}

/* ================================================
   HEADER
   ================================================ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.user-name {
    font-weight: 600;
    color: var(--gray-900);
}

/* ================================================
   DASHBOARD GRID
   ================================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ================================================
   STATS CARDS
   ================================================ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary-color);
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-trend {
    font-size: 0.875rem;
    color: var(--success-color);
    margin-top: 0.5rem;
}

/* ================================================
   CALENDAR
   ================================================ */
.calendar-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.month-btn {
    background: var(--gray-100);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--gray-700);
}

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

.month-btn:active {
    transform: scale(0.95);
}

.current-month {
    font-weight: 600;
    color: var(--gray-900);
    min-width: 150px;
    text-align: center;
}

.calendar {
    width: 100%;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    padding: 0.5rem;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.day-cell {
    aspect-ratio: 1;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    font-size: 0.85rem;
}

.day-cell:hover:not(.empty):not(.weekend):not(.holiday) {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.day-cell.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.day-cell.weekend {
    background: var(--weekend-bg);
}

.day-cell.holiday {
    background: var(--holiday-bg);
}

.day-cell.selected {
    border-color: var(--primary-color);
    background: #eef2ff;
}

.day-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.day-code {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

.code-T {
    background: #dbeafe;
    color: #1e40af;
}

.code-CP {
    background: #fef3c7;
    color: #92400e;
}

.code-RTT {
    background: #d1fae5;
    color: #065f46;
}

.code-CM {
    background: #e9d5ff;
    color: #6b21a8;
}

.code-CE {
    background: #fed7aa;
    color: #9a3412;
}

.day-reason {
    font-size: 0.65rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* ================================================
   SIDEBAR PANEL
   ================================================ */
.sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.status-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.badge-draft {
    background: var(--gray-200);
    color: var(--gray-700);
}

.badge-signed {
    background: #dbeafe;
    color: #1e40af;
}

.badge-validated {
    background: #d1fae5;
    color: #065f46;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.summary-value {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--gray-900);
}

/* ================================================
   LEGEND
   ================================================ */
.legend {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

.legend-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-text {
    font-size: 0.875rem;
    color: var(--gray-700);
}

/* ================================================
   BUTTONS
   ================================================ */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: #4f46e5;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
}

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

.btn-success:hover {
    background: #059669;
}

/* ================================================
   ALERT
   ================================================ */
.alert {
    background: #fef3c7;
    border-left: 4px solid var(--warning-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.alert-icon {
    color: var(--warning-color);
    font-weight: 700;
}

.alert-text {
    color: #92400e;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ================================================
   MODAL
   ================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3);
}

.modal-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ================================================
   HAMBURGER MENU
   ================================================ */
.hamburger {
    display: none;
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 1001;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-panel {
        order: -1;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }

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

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .header {
        margin-top: 3rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .calendar-days {
        gap: 0.25rem;
    }

    .day-cell {
        padding: 0.25rem;
    }

    .day-number {
        font-size: 0.75rem;
    }

    .day-code {
        font-size: 0.65rem;
        padding: 0.125rem 0.25rem;
    }

    .day-reason {
        display: none;
    }
}

.alert-success {
    background: #d1fae5;
    border-left: 4px solid var(--success-color);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: #065f46;
    font-size: 0.875rem;
    line-height: 1.5;
}

.alert-error {
    background: #fee2e2;
    border-left: 4px solid var(--danger-color);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: #991b1b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.alert-info {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: #1e40af;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ================================================
   DARK MODE VARIABLES
   ================================================ */
[data-theme="dark"] {
    --gray-50:  #0f172a;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-600: #94a3b8;
    --gray-800: #cbd5e1;
    --gray-900: #f1f5f9;
    --weekend-bg: #292524;
    --holiday-bg: #3b1f1f;

    /* Couleurs de fond */
    --bg-body:    #0f172a;
    --bg-card:    #1e293b;
    --bg-sidebar: #1e293b;
    --border:     #334155;

    /* Textes */
    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
}

:root {
    --bg-body:    #f9fafb;
    --bg-card:    #ffffff;
    --bg-sidebar: #ffffff;
    --border:     #e5e7eb;
    --text-primary:   #111827;
    --text-secondary: #4b5563;
}

/* ================================================
   DARK MODE - OVERRIDES
   ================================================ */
[data-theme="dark"] body {
    background: var(--bg-body);
    color: var(--text-primary);
}

[data-theme="dark"] .sidebar {
    background: var(--bg-sidebar);
    border-right-color: var(--border);
}

[data-theme="dark"] .logo {
    color: #818cf8;
}

[data-theme="dark"] .nav-link {
    color: var(--text-secondary);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    background: #334155;
    color: #818cf8;
}

[data-theme="dark"] .nav-link.active {
    background: #1e3a5f;
}

[data-theme="dark"] .nav-section-label {
    color: #475569;
}

[data-theme="dark"] .nav-divider {
    border-top-color: var(--border);
}

[data-theme="dark"] .main-content {
    background: var(--bg-body);
}

[data-theme="dark"] .header-title {
    color: var(--text-primary);
}

[data-theme="dark"] .user-info {
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

[data-theme="dark"] .user-name {
    color: var(--text-primary);
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .calendar-card,
[data-theme="dark"] .status-card,
[data-theme="dark"] .legend,
[data-theme="dark"] .trace-box,
[data-theme="dark"] .sign-form-card,
[data-theme="dark"] .recap-header,
[data-theme="dark"] .recap-stat {
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

[data-theme="dark"] .stat-label,
[data-theme="dark"] .summary-label,
[data-theme="dark"] .legend-text,
[data-theme="dark"] .trace-label {
    color: var(--text-secondary);
}

[data-theme="dark"] .stat-value,
[data-theme="dark"] .summary-value,
[data-theme="dark"] .calendar-title,
[data-theme="dark"] .day-number {
    color: var(--text-primary);
}

[data-theme="dark"] .day-cell {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-primary);
}

[data-theme="dark"] .day-cell.weekend {
    background: #292524;
}

[data-theme="dark"] .day-cell.holiday {
    background: #3b1f1f;
}

[data-theme="dark"] .day-cell.empty {
    background: transparent;
}

[data-theme="dark"] .day-cell:hover:not(.empty):not(.weekend):not(.holiday) {
    border-color: #818cf8;
    background: #1e3a5f;
}

[data-theme="dark"] .weekday {
    color: var(--text-secondary);
}

[data-theme="dark"] .current-month {
    color: var(--text-primary);
}

[data-theme="dark"] .month-btn {
    background: var(--border);
    color: var(--text-secondary);
}

[data-theme="dark"] .month-btn:hover {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .summary-item {
    border-bottom-color: var(--border);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-input {
    background: #334155;
    border-color: #475569;
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-input:focus {
    border-color: #818cf8;
    background: #1e3a5f;
}

[data-theme="dark"] .modal-content {
    background: var(--bg-card);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .form-label {
    color: var(--text-primary);
}

[data-theme="dark"] .btn-secondary {
    background: var(--border);
    color: var(--text-primary);
    border-color: #475569;
}

[data-theme="dark"] .btn-secondary:hover {
    background: #475569;
}

[data-theme="dark"] .alert {
    background: #292524;
    border-left-color: var(--warning-color);
}

[data-theme="dark"] .alert-text {
    color: #fde68a;
}

[data-theme="dark"] .alert-success {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .alert-error {
    background: #7f1d1d;
    color: #fca5a5;
}

[data-theme="dark"] .alert-info {
    background: #1e3a5f;
    color: #93c5fd;
}

/* Tableau RH */
[data-theme="dark"] .rh-table th {
    background: #334155;
    color: var(--text-secondary);
    border-bottom-color: var(--border);
}

[data-theme="dark"] .rh-table td {
    border-bottom-color: var(--border);
    color: var(--text-primary);
}

[data-theme="dark"] .rh-table tr:hover td {
    background: #334155;
}

[data-theme="dark"] .rh-card {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="dark"] .rh-card-days {
    background: #334155;
}

[data-theme="dark"] .engagements {
    background: #334155;
}

[data-theme="dark"] .legal-box {
    background: #1e3a5f;
}

[data-theme="dark"] .sign-warning {
    background: #431407;
    border-left-color: #f97316;
    color: #fdba74;
}

[data-theme="dark"] .certify-label {
    border-color: var(--border);
    color: var(--text-primary);
}

[data-theme="dark"] .certify-label:hover {
    border-color: #818cf8;
    background: #1e3a5f;
}

[data-theme="dark"] .certify-box {
    background: #334155;
    border-color: #475569;
}

/* Dark mode toggle button */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    border-radius: 8px;
    width: 100%;
    transition: all 0.2s;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.dark-mode-toggle:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

[data-theme="dark"] .dark-mode-toggle:hover {
    background: #334155;
    color: #818cf8;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--gray-300);
    border-radius: 10px;
    margin-left: auto;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

[data-theme="dark"] .toggle-switch {
    background: var(--primary-color);
}

[data-theme="dark"] .toggle-switch::after {
    transform: translateX(16px);
}

/* Transition douce */
body,
.sidebar,
.main-content,
.stat-card,
.calendar-card,
.status-card,
.day-cell,
.modal-content,
.nav-link,
.form-control,
.btn-secondary {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease;
}

/* ================================================
   RESPONSIVE TABLE RH
   ================================================ */

/* Desktop : afficher tableau, cacher cartes */
.desktop-only { display: block; }
.mobile-only  { display: none;  }

/* Wrapper tableau avec scroll horizontal si besoin */
.rh-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    min-width: 700px; /* Force scroll si écran trop petit */
}

.rh-table th {
    background: var(--gray-50);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.rh-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.rh-table tr:hover td {
    background: var(--gray-50);
}

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

/* ================================================
   CARTES MOBILE
   ================================================ */
.rh-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rh-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rh-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.rh-card-name {
    font-weight: 700;
    color: var(--gray-900);
    font-size: 1rem;
}

.rh-card-email {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.rh-card-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.rh-card-days {
    display: flex;
    justify-content: space-between;
    background: var(--gray-50);
    border-radius: 8px;
    padding: 0.75rem;
}

.rh-card-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.rh-card-day-value {
    font-size: 1.375rem;
    font-weight: 700;
}

.rh-card-day-label {
    font-size: 0.6875rem;
    color: var(--gray-500);
    font-weight: 500;
}

.rh-card-dates {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.rh-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* ================================================
   BREAKPOINTS
   ================================================ */

/* Tablette : scroll horizontal sur le tableau */
@media (max-width: 1024px) {
    .rh-table {
        font-size: 0.8125rem;
    }

    .rh-table th,
    .rh-table td {
        padding: 0.75rem;
    }
}

/* Mobile : basculer en cartes */
@media (max-width: 768px) {
    .desktop-only { display: none;  }
    .mobile-only  { display: flex; flex-direction: column; }

    .rh-month-selector h2 {
        font-size: 1.125rem;
        min-width: 150px;
    }
}

/* ARRONDIS PARTOUT */
.btn, .btn-select-all, .btn-cancel, .btn-delete, 
.btn-block, .btn-primary, .btn-success,
.calendar-actions .btn, .reason-input, .toast {
    border-radius: 50px !important;
}

/* Cercles parfaits */
.month-btn, .modal-close {
    border-radius: 50% !important;
}

/* Effet de clic sur les boutons d'action */
.calendar-actions .btn {
    transition: all 0.2s, transform 0.1s;
}

.calendar-actions .btn:active {
    transform: scale(0.96) translateY(1px) !important;
    box-shadow: none !important;
    opacity: 0.85;
}

/* Style du toast (à ajouter si absent) */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.875rem 1.25rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 99999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #10b981;
    color: white;
}

.toast-error {
    background: #ef4444;
    color: white;
}