/* Styles généraux */
body {
    background-color: #ffffff;
}

/* Header et navigation */
.budget-calculator-header {
    background-color: #00954a;
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.nav-icons {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.nav-icons button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    margin: 0 15px;
    background: none;
    border: 2px solid #00954a;
    border-radius: 10px;
    color: #00954a;
}

.nav-icons button.active {
    background-color: #ffd700;
    border-color: #ffd700;
    color: #000;
}

/* Cartes de dépenses */
.category-section {
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 10px;
}

.essential-section {
    background-color: #ffebee;
}

.extras-section {
    background-color: #fff8e1;
}

.projects-section {
    background-color: #e8f5e9;
}

.expense-card {
    background: white;
    border: 2px solid #00954a;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.expense-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.expense-card.has-data {
    background-color: #ffd700;
    border-color: #ffd700;
}

.icon-container {
    font-size: 2rem;
    margin-bottom: 10px;
}

.icon-container img {
    height: 50px;
}

/* Formulaires */
.form-control,
.form-select {
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 8px 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: #00954a;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Modal */
.modal-header {
    background-color: #00954a;
    color: white;
}

.modal-header .btn-close {
    color: white;
    background-color: transparent;
}

/* Boutons */
.btn-success {
    background-color: #00954a;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* Section budget */
.budget-summary {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.chart-container {
    height: 300px;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .expense-card {
        height: 120px;
    }

    .nav-icons button {
        padding: 8px 15px;
        margin: 0 8px;
        font-size: 14px;
    }
}

/* Animation */
.animate-value {
    animation: highlight 0.5s ease-in-out;
}

@keyframes highlight {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .budget-summary {
        break-inside: avoid;
    }
}


.budget-summary-card {
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.budget-item {
    margin-bottom: 2rem;
}

.budget-item:last-child {
    margin-bottom: 0;
}

.budget-item-title {
    font-size: 1.2rem;
    font-weight: 500;
}

.separator-container {
    margin-bottom: 0.5rem;
}

.separator-image {
    width: 200px;
}

.budget-amount {
    font-size: 1.3rem;
    font-weight: 600;
}

.total-section {
    margin-top: 2rem;
    font-size: 1.4rem;
    font-weight: 500;
}

#total-mensuel {
    font-weight: 600;
    margin-left: 10px;
}

.balance-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.balance-box {
    border: 2px solid #00954a;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 600px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.balance-label {
    font-weight: bold;
}

.balance-divider {
    border-top: 2px solid #000;
    margin: 1.5rem 0;
}


/*STYLE TABS*/
.nav-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto;
    max-width: 600px;
    /* Ajuster selon vos besoins */
    position: relative;
    gap: 0;
    /* Supprime l'espace entre les éléments */
}

/* Container pour chaque étape */
.nav-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    /* Empêche la croissance ou le rétrécissement */
    width: 120px;
    /* Largeur fixe pour chaque étape */
}

/* Cercle */
.nav-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #FFF8DC;
    border: 2px solid #00954a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

/* Icône à l'intérieur du cercle */
.nav-circle img {
    width: 40px;
    /* Taille réduite */
    height: 40px;
    /* Taille réduite */
    object-fit: contain;
}

/* Texte sous le cercle */
.nav-text {
    color: #00954a;
    font-weight: bold;
    margin-top: 10px;
    font-size: 14px;
    /* Taille de police ajustée */
    white-space: nowrap;
    /* Empêche le retour à la ligne */
}

/* Lignes de connexion */
/* Mise à jour du CSS */
/* Style pour l'étape active */
.nav-step.active .nav-circle {
    background-color: #ffd700;
    border-color: #00954a;
}

/* Style pour les connecteurs */
.nav-icons {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px auto;
    max-width: 600px;
    gap: 30px;
    /* Espacement uniforme entre les éléments */
}

.nav-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.nav-connector {
    position: absolute;
    top: 30px;
    width: 100px;
    height: 20px;
    display: none;
    background-image: url(../images/connector-line.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.nav-connector.active {
    display: block;
}

/* Positionnement spécifique pour chaque connecteur */
.nav-connector:nth-child(2) {
    left: calc(33% - 55px);
    /* Ajuster pour le premier connecteur */
}

.nav-connector:nth-child(4) {
    left: calc(66% - 43px);
    /* Ajuster pour le deuxième connecteur */
}

/* Ajustement de la taille des cercles */
.nav-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #FFF8DC;
    border: 2px solid #00954a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 3;
}

/* Style pour le cercle actif */
.nav-step.active .nav-circle {
    background-color: #ffd700;
    border-color: #00954a;
}

/* Style pour le texte */
.nav-text {
    color: #00954a;
    font-weight: bold;
    margin-top: 10px;
    font-size: 14px;
    white-space: nowrap;
    position: relative;
    z-index: 3;
}

.nav-step.active .nav-text {
    color: #000;
}



/* Container principal pour assurer le centrage */
.nav-container {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
}

.tab-content {
    background-color: #F0F0F0;
    border: 2px solid #E3E3E3;
    border-radius: 12px;
    ;
    padding: 50px;
}


.text-center img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 991px) {
    .text-center img {
        width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .text-center img {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .text-center img {
        width: 100%;
    }

    .tab-content {

        padding: 30px;
    }
}

/* ACCORDEON*/
/* Styles pour l'accordéon de dépenses détaillées */
.detailed-expenses .accordion-button {
    background-color: #ffffff;
    color: #00954a;
    font-weight: bold;
    border: 2px solid #00954a;
}

.detailed-expenses .accordion-button:not(.collapsed) {
    background-color: #00954a;
    color: #ffffff;
}

.detailed-expenses .expense-category {
    border-bottom: 1px solid #e3e3e3;
    padding: 15px 0;
    margin-bottom: 10px;
}

.detailed-expenses .expense-category:last-child {
    border-bottom: none;
}

.detailed-expenses .expense-category-title {
    color: #00954a;
    font-weight: bold;
    margin-bottom: 10px;
}

.detailed-expenses .expense-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 20px;
    color: #666;
}

.detailed-expenses .expense-item:hover {
    background-color: #f8f9fa;
}

.detailed-expenses .accordion-body {
    padding: 20px;
}

.detailed-expenses .empty-message {
    color: #666;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* IMPRESSION */
@media print {

    /* Styles généraux pour l'impression */
    body {
        background-color: white !important;
        padding: 0 !important;
        font-size: 12pt;
    }

    .container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Cacher les éléments non nécessaires */
    .nav-container,
    .btn-success,
    .modal,
    .btn-close,
    #btnImprimer,
    #btnExcel,
    .no-print {
        display: none !important;
    }

    /* Style pour le header */
    .budget-calculator-header {
        background-color: white !important;
        color: black !important;
        border: 1px solid #ddd !important;
        padding: 15px !important;
        margin-bottom: 20px !important;
    }

    /* Style pour les cartes et conteneurs */
    .card,
    .budget-summary-card,
    .balance-box {
        break-inside: avoid;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        margin: 10px 0 !important;
    }

    /* Style pour le graphique */
    canvas {
        height: 300px !important;
        width: 300px !important;
        margin: 0 auto !important;
    }

    /* Style pour les accordéons */
    .accordion {
        margin-bottom: 20px !important;
    }

    .accordion-button {
        background-color: white !important;
        color: black !important;
        padding: 10px !important;
    }

    .accordion-button::after {
        display: none !important;
    }

    .accordion-body {
        padding: 10px !important;
    }

    .expense-category {
        break-inside: avoid;
        margin-bottom: 15px !important;
    }

    .expense-item {
        padding: 5px 0 !important;
    }

    /* Style pour les totaux */
    .total-section,
    .balance-item {
        break-inside: avoid;
        font-size: 14pt !important;
        margin: 10px 0 !important;
    }

    /* Forcer les sauts de page aux endroits appropriés */
    .detailed-expenses {
        page-break-before: always;
    }

    /* Ajustements pour le format A4 */
    @page {
        margin: 1cm;
        size: A4;
    }

    /* Optimisation des couleurs pour l'impression */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Style pour le titre de la page */
    .text-center img {
        width: 300px !important;
        margin-bottom: 20px !important;
    }

    /* Style pour les séparateurs */
    .separator-image {
        width: 150px !important;
    }

    /* Amélioration de la lisibilité des montants */
    .budget-amount,
    #total-mensuel,
    #revenus-total,
    #depenses-total,
    #solde-final {
        font-weight: bold !important;
        font-size: 13pt !important;
    }

    /* Style pour les catégories de dépenses */
    .budget-item-title {
        font-size: 13pt !important;
        color: black !important;
    }

    /* Assurer que les totaux sont bien visibles */
    .balance-label {
        font-weight: bold !important;
    }

    .balance-divider {
        border-top: 2px solid black !important;
        margin: 10px 0 !important;
    }

    /* Ajustement pour le graphique camembert */
    .row {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .col-md-6 {
        width: 50% !important;
        flex: 0 0 50% !important;
    }
}


.modal-icon-img img {
    height: 28px;
}