body {
    font-family: 'Inter', sans-serif;
    background-color: #0b0f1a;
    color: #e2e8f0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    /* Empêcher le pull-to-refresh sur mobile */
    overscroll-behavior: none;
}

.glass-panel {
    background: rgba(22, 30, 45, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.2s ease;
    width: 100%;
}

.glass-input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: #3b82f6;
    outline: none;
}

.dashboard-tile {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

@media (min-width: 640px) {
    .dashboard-tile {
        min-height: 160px;
    }
}

@media (min-width: 768px) {
    .dashboard-tile {
        min-height: 180px;
    }
}

.dashboard-tile:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
}

.dashboard-tile:active {
    transform: scale(0.97);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

@media print {
    .no-print {
        display: none !important;
    }
}

/* Date picker wrapper */
.date-picker-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.date-picker-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Box sizing global */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.3s ease-out;
}

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

/* Empêcher zoom auto sur les inputs en mobile/tablette */
@media (max-width: 1023px) {

    input,
    textarea,
    select,
    button {
        font-size: 16px !important;
    }

    /* Réduire un peu les grandes polices */
    input.glass-input,
    textarea.glass-input {
        font-size: 14px !important;
    }
}

/* Smooth scroll */
html,
body {
    scroll-behavior: smooth;
}

/* Auto-resize des textareas */
textarea.glass-input {
    transition: height 0.15s ease-out, background 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

/* Touch scrolling */
.overflow-y-auto {
    -webkit-overflow-scrolling: touch;
}

/* No scrollbar */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Touch feedback pour les boutons */
@media (hover: none) {
    .dashboard-tile:hover {
        transform: none;
        filter: none;
    }

    .dashboard-tile:active {
        transform: scale(0.97);
        filter: brightness(1.1);
    }
}

/* Safe area pour les appareils avec encoche */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Petits écrans (<= 360px) */
@media (max-width: 360px) {
    .glass-input {
        padding: 4px 8px;
        font-size: 13px !important;
    }
}