/* =====================================================
   SECTIONS BONUS & MALUS - Homepage
   Design moderne avec gradients et graphiques
   ===================================================== */

/* Section commune */
.section-bonus-malus {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.section-bonus-malus::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    pointer-events: none;
}

/* =====================================================
   SECTION BONUS
   ===================================================== */
.section-bonus {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
}

.section-bonus::before {
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2327ae60' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.section-bonus .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-bonus .section-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.3);
}

.section-bonus .section-icon svg,
.section-bonus .section-icon img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.section-bonus .section-icon::after {
    content: '📈';
    font-size: 36px;
}

.section-bonus h2.section-title {
    color: #1e7e34;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-bonus .section-subtitle {
    color: #2d6a4f;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Cartes Bonus */
.bonus-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.bonus-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #27ae60;
}

.bonus-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(39, 174, 96, 0.2);
}

.bonus-card h3 {
    color: #1e7e34;
    font-size: 1.2rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bonus-card h3::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

.bonus-card p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Formule de calcul Bonus */
.bonus-formula {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.bonus-formula h3 {
    color: #1e7e34;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.formula-box {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.formula-box code {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
}

/* Graphique Bonus */
.bonus-chart-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.bonus-chart-container h3 {
    color: #1e7e34;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.chart-wrapper {
    position: relative;
    height: 350px;
    width: 100%;
}

/* =====================================================
   SECTION MALUS
   ===================================================== */
.section-malus {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 50%, #ef9a9a 100%);
}

.section-malus::before {
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e74c3c' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.section-malus .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-malus .section-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
}

.section-malus .section-icon::after {
    content: '📉';
    font-size: 36px;
}

.section-malus h2.section-title {
    color: #c0392b;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-malus .section-subtitle {
    color: #922b21;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Cartes Malus */
.malus-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.malus-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #e74c3c;
}

.malus-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(231, 76, 60, 0.2);
}

.malus-card h3 {
    color: #c0392b;
    font-size: 1.2rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.malus-card h3::before {
    content: '!';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: white;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
}

.malus-card p,
.malus-card ul {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.malus-card ul {
    margin-top: 10px;
    padding-left: 20px;
}

.malus-card ul li {
    margin-bottom: 8px;
}

.malus-card ul li strong {
    color: #c0392b;
}

/* Tableau responsabilité */
.responsibility-table {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.responsibility-table h3 {
    color: #c0392b;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.resp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.resp-item {
    background: linear-gradient(135deg, #ffebee, #fff);
    border: 2px solid #ef9a9a;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.resp-item .resp-percent {
    font-size: 2rem;
    font-weight: 700;
    color: #c0392b;
    display: block;
    margin-bottom: 5px;
}

.resp-item .resp-label {
    color: #666;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

.resp-item .resp-impact {
    background: #e74c3c;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
}

/* Formule Malus */
.malus-formula {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.malus-formula h3 {
    color: #c0392b;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.formula-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 700px;
    margin: 0 auto;
}

.formula-item {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.formula-item .formula-label {
    font-weight: 600;
}

.formula-item .formula-calc {
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

/* Graphique Malus */
.malus-chart-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.malus-chart-container h3 {
    color: #c0392b;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.malus-chart-container .chart-description {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #555;
}

.legend-color {
    width: 20px;
    height: 4px;
    border-radius: 2px;
}

.legend-color.green {
    background: #27ae60;
}

.legend-color.red {
    background: #e74c3c;
}

/* Note/Rappel */
.info-note {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-left: 4px solid #ff9800;
    border-radius: 0 12px 12px 0;
    padding: 20px 25px;
    margin-top: 30px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-note::before {
    content: '💡';
    font-size: 24px;
    flex-shrink: 0;
}

.info-note p {
    margin: 0;
    color: #e65100;
    line-height: 1.6;
}

.info-note strong {
    color: #bf360c;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .section-bonus-malus {
        padding: 40px 0;
    }

    .section-bonus h2.section-title,
    .section-malus h2.section-title {
        font-size: 1.6rem;
    }

    .bonus-cards,
    .malus-cards {
        grid-template-columns: 1fr;
    }

    .formula-box {
        font-size: 1rem;
        padding: 15px 20px;
    }

    .formula-item {
        flex-direction: column;
        text-align: center;
    }

    .resp-grid {
        grid-template-columns: 1fr;
    }

    .chart-wrapper {
        height: 280px;
    }

    .chart-legend {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .section-bonus .section-icon,
    .section-malus .section-icon {
        width: 60px;
        height: 60px;
    }

    .section-bonus .section-icon::after,
    .section-malus .section-icon::after {
        font-size: 28px;
    }

    .bonus-card,
    .malus-card {
        padding: 20px;
    }

    .chart-wrapper {
        height: 250px;
    }
}
