/* assets/css/style.css */
:root {
    --primary-color: #4a90e2;
    --success-color: #28a745;
    --danger-color: #dc3545;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f8f9fa;
    padding-bottom: 80px;
}

/* Bouton de présence */
.presence-btn {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    font-size: 3rem;
    border: 4px solid rgba(255,255,255,0.5);
    box-shadow: 0 0 0 0 rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.presence-btn:active:not(:disabled),
.presence-btn.pressing {
    transform: scale(0.95);
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.presence-btn.btn-success {
    background: linear-gradient(145deg, #34ce57, #28a745);
    color: white;
    border-color: #28a745;
}

.presence-btn.btn-danger {
    background: linear-gradient(145deg, #ff6b6b, #dc3545);
    color: white;
    border-color: #dc3545;
}

.presence-btn.btn-secondary {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.presence-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.presence-btn .btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.presence-btn .btn-icon {
    font-size: 3rem;
    line-height: 1;
}

.presence-btn .btn-label {
    font-size: 0.8rem;
    margin-top: 5px;
    font-weight: 500;
}

/* Animation de pulsation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.presence-btn.btn-success:not(:disabled):hover {
    animation: pulse 1.5s infinite;
}

@keyframes pulse-danger {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.presence-btn.btn-danger:not(:disabled):hover {
    animation: pulse-danger 1.5s infinite;
}

/* Timer display */
#timer-display {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

/* Progress ring */
.progress-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
}

/* Header */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    color: white !important;
}

.navbar .nav-link {
    color: rgba(255,255,255,0.9) !important;
}

.navbar .nav-link:hover {
    color: white !important;
}

/* Cards */
.card {
    border-radius: 15px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* Statistiques cards */
.card.bg-primary, 
.card.bg-success, 
.card.bg-warning, 
.card.bg-danger {
    border-radius: 15px;
    border: none;
    transition: transform 0.2s ease;
}

.card.bg-primary:hover,
.card.bg-success:hover,
.card.bg-warning:hover,
.card.bg-danger:hover {
    transform: scale(1.02);
}

/* Mobile optimization */
@media (max-width: 768px) {
    .presence-btn {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }
    
    .presence-btn .btn-label {
        font-size: 0.7rem;
    }
    
    #timer-display {
        font-size: 1.5rem;
    }
}

/* Alert customization */
.alert {
    border-radius: 12px;
    border: none;
}

/* Progress bar customization */
.progress {
    border-radius: 10px;
    overflow: hidden;
    background: #e9ecef;
}

.progress-bar {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 30px;
}

/* Table customization */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* PWA specific */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Smooth scrolling */
* {
    -webkit-overflow-scrolling: touch;
}

/* Loading spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Badge styling */
.badge {
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
}