/*
* Nom de l'application : HanoutAI
 * Description : Fichier dashboard.css
 * Produit de : MOA Digital Agency, www.myoneart.com
 * Fait par : Aisance KALONJI, www.aisancekalonji.com
 * Auditer par : La CyberConfiance, www.cyberconfiance.com
*/

* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}
html {
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
}
body {
    padding-bottom: 80px;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: #F5F7FA;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

.page {
    display: none;
}
.page.active { display: block; }

@media (prefers-reduced-motion: no-preference) {
    .page {
        animation: slideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.bottom-nav-item.active { color: #3B82F6; }
.bottom-nav-item.active svg { stroke: #3B82F6; }

/* Modern Grid System - Responsive blocks */
.grid-responsive {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

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

.grid-responsive-3 {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
}

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

/* MOA Card Styles - Dotted Borders */
.card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    border: 3px dotted #d1d5db;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.card-stat {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    border: 3px dotted #3b82f6;
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.card-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(59, 130, 246, 0.2);
}

.card-stat:active {
    transform: translateY(0) scale(0.98);
}

/* Icon Badges */
.icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* MOA Stat Badge with Borders */
.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 2px solid;
}

.stat-badge.up {
    background: #dcfce7;
    color: #166534;
    border-color: #22c55e;
}

.stat-badge.down {
    background: #fce7f3;
    color: #9f1239;
    border-color: #ec4899;
}

/* Touch-friendly improvements */
button, .touchable {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

input, select, textarea {
    font-size: 16px !important;
    touch-action: manipulation;
}

/* Pull to refresh indicator */
.pull-to-refresh {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    transition: top 0.3s;
    z-index: 100;
}

.pull-to-refresh.active {
    top: 20px;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3B82F6;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

/* Safe areas for notched devices */
@supports (padding-top: env(safe-area-inset-top)) {
    header {
        padding-top: env(safe-area-inset-top);
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* MOA List Items - Dotted */
.list-item {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 2px dotted #e5e7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.08);
    border-color: #3b82f6;
        }

.list-item:active {
    transform: translateY(0) scale(0.98);
}

/* MOA Buttons */
.btn-primary {
    background: #eff6ff;
    color: #1d4ed8;
    border: 2px solid #3b82f6;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.15);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #dbeafe;
    border-color: #2563eb;
    box-shadow: 0 6px 10px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f9fafb;
    color: #374151;
    border: 2px solid #9ca3af;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(156, 163, 175, 0.15);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f3f4f6;
    border-color: #6b7280;
    box-shadow: 0 6px 10px rgba(156, 163, 175, 0.3);
    transform: translateY(-2px);
}

/* MOA Dotted Sections */
.section-blue {
    background: rgba(59, 130, 246, 0.05);
    border: 3px dotted #3b82f6;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.section-green {
    background: rgba(34, 197, 94, 0.05);
    border: 3px dotted #22c55e;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(34, 197, 94, 0.1);
    transition: all 0.3s ease;
}

.section-purple {
    background: rgba(168, 85, 247, 0.05);
    border: 3px dotted #a855f7;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(168, 85, 247, 0.1);
    transition: all 0.3s ease;
}

.section-orange {
    background: rgba(249, 115, 22, 0.05);
    border: 3px dotted #f97316;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(249, 115, 22, 0.1);
    transition: all 0.3s ease;
}

.section-cyan {
    background: rgba(6, 182, 212, 0.05);
    border: 3px dotted #06b6d4;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(6, 182, 212, 0.1);
    transition: all 0.3s ease;
}

.section-pink {
    background: rgba(236, 72, 153, 0.05);
    border: 3px dotted #ec4899;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(236, 72, 153, 0.1);
    transition: all 0.3s ease;
}

.section-blue:hover,
.section-green:hover,
.section-purple:hover,
.section-orange:hover,
.section-cyan:hover,
.section-pink:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}
