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

:root {
    --primary-color: #4A90E2;
    --primary-dark: #357ABD;
    --success-color: #5CB85C;
    --background: #F5F7FA;
    --card-bg: #FFFFFF;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --border-radius: 16px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Boutons Jour et Nuit */
.action-section {
    text-align: center;
    margin-bottom: 40px;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.log-button {
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 24px 20px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.day-button {
    background: linear-gradient(135deg, #FDB44B, #F59E0B);
}

.day-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(253, 180, 75, 0.4);
}

.night-button {
    background: linear-gradient(135deg, #6366F1, #4F46E5);
}

.night-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.4);
}

.log-button:active {
    transform: scale(0.98);
}

.button-icon {
    font-size: 2.5rem;
}

.button-text {
    font-size: 1.1rem;
}

/* Feedback */
.feedback {
    margin-top: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feedback.show {
    opacity: 1;
}

.feedback.success {
    background: #d4edda;
    color: #155724;
}

.feedback.error {
    background: #f8d7da;
    color: #721c24;
}

/* Statistiques */
.stats-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

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

/* Historique */
.history-section {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.history-section h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    padding: 16px;
    background: var(--background);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-date {
    font-weight: 600;
    color: var(--text-primary);
}

.history-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-style: italic;
}

/* Animation de chargement */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }

    h1 {
        font-size: 2rem;
    }

    .log-button {
        padding: 24px 48px;
    }

    .stats-section {
        gap: 12px;
    }

    .stat-card {
        padding: 20px;
    }
}
