/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    color: #4a5568;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    color: #718096;
    font-size: 1.1em;
}

/* Main content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Formulaire */
.timesheet-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.date-selector {
    margin-bottom: 30px;
}

.date-selector label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.date-selector input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.date-selector input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Grille des heures */
.hours-input h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.time-grid label {
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
}

.time-grid input {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.time-grid input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Paramètres */
.settings {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.settings h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.settings-simple {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-grid label, .settings-simple label {
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
}

.settings-grid input, .settings-simple input {
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1em;
}

/* Bouton de calcul */
.calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Info box */
.info-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.info-box h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box li {
    padding: 8px 0;
    color: #718096;
    position: relative;
    padding-left: 25px;
}

.info-box li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
}

/* Styles pour la page de résultats */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.card h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.4em;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

/* Détails du pointage */
.pointage-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pointage-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.pointage-line:last-child {
    border-bottom: none;
}

.label {
    font-weight: 600;
    color: #4a5568;
}

.value {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.1em;
}

/* Grilles de résultats */
.results-grid, .financial-grid {
    display: grid;
    gap: 15px;
}

.result-item, .financial-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.result-item.positive, .financial-item.positive {
    background: #f0fff4;
    border-left: 4px solid #48bb78;
}

.result-item.negative, .financial-item.negative {
    background: #fffaf0;
    border-left: 4px solid #ed8936;
}

.result-label, .financial-label {
    font-weight: 600;
    color: #4a5568;
}

.result-value, .financial-value {
    font-weight: 700;
    font-size: 1.1em;
}

.result-item.positive .result-value, .financial-item.positive .financial-value {
    color: #38a169;
}

.result-item.negative .result-value, .financial-item.negative .financial-value {
    color: #dd6b20;
}

/* Carte de statut */
.status-card {
    text-align: center;
    padding: 30px;
}

.status-card.positive {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border: 2px solid #48bb78;
}

.status-card.negative {
    background: linear-gradient(135deg, #fffaf0 0%, #fed7aa 100%);
    border: 2px solid #ed8936;
}

.status-message {
    margin-top: 15px;
}

.status-text {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 10px;
}

.status-detail {
    font-size: 1.1em;
    color: #718096;
}

/* Actions */
.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .time-grid, .settings-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Styles d'impression */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .card {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 20px;
    }
    
    .actions {
        display: none;
    }
    
    header {
        background: white;
        box-shadow: none;
        border-bottom: 2px solid #ccc;
    }
}
