/* Variables CSS pour les thèmes */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root.clair {
    --bg-color: #f1f8fe; /* Couleur fond */
    --text-color: #333;
    --form-bg: #ffffff;
    --button-bg: #3c70c9; /* couleur des boutons*/
    --button-hover:#195cd1 ;
    --highlight-color: hsl(207, 99%, 65%);
    --nav-bg: #ffffff;
    --nav-hover: #4b97e3;
}

/*

:root.sombre {
    --bg-color: #2c3e50;
    --text-color: #ecf0f1;
    --form-bg: #34495e;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --input-border: #7f8c8d;
    --input-focus: #1abc9c;
    --button-bg: #1abc9c;
    --button-hover: #16a085;
    --result-bg: #3d566e;
    --highlight-color: #f1c40f;
    --chart-bg: #34495e;
    --ad-bg: #4a3b1f;
    --ad-text: #f1c40f;
    --ad-link: #1abc9c;
    --nav-bg: #34495e;
    --nav-hover: #1abc9c;
}
/*

/* Styles généraux */
/* Supprimer les marges et paddings du body pour coller la navbar en haut */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-color);
    margin: 0; /* Déjà présent, mais vérifie qu’il n’est pas modifié ailleurs */
    padding: 0; /* Remplace padding: 20px par 0 pour supprimer l’espace en haut */
    color: var(--text-color);
    display: flex;
    align-items: center; /* Centre le contenu */
    flex-direction: column;
    min-height: 100vh;
}


/* Assure que la navbar utilise flexbox pour l'alignement */
/* Style de base pour les liens du menu */
/* Ajuster la navbar */
.navbar {
    background-color: var(--nav-bg);
    /*padding: 0 20px; /* Padding vertical à 0 pour contrôler précisément avec min-height */
    min-height: 55px; /* Hauteur minimale de 70px */
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    width: 100%;
}

.navbar-brand {
    font-size: 1.2em; /* Légère augmentation (de 1.2em à 1.4em) pour remplir l’espace */
    font-weight: bold;
    margin-left: 10px;
}

.navbar-brand a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-brand a:hover {
    color: var(--nav-hover);
}

/* Réduire la taille du texte du menu */
.navbar-menu {
    list-style: none;
    margin-right: 5px;
    padding: 0;
    display: flex;
    gap: 20px; /* Réduit de 20px à 15px pour un espacement plus compact */
}

.navbar-menu li {
    display: inline;
}

.navbar-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9em;
    padding: 12px 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar-menu a:hover {
    background-color: var(--nav-hover);
    color: white;
    border-radius: 5px;
}

/* Supprime la couleur fixe pour .active et laisse les classes spécifiques gérer ça */
.navbar-menu a.active {
    /*background-color: var(--button-bg); */
    color: white; /* Garde le texte blanc pour lisibilité */
    border-radius: 5px;
}


/* Couleurs spécifiques pour chaque page active, alignées avec les bandeaux */
.navbar-menu a.active-index {
    background-color: #1c1b1b; /* Noir, comme .banner-accueil */
}

.navbar-menu a.active-calcul {
    background-color: #060a60; /* Bleu, comme .banner-index */
}

.navbar-menu a.active-comparison {
    background-color: #074b0d; /* Vert, comme .banner-comparaison */
}

.navbar-menu a.active-documentation {
    background-color: #7f8c8d; /* Gris, comme .banner-documentation */
}

.main-wrapper {
    display: flex; /* Ou autre disposition */
    justify-content: center; /* Centre le contenu */
    align-items: center; /* Centre le contenu */
    width: 88%;
    padding: 15px 0px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Style du bandeau publicitaire à droite */
.ad-banner {
    background-color: var(--ad-bg);
    color: var(--ad-text);
    padding: 0px;
    text-align: center;
    font-size: 1.1em;
    border-left: 2px solid var(--shadow-color);
    box-shadow: -2px 0 10px var(--shadow-color);
    width: 5%;
    /*min-width: 200px;*/
    height: calc(100vh - 60px); /* Ajusté pour le menu */
    position: sticky;
    top: 60px; /* Décalé sous le menu */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Style du bandeau publicitaire à gauche */
.ad-banner-left {
    background-color: var(--ad-bg);
    color: var(--ad-text);
    padding: 0px;
    text-align: center;
    font-size: 1.1em;
    border-right: 2px solid var(--shadow-color);
    box-shadow: 2px 0 10px var(--shadow-color);
    width: 5%;
    /*min-width: 200px;*/
    height: calc(100vh - 60px); /* Ajusté pour le menu */
    position: sticky;
    top: 60px; /* Décalé sous le menu */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ad-banner a, .ad-banner-left a {
    color: var(--ad-link);
    text-decoration: none;
    font-weight: bold;
}

.ad-banner a:hover, .ad-banner-left a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 2.5em;
    color: var(--text-color);
    text-align: center;
    margin: 20px 0 30px;
    font-weight: bold;
}

.container {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 1100px; /* Augmenté de 960px à 1100px pour plus d'espace */
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.left-section {
    flex: 1;
    max-width: none;
}

.right-section {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    gap: px;
}

h2 {
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--text-color);
    border-bottom: 2px solid var(--input-focus);
    padding-bottom: 5px;
}

/* Style pour les titres de catégorie */
h3 {
    font-size: 1.3em;
    color: var(--button-bg); /* Couleur bleue pour contraste */ /*var(--text-color);*/
    margin: 20px 0 10px;
    border-bottom: none; /*1px solid var(--input-border);*/
    padding-bottom: 5px;
}

form {
    background-color: var(--form-bg);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

label {
    font-weight: 600;
    color: var(--text-color);
    display: block;
    margin-bottom: 8px;
}

.input-group {
    margin: 5px 0;
}

input[type="number"] {
    width: 45%;
    min-width: 90px;
    padding: 8px;
    margin-bottom: 5px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    background-color: var(--form-bg);
    color: var(--text-color);
}

input[type="number"]:focus {
    border-color: var(--highlight-color);
    box-shadow: 0 0 5px rgba(60, 112, 201, 0.3);
    transition: all 3s ease;
}

input[type="number"].partFiscale-style {
    width: 15%; /* exemple de modification */
    min-width: 60px
    /* autres propriétés selon tes besoins */
}

input[type="number"].impotRevenu-style {
    width: 22%; /* exemple de modification */
    /* autres propriétés selon tes besoins */
}

/* Intégration des cases "auto" dans le label */
.input-group label {
    display: flex;
    align-items: center;
    gap: 5px; /* Espacement entre éléments */
    font-size: 0.9em; /* Légère réduction */
}

input:focus, select:focus {
    border-color: var(--input-focus);
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

button {
    background-color: var(--button-bg);
    border-radius: 8px;
    padding: 10px 20px; /* Taille raisonnable, ajustable */
    font-size: 1em;
    width: auto; /* Remplace width: 100% par width: auto */
    display: flex; /* Permet au bouton de s’adapter à son contenu */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    color: white; /* Ajoute cette ligne pour le texte en blanc */
    border: none; /* Optionnel : supprime la bordure par défaut si présente */
    align-items: center; /* Centre verticalement */
}

button:hover {
    background-color: var(--button-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
}

.button-container {
    text-align: center; /* Centre le bouton */
    margin-top: 20px; /* Espacement au-dessus */
}

#resultat {
    background-color: var(--result-bg);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1em;
    color: var(--text-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    background-color: #f9f9f9; /* Gris clair pour contraste */
}

#resultat strong {
    color: var(--highlight-color);
}

.chart-container {
    height: 300px; /* Réduit de 350px */
    padding: 10px; /* Réduit de 25px */
    background-color: #fff;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    margin: auto;
}

/* Style du sélecteur de thème */
.theme-selector {
    text-align: center;
    margin-bottom: 20px;
}

.theme-selector label {
    margin-right: 10px;
}

.theme-selector select {
    width: auto;
    display: inline-block;
}

/* Style pour les groupes de champs dans chaque catégorie */
.category {
    margin-bottom: 0px;
    align-items: center;
}

/* Réduire l'espacement après le dernier champ de chaque catégorie */
.category input[type="number"]:last-child {
    margin-bottom: 0;
}
.category input[type="number_partFiscale"]:last-child {
    margin-bottom: 0;
}

/* Ajouter après les styles existants */

/* Style pour le point d'info */
.info-point {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: var(--button-bg);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    margin-left: 5px;
    position: relative;
}

.tooltip-container {
    display: inline-block;
    position: relative;
}

.tooltip {
    position: absolute;
    background-color: var(--form-bg);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 2px 8px var(--shadow-color);
    width: 200px;
    font-size: 0.9em;
    z-index: 10;
    opacity: 0.95;
    text-align: center;
    /* Supprimer les valeurs par défaut qui pourraient interférer */
    top: auto;
    left: auto;
    transform: none;
}

.tooltip a {
    color: var(--input-focus);
    text-decoration: underline;
    font-weight: bold;
}

.tooltip a:hover {
    color: var(--button-hover);
}

.indented {
    display: inline-block;
    padding-left: 30px;
    max-width: 100%;
}

select[multiple] {
    height: 100px; /* Hauteur fixe pour afficher plusieurs options */
    width: 100%;
    padding: 10px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background-color: var(--form-bg);
    color: var(--text-color);
}

/* Style de base pour tous les bandeaux */
.header-banner {
    width: 100%;
    text-align: center;
    color: white; /* Texte blanc par défaut pour lisibilité */
    font-weight: bold;
    position: relative; /* Garde position: relative pour un placement simple */
    top: 0;
    left: 0;
    z-index: 900; /* Réduit à une valeur inférieure à celle de la navbar (1000) */
}

/* Bandeau spécifique pour la page Accueil (noir, haut) */
.banner-accueil {
    background-color: #000000; /* Noir */
    height: 200px; /* Hauteur importante */
    line-height: 200px; /* Centre le texte verticalement */
    font-size: 3em; /* Taille du texte */
}

/* Bandeau spécifique pour la page Index (bleu, moins haut, avec texte) */
.banner-index {
    background-color: #060a60; /* Bleu */
    height: 110px; /* Moins haut */
    line-height: 110px; /* Centre le texte verticalement */
    font-size: 2em; /* Taille du texte "Calcul" */
}

/* Bandeau spécifique pour la page Comparaison (exemple : vert) */
.banner-comparaison {
    background-color: #074b0d; /* Vert */
    height: 110px; /* Moins haut */
    line-height: 110px; /* Centre le texte verticalement */
    font-size: 2em; /* Taille du texte */
}

/* Bandeau spécifique pour la page Documentation (exemple : gris) */
.banner-documentation {
    background-color: #7f8c8d; /* Gris */
    height: 110px; /* Moins haut */
    line-height: 110px; /* Centre le texte verticalement */
    font-size: 2em; /* Taille du texte */
}

.site-footer {
    background-color: #1A202C; /* Couleur sombre inspirée de text.html */
    color: #ffffff; /* Texte clair */
    padding: 20px 0; /* Espacement vertical */
    text-align: center;
    width: 100%;
    position: relative; /* Pour s'assurer qu'il reste en bas */
    bottom: 0;
}

.footer-container {
    max-width: 1100px; /* Largeur max inspirée de text.html */
    margin: 0 auto; /* Centrage */
    padding: 0 20px; /* Espacement latéral */
}

.footer-text {
    margin: 0 0 10px 0; /* Espacement sous le texte */
    font-size: 14px;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px; /* Espacement entre les liens */
}

.footer-menu li {
    display: inline;
}

.footer-menu a {
    color: #ffffff; /* Liens en blanc */
    text-decoration: none;
    font-size: 14px;
}

.footer-menu a:hover {
    color: #4A90E2; /* Couleur au survol, inspirée de text.html */
}

/* Grille pour la section Salaire */
.salary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.salary-background {
    background-color: #e6f0fa; /* Fond bleu pâle */
    border-radius: 6px; /* Coins arrondis pour un look doux */
    margin: 10px auto;
    padding: 5px 10px; /* Ajoute un peu de padding pour l'esthétique */
}

/* Style par défaut (mode auto désactivé) */
.auto-calc {
    cursor: pointer; /* Pour indiquer que c'est cliquable */
    color: #666; /* Couleur par défaut, un gris discret */
    font-weight: normal;
}

/* Style quand le mode auto est activé */
.auto-calc[data-auto="true"] {
    color: var(--button-bg); /* Bleu pour indiquer que c'est actif */
    font-weight: bold; /* Texte en gras */
}

/* Style quand le mode auto est désactivié */
.auto-calc[data-auto="false"] {
    color: #9cada0; /* Bleu pour indiquer que c'est actif */
    font-weight: normal; /* Texte en gras */
}

input[type="number"]:disabled {
    background-color: #f0f0f0; /* Fond grisé pour indiquer qu'il est désactivé */
    opacity: 0.7; /* Légère transparence */
}

/* Dans styles.css */
.house-logo {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    margin-right: 8px;
}

.mail-logo {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 2px;
    margin-left: 6px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

@media (max-width: 768px) {
    .house-logo {
        width: 24px;
        height: 24px;
    }
    .mail-logo {
        width: 20px;
        height: 20px;
        margin-left: 0px;
        margin-right: 0px;
    }
    .navbar-brand span {
        font-size: 1em;
    }
}

/* Responsive : ajuste pour petits écrans */
@media (max-width: 850px) {
    .navbar {
        /*padding: 8px 10px; /* Réduit légèrement le padding */
        min-height: 40px; /* Hauteur plus compacte */
    }
    .navbar-brand {
        font-size: 1.1em; /* Taille légèrement réduite */
        /*margin-bottom: 5px; /* Moins d'espace sous le logo */
    }
    .navbar-menu {
        gap: 1px; /* Réduit l'espacement entre les liens */
    }
    .navbar-menu a {
        font-size: 0.85em; /* Texte plus petit pour compacité */
        padding: 8px 10px; /* Boutons plus petits */
    }
    .navbar-menu displayOff-responsive-2 {
        display: none;
    }
}

@media (max-width: 950px) {
    .navbar-menu displayOff-responsive {
        display: none;
    }
}

@media (max-width: 570px) {
    .navbar-brand displayOff-responsive {
        display: none;
    }
}

/* Responsive : ajuste les bandeaux sur petits écrans */
@media (max-width: 768px) {
    .banner-accueil {
        height: 100px; /* Réduit de 200px à 100px */
        line-height: 100px;
        font-size: 1.8em; /* Texte plus petit mais lisible */
        
    }
    .banner-index, .banner-comparaison, .banner-documentation {
        height: 40px; /* Réduit de 50px à 40px */
        line-height: 40px;
        font-size: 0.9em; /* Texte adapté pour petits écrans */
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.8em; /* Réduit de 2em pour compacité */
        margin: 15px 10px; /* Moins d'espace vertical */
    }
    h2 {
        font-size: 1.4em; /* Réduit pour les sous-titres */
    }
    h3 {
        font-size: 1.1em; /* Réduit pour les titres de catégorie */
    }
    p {
        font-size: 0.8em; /* Texte général plus compact */
    }
}

@media (min-width: 769px) and (max-width: 1000px) {
    .estimation-block {
        max-width: 90%;
    }
    .image-section img {
        width: 90%; /* Légère réduction pour tablettes */
    }
    .navbar-menu {
        gap: 15px; /* Espacement intermédiaire */
    }
    .banner-accueil {
        height: 150px;
        line-height: 150px;
        font-size: 2.5em;
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding: 15px 0; /* Réduit le padding vertical */
    }
    .footer-container {
        padding: 0 10px; /* Réduit les marges latérales */
    }
    .footer-text {
        font-size: 12px; /* Texte plus petit */
    }
    .footer-menu {
        gap: 10px; /* Moins d'espace entre les liens */
        flex-wrap: wrap; /* Permet aux liens de passer à la ligne si nécessaire */
    }
    .footer-menu a {
        font-size: 12px; /* Liens plus petits */
    }
}

/* Responsive design */
@media (max-width: 1000px) {
    .main-wrapper {
        flex-direction: column;
        /*justify-content: center;*/
        align-items: center;
        width: 100%;
    }
    form {
        padding: 20px;
    }
    .container {
        flex-direction: column;
        width: auto;
        padding-top: 0px;
    }
    .salary-grid {
        grid-template-columns: 1fr 1fr; /* Une colonne sur mobile */
    }
    .ad-banner, .ad-banner-left {
        width: 100%;
        height: auto;
        position: static;
        border-left: none;
        border-right: none;
        border-bottom: 2px solid var(--shadow-color);
    }
    .ad-banner-left {
        border-bottom: none;
        border-top: 2px solid var(--shadow-color);
    }
    .left-section, .right-section {
        max-width: 100%;
    }
    .chart-container {
        height: 250px;
    }
    .auto-calc {
        /*display: block;  Passe en dessous sur petits écrans */
        margin-left: 0;
        margin-top: 5px;
    }
}

@media (max-width: 500px) {
    .salary-grid {
        grid-template-columns: 1fr; /* Une colonne sur mobile */
    }
}

.content {
    width: 100%;
    height: auto; /* S'adapte au contenu */
    box-sizing: border-box;
}
.content ul li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.link-icon {
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0; /* Empêche l'icône de se déformer */
}
.content ul li txt-responsive {
    display: flex;
    flex-direction:row
}

@media (max-width: 500px) {
    .content ul {
        padding-left: 10px;
    }
    .content ul li {
        font-size: 0.8em; /* Texte général plus compact */
    }
    .content ul li txt-responsive {
        flex-direction: column;
    }
    .indented {
        font-size: 0.8em; /* Texte général plus compact */
        padding-left: 10px;
    }
}

@media (max-width: 1300px) {
    .content ul li txt-responsive {
        flex-direction: column;
    }
}

.cta-link-on-black {
    display: inline-block;
    padding: 5px 5px;
    background-color: white;
    color: black;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    margin-top: 5px;
    transition: background-color 0.3s ease;
}

.cta-link-on-black:hover {
    background-color: #357abd;
}

.linkedin-logo {
    width: auto;
    height: 24px;
    vertical-align: middle;
}

@media (max-width: 700px) {
    .linkedin-logo {
        height: 18px;
    }
}

.navbar-menu a.active-finances {
    background-color: #7f8c8d; /* Gris, comme .banner-documentation */
}

.banner-finances {
    background-color: #2c3e50; /* Bleu sombre pour les pages financières */
    height: 110px;
    line-height: 110px;
    font-size: 2em;
    color: white;
}
.navbar-menu a.active-finances {
    background-color: #2c3e50; /* Même couleur que le bandeau */
}