/* ==========================================
   CALCULATEUR - SOUS-MENU
========================================== */

.calculateur-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
    column-gap: 8px;
    row-gap: 12px;

    width: 100%;
    margin: 25px 0 35px;
}

/* Boutons plus compacts */
.calculateur-menu-bouton {
    display: flex;
	flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-width: 0;
    min-height: 72px;
    padding: 8px 10px;

    background: #990066;
    border: 1px solid #990066;
    border-radius: 8px;

    color: #fff;
    font-family: inherit;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;

    cursor: pointer;
    transition: background 0.2s ease;
}

.calculateur-menu-bouton:hover {
    background: #76004f;
    color: #fff;
}

.calculateur-menu-actif {
    background: #6d0249;
}

.calculateur-menu-illustration img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Cartes à la même hauteur */
.calculateur-menu-carte {
    display: flex;
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    align-items: center;
    gap: 10px;

    min-width: 0;
    min-height: 72px;
    padding: 10px 12px;

    background: #fff;
    border: 1px solid #e0e0e5;
    border-radius: 8px;

    color: #990066;
    font-family: inherit;
    text-decoration: none;
	justify-content: center;
    text-align: center;

    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.calculateur-menu-carte:hover {
    border-color: #990066;
    background: #fcf9fb;
    color: #990066;
}

/* Bilan thermique : commence une nouvelle ligne */
.calculateur-menu-carte:nth-child(4) {
    margin-left: auto;
}

/* Cours : juste à droite de Bilan thermique */
.calculateur-menu-carte:nth-child(5) {
    margin-right: 0;
}

.calculateur-menu-illustration {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    flex-shrink: 0;

    background: #f5edf2;
    border-radius: 8px;

    color: #990066;
    font-size: 23px;
}

.calculateur-menu-texte {
    flex: 0 1 auto;
    min-width: 0;
    color: #222;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.3;
}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 600px) {

    .calculateur-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 20px auto 30px;
    }

    .calculateur-menu-bouton {
		grid-column: span 1;
		min-height: 65px;
		padding: 8px 6px;
		font-size: 12px;
	}

	.calculateur-menu-carte:nth-child(3) {
		grid-column: span 2;
	}

    .calculateur-menu-carte {
		grid-column: span 1;
		min-height: 70px;
		gap: 7px;
		padding: 8px;
	}

    .calculateur-menu-illustration {
        width: 34px;
        height: 34px;
        font-size: 19px;
    }

    .calculateur-menu-texte {
        font-size: 12px;
    }

}

/* Titre principal de la page devis */
.calculateur-titre {
    font-size: 50px;
    line-height: 1.2;
}

@media (max-width: 600px) {
    .calculateur-titre {
        font-size: 26px;
    }
}


/* ======================================
   MODAL BESOIN D'AIDE
====================================== */

#aide.w3-modal {
    background-color: rgba(0, 0, 0, 0.08);
    padding: 20px 12px;
}

/* Fenêtre */
#aide .aide-modal {
    width: 100%;
    max-width: 460px;
    margin: 6vh auto 0;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

/* Contenu */
#aide .aide-modal-contenu {
    padding: 24px;
}

/* En-tête */
.aide-modal-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 24px;
}

.aide-modal-entete h3 {
    margin: 0;
    color: #990066;
    font-size: 30px;
    font-weight: 600;
}

.aide-modal-entete h3 i {
    margin-right: 8px;
}

/* Croix de fermeture */
.aide-modal-fermer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;
    background: #f5edf2;

    color: #990066;
    font-size: 17px;

    cursor: pointer;
}

.aide-modal-fermer:hover {
    background: #ead9e3;
}

/* Cartes de contact */
.aide-modal-option {
    display: flex;
    align-items: center;
    gap: 14px;

    width: 100%;
    padding: 14px;

    margin-bottom: 12px;

    background: #fff;
    border: 1px solid #e0e0e5;
    border-radius: 10px;

    color: #990066;
    font-family: inherit;
    text-align: left;
    cursor: pointer;

    transition: border-color 0.2s ease, background 0.2s ease;
}

.aide-modal-option:hover {
    border-color: #990066;
    background: #fcf9fb;
}

/* Icône */
.aide-modal-icone {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 44px;
    height: 44px;

    background: #f5edf2;
    border-radius: 9px;

    color: #990066;
    font-size: 22px;
}

/* Texte */
.aide-modal-libelle {
    flex: 1;
    min-width: 0;
    font-size: 17px;
    font-weight: 400;
	color: #222;
}

/* Petite flèche */
.aide-modal-chevron {
    color: #aaa;
    font-size: 13px;
}

/* Formulaires dépliés */

#aide #aidetel .champ,
#aide #aidemail .champ {
    border: 1px solid #ddd;
    border-radius: 7px;
    padding: 10px;
}

/* Mobile */
@media (max-width: 600px) {
    #aide .aide-modal {
        margin-top: 3vh;
    }

    #aide .aide-modal-contenu {
        padding: 18px;
    }

    .aide-modal-entete h3 {
        font-size: 19px;
    }

    .aide-modal-libelle {
        font-size: 15px;
    }
}

/* Texte du modal d'aide */
#aide .aide-modal {
    color: #333;
}

/* Textes des formulaires */
#aide #aidetel,
#aide #aidemail {
    color: #333;
}

/* Champs de saisie */
#aide #aidetel input[type="text"],
#aide #aidemail input[type="text"],
#aide #aidemail textarea {
    color: #333;
    background-color: #fff;
}

#aide #aidetel,
#aide #aidemail {
    padding: 8px 4px 12px;
}

#aide #aidetel p,
#aide #aidemail p {
    margin: 10px 0;
    line-height: 1.5;
    font-size: 15px;
}

#aide #aidetel input[type="submit"],
#aide #aidemail input[type="submit"] {
    float: none !important;
    display: block;
    width: auto;
    margin: 14px 0 8px auto !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
}

#aide .aide-modal-option {
    margin-bottom: 10px;
}

#aide #aidetel:not(.w3-hide),
#aide #aidemail:not(.w3-hide) {
    display: flow-root;
}
