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

:root {
    --primary-color: #1e3a5f;
    --accent-color: #28a745;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #495057;
    --text-color: #212529;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Main content */
main {
    padding: 2rem 0;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.card h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Formulaire */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input::placeholder {
    color: #adb5bd;
}

/* Bouton */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #218838 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.3);
}

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

/* Résultats */
.result-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid var(--accent-color);
}

.result-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
}

.result-details {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.result-details p {
    margin-bottom: 0.5rem;
}

.result-details strong {
    color: var(--primary-color);
}

.info-box {
    background: #d1ecf1;
    border-left: 4px solid #0c5460;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
}

.info-box p {
    margin: 0;
    color: #0c5460;
}

/* Tableaux */
.source {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.source a {
    color: var(--primary-color);
    text-decoration: none;
}

.source a:hover {
    text-decoration: underline;
}

.table-responsive {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.bareme-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.bareme-table thead {
    background: var(--primary-color);
    color: white;
}

.bareme-table th,
.bareme-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid var(--medium-gray);
}

.bareme-table tbody tr:nth-child(even) {
    background: var(--light-gray);
}

.bareme-table tbody tr:hover {
    background: #e7f3ff;
}

/* FAQ */
.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

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

.faq-item h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--dark-gray);
    line-height: 1.7;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

footer a {
    color: #a8dadc;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive - Mobile first */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .result-amount {
        font-size: 2rem;
    }

    .bareme-table {
        font-size: 0.85rem;
    }

    .bareme-table th,
    .bareme-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.3rem;
    }

    .card {
        padding: 1rem;
    }

    .result-amount {
        font-size: 1.75rem;
    }

    .bareme-table {
        font-size: 0.75rem;
    }

    .bareme-table th,
    .bareme-table td {
        padding: 0.4rem;
    }
}

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

.result-card {
    animation: fadeIn 0.5s ease;
}
