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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

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

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.header h1 i {
    color: #667eea;
    margin-right: 15px;
}

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

/* Sections */
.main section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.main h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.main h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
    margin-right: 15px;
}

/* Configuration section */
.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f7fafc;
}

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

/* Jours grid */
.jours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Interface simplifiée - seulement début/fin */
.horaire-inputs-simple {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.jour-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    padding: 25px;
    color: white;
    box-shadow: 0 10px 25px rgba(240, 147, 251, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.jour-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(240, 147, 251, 0.4);
}

.jour-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.horaire-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.horaire-inputs-simple {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 5px;
    opacity: 0.9;
}

.input-group input {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    font-size: 0.9rem;
}

.input-group input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.jour-total {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-weight: 600;
}

.total-heures {
    font-size: 1.1rem;
    color: #ffd700;
}

/* Récap section */
.recap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.recap-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.recap-card:hover {
    transform: translateY(-3px);
}

.recap-card h3 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
    opacity: 0.9;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
}

/* Actions section */
.actions-section {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.4);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 25px;
        margin-bottom: 25px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .main section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .jours-grid {
        grid-template-columns: 1fr;
    }
    
    .horaire-inputs {
        grid-template-columns: 1fr;
    }
    
    .recap-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .actions-section {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .main h2 {
        font-size: 1.5rem;
    }
    
    .jour-card {
        padding: 20px;
    }
    
    .recap-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main section {
    animation: fadeIn 0.6s ease-out;
}

.main section:nth-child(2) {
    animation-delay: 0.1s;
}

.main section:nth-child(3) {
    animation-delay: 0.2s;
}

.main section:nth-child(4) {
    animation-delay: 0.3s;
}

/* Status buttons */
.jour-status {
    margin-bottom: 15px;
}

.status-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-status {
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    min-width: 60px;
}

.btn-travail {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-travail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.btn-repos {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    color: white;
}

.btn-repos:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(160, 174, 192, 0.4);
}

.btn-conge {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
}

.btn-conge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(246, 173, 85, 0.4);
}

.btn-status.actif {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

/* États des jours selon le statut */
.jour-card.status-repos {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    opacity: 0.8;
}

.jour-card.status-conge {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    opacity: 0.9;
}

.jour-card.status-repos .horaire-inputs-simple,
.jour-card.status-conge .horaire-inputs-simple {
    opacity: 0.5;
    pointer-events: none;
}

.jour-card.status-repos input,
.jour-card.status-conge input {
    background: rgba(255, 255, 255, 0.6);
}

/* État de charge et focus */
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Styles pour les jours non travaillés */
.jour-card.inactif {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    opacity: 0.7;
}

.jour-card.inactif h3 {
    color: #718096;
}

/* Indicateur d'heures supplémentaires */
.heures-supp-positive {
    color: #ffd700 !important;
    font-weight: 700;
}

/* Styles pour le tableau récapitulatif */
.table-recap {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.table-recap th,
.table-recap td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table-recap th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.table-recap tr:hover {
    background: #f7fafc;
}

.table-recap .total-row {
    font-weight: 700;
    background: #edf2f7;
}