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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8f2ff 0%, #f5f8fc 50%, #e1ecf7 100%);
    min-height: 100vh;
    padding: 20px;
    color: #2c3e50;
}

/* Container principal */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(71, 106, 140, 0.12);
    overflow: hidden;
    border: 1px solid rgba(71, 106, 140, 0.1);
}

/* Header */
.header {
    background: linear-gradient(135deg, #5a7a9a 0%, #4a6785 100%);
    color: #ffffff;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 400;
    letter-spacing: -0.5px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1em;
    font-weight: 300;
}

/* Section calculateur */
.calculator {
    padding: 40px;
}

/* Groupes de formulaire */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 1.1em;
}

/* Champs de saisie */
input, select {
    width: 100%;
    padding: 15px;
    border: 2px solid #d5dde6;
    border-radius: 8px;
    font-size: 1.1em;
    transition: all 0.3s ease;
    background: #fafbfc;
    color: #2c3e50;
}

input:focus, select:focus {
    outline: none;
    border-color: #5a7a9a;
    box-shadow: 0 0 0 3px rgba(90, 122, 154, 0.15);
    background: #ffffff;
}

/* Sélecteur de statut */
.status-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.status-option {
    position: relative;
}

.status-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.status-option label {
    display: block;
    padding: 15px;
    border: 2px solid #d5dde6;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
    margin-bottom: 0;
    font-weight: 500;
}

.status-option input[type="radio"]:checked + label {
    border-color: #5a7a9a;
    background: #5a7a9a;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 122, 154, 0.25);
}

/* Bouton de calcul */
.calculate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #4a6785 0%, #5a7a9a 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 30px 0;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 122, 154, 0.3);
    background: linear-gradient(135deg, #3f5a75 0%, #4f6f8a 100%);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Section des résultats */
.results {
    display: none;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    border: 1px solid rgba(71, 106, 140, 0.1);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.1em;
}

.result-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.3em;
    color: #4a6785;
    background: #ffffff;
    margin: 20px -15px -15px;
    padding: 20px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(71, 106, 140, 0.1);
}

.result-label {
    font-weight: 600;
    color: #475569;
}

.result-value {
    font-weight: 700;
    color: #64748b;
}

.result-item:last-child .result-value {
    color: #4a6785;
}

/* Détail des cotisations */
.breakdown {
    margin-top: 30px;
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(71, 106, 140, 0.1);
}

.breakdown h3 {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 600;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.95em;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item span:first-child {
    font-weight: 500;
}

.breakdown-item span:last-child {
    font-weight: 600;
    color: #475569;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    
    .calculator {
        padding: 25px;
    }
    
    .status-selector {
        grid-template-columns: 1fr;
    }
    
    .result-item {
        font-size: 1em;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .result-item:last-child {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .calculator {
        padding: 20px;
    }
    
    input, select {
        padding: 12px;
        font-size: 1em;
    }
    
    .calculate-btn {
        padding: 15px;
        font-size: 1.1em;
    }
    
    .breakdown-item {
        flex-direction: column;
        gap: 2px;
        padding: 8px 0;
    }
}
