/* ==========================================================================
   Portail-Habitat.fr - rubrique Assurance habitation.
   Complète menuiserie.css (tableaux, encarts, simulateur, cartes de catégorie),
   chargé sur les mêmes pages.
   ========================================================================== */

/* Haut de fiche : la case de droite affiche des prix */
html body.assurance-habitation.hv-2 .hero-categorie .numeros-urgence::before { content: "Repères 2026"; }
html body.assurance-habitation .hero-categorie .numero-urgence strong, html body.assurance-habitation .hero-categorie .numero-urgence strong.long { font-size: 1.3rem; }
.as-hero-cat .numeros-urgence::before { content: "Repères 2026"; }

/* ---------- Page formulaire (/assurance-habitation/comparer) ---------- */
.as-formulaire-page { padding-top: 1.5rem; }
.as-formulaire-page .fil-ariane { margin: 0 0 1rem; }
.as-page-form { margin-top: 0; }
.as-page-form .dv-tete h1 { margin: .35rem 0 .6rem; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.25; color: var(--mag-nuit); text-align: left; }
.as-form .as-iframe { margin-top: .5rem; }
.as-form .as-iframe iframe { display: block; width: 100%; border: 0; }
/* le style général du site impose height:auto aux iframes (150 px) : on rend sa hauteur au formulaire */
.as-form .as-iframe #FrnLCA { height: 1000px; max-height: none; }
.as-form .as-mention, .as-prestep-bloc .as-mention { margin: 1rem 0 0; font-size: .82rem; line-height: 1.5; color: #5E6868; }
.as-form .as-mention a, .as-prestep-bloc .as-mention a { color: var(--mag); }
.as-form-haut { margin-top: 0; }

/* ---------- Pré-étape : « Vous êtes : locataire / propriétaire / ... » ---------- */
.as-prestep-question { margin: 0 0 .55rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.as-prestep-choix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.as-choix { display: flex; align-items: center; justify-content: center; min-height: 3rem; padding: .6rem .9rem; border-radius: .7rem; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; transition: background-color .15s, color .15s, transform .1s; }
.as-choix::after { content: "\203A"; margin-left: .45rem; font-size: 1.2em; line-height: 1; }
.as-choix:hover, .as-choix:focus-visible { transform: translateY(-1px); }
/* encart dans le texte (fond bleu canard) */
body .as-cta.as-prestep { align-items: stretch; }
body .as-cta .as-prestep-texte { flex: 1 1 22rem; }
body .as-cta .as-prestep-etape { flex: 1 1 18rem; align-self: center; }
body .as-cta .as-prestep-question { color: var(--jaune); }
body .as-cta .as-choix { background: #fff; color: var(--mag-nuit); }
body .as-cta .as-choix:hover, body .as-cta .as-choix:focus-visible { background: var(--terre); color: #fff; }
/* grand bloc (fond blanc) */
.as-prestep-bloc .as-etape { margin: 0 0 .3rem; font-size: .78rem; font-weight: 700; color: var(--terre); text-transform: uppercase; letter-spacing: .08em; }
.as-prestep-bloc .as-prestep-question { color: var(--mag-nuit); font-size: .95rem; text-transform: none; letter-spacing: 0; }
.as-prestep-bloc .as-prestep-choix { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.as-prestep-bloc .as-choix { min-height: 3.6rem; background: var(--mag-pale); border: 2px solid var(--mag); color: var(--mag-nuit); font-size: 1.02rem; }
.as-prestep-bloc .as-choix:hover, .as-prestep-bloc .as-choix:focus-visible { background: var(--mag); color: #fff; }

/* ---------- Barre fixe en bas de l'écran ---------- */
.as-barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: .8rem 1.5rem; padding: .75rem 3.2rem .75rem 1.25rem; background: var(--mag-nuit); box-shadow: 0 -8px 24px rgba(0,0,0,.18); color: #fff; transform: translateY(110%); transition: transform .25s ease; }
.as-barre.visible { transform: translateY(0); }
.as-barre-texte { margin: 0; font-size: 1rem; line-height: 1.35; color: #fff; }
.as-barre-texte strong { color: #fff; }
.as-barre-texte span { color: #D9ECEA; font-size: .92rem; }
.as-barre .btn { flex: 0 0 auto; margin: 0; background: var(--terre); color: #fff; }
.as-barre .btn span { color: #fff; }
.as-barre .btn:hover { background: var(--terre-fonce); }
.as-barre-m { display: none; }
.as-barre-fermer { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }

/* ---------- Notre sélection (sites recommandés) ---------- */
.as-selection { margin: 2rem 0; padding: 1.4rem 1.5rem; background: #fff; border: 2px solid var(--jaune); border-radius: 1rem; }
.as-selection-titre { margin: 0 0 .9rem; font-size: 1.2rem; font-weight: 800; color: var(--mag-nuit); }
.as-selection-liste { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; counter-reset: sel; }
.as-selection-liste li { position: relative; display: block; margin: 0; padding: 1rem 1rem 1rem 3.2rem; background: var(--mag-pale); border-radius: .8rem; counter-increment: sel; }
.as-selection-liste li::before { content: counter(sel); position: absolute; left: 1rem; top: 1rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--mag); color: #fff; font-weight: 800; font-size: .9rem; line-height: 1.6rem; text-align: center; }
.as-selection-liste p { margin: .45rem 0 .8rem; line-height: 1.55; }
.as-selection-liste .btn { margin: 0; }
.as-selection-liste .btn:not(.contour) { background: var(--terre); color: #fff; }
.as-selection-liste .btn.blanc.contour { background: transparent; color: var(--mag); box-shadow: inset 0 0 0 2px var(--mag); }
.as-selection-badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; background: var(--jaune); color: var(--mag-nuit); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.as-selection-badge.clair { background: var(--mag-clair); }
.as-selection-mention { margin: .8rem 0 0; font-size: .82rem; color: #5E6868; }
.as-selection-court { margin: .2rem 0 1rem; padding: .9rem 1.1rem; background: #FFF6DE; border-left: 4px solid var(--jaune); border-radius: .4rem; line-height: 1.55; }
.as-selection-court span { display: block; margin-top: .3rem; font-size: .82rem; color: #5E6868; }

/* ---------- Simulateur et outils ---------- */
.as-lignes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }
.as-simulateur .as-lignes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.as-options { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1.1rem 0 0; padding: 0; border: 0; }
.as-options legend { width: 100%; margin-bottom: .4rem; padding: 0; font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #4A5555; }
.mn-simulateur .as-option { flex-direction: row; align-items: center; gap: .45rem; font-size: .95rem; }
.mn-simulateur .as-option input { width: 1.1rem; height: 1.1rem; accent-color: var(--mag); }
.mn-simulateur .as-option span { font-size: .95rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: #1B2626; }
.mn-simulateur label[hidden] { display: none; }
.as-lettre .as-lettre-texte { margin-top: 1.1rem; }
.mn-simulateur .as-lettre-texte textarea { height: auto; min-height: 22rem; padding: .9rem 1rem; font-family: inherit; font-size: .95rem; line-height: 1.55; white-space: pre-wrap; background: #FBFAF7; }
.as-lettre-pj { margin: .8rem 0 0; padding: .7rem 1rem; background: #FFF6DE; border-left: 4px solid var(--jaune); border-radius: .4rem; font-size: .95rem; }
.as-lettre-pj[hidden] { display: none; }
.as-boutons { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.as-boutons .btn { margin: 0; }
.as-boutons .btn:not(.contour) { background: var(--terre); color: #fff; }
.as-boutons .btn.blanc.contour { background: transparent; color: var(--mag); box-shadow: inset 0 0 0 2px var(--mag); }
.as-dates .as-resultat p { margin: 0 0 .7rem; line-height: 1.5; color: #fff; }
.as-dates .as-resultat strong { color: var(--jaune); }
.as-capital-lignes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.as-capital .as-valeur span { color: var(--terre); }

/* ---------- Catégorie ---------- */
.as-hero-cat h1 em { color: var(--jaune); font-style: normal; }

@media (max-width: 1000px) {
	.as-simulateur .as-lignes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.as-lignes, .as-simulateur .as-lignes, .as-capital-lignes { grid-template-columns: minmax(0, 1fr); }
	.as-prestep-bloc .as-prestep-choix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.as-barre { padding: .6rem 3.1rem .6rem .75rem; }
	.as-barre-texte, .as-barre-d { display: none; }
	.as-barre-m { display: inline; }
	.as-barre .btn { flex: 1 1 auto; padding: .7rem .8rem; font-size: .95rem; line-height: 1.25; text-align: center; white-space: normal; }
	.as-selection { padding: 1.1rem 1rem; }
}
@media (max-width: 767px) {
	body.assurance-habitation .pied { padding-bottom: 5rem; }
}
@media print {
	.as-form, .as-cta, .as-prestep-bloc, .as-barre, .as-selection, .mn-barre-mobile { display: none; }
}

/* Mots longs (noms de sources) dans les cases chiffrées et boutons longs : pas de débordement sur mobile */
body.assurance-habitation .chiffre-cle strong, body.assurance-habitation .chiffre-cle span { overflow-wrap: anywhere; }
body .as-cta .btn { max-width: 100%; white-space: normal; text-align: center; }
@media (max-width: 640px) {
	body .as-cta .btn { flex: 1 1 100%; }
}

/* ---------- Haut de la page catégorie : pousser à comparer ---------- */
.as-hero-compare { padding-bottom: 3rem; }
.as-hero-grille { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; margin-top: 1rem; }
.as-hero-compare h1 { margin: .9rem 0 .8rem; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
.as-hero-compare h1 em { line-height: inherit; font-style: normal; }
.as-hero-compare .as-hero-grille p:not(.fil-ariane) { margin-top: 0; max-width: none; }
.as-hero-compare .as-hero-grille p.as-hero-accroche { margin: 0 0 1.4rem; max-width: 38rem; font-size: 1.12rem; line-height: 1.55; color: #E4F1EF; }
.as-hero-compare .as-hero-accroche strong { color: var(--jaune); }
.as-hero-prestep { max-width: 34rem; padding: 1.1rem 1.2rem 1.2rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 1rem; }
.as-hero-prestep .as-prestep-question { color: var(--jaune); }
.as-hero-prestep .as-prestep-choix { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.as-hero-prestep .as-choix { min-height: 3.4rem; background: #fff; color: var(--mag-nuit); font-size: 1.05rem; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.as-hero-prestep .as-choix:hover, .as-hero-prestep .as-choix:focus-visible { background: var(--terre); color: #fff; }
.as-hero-points { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.as-hero-points li { position: relative; padding-left: 1.3rem; font-size: .92rem; font-weight: 600; color: #fff; }
.as-hero-points li::before { content: "\2713"; position: absolute; left: 0; color: var(--jaune); }
.as-hero-prix { padding: 1.5rem 1.5rem 1.3rem; background: #fff; border-radius: 1.1rem; box-shadow: 0 18px 40px rgba(0,0,0,.25); color: var(--mag-nuit); }
.as-hero-compare .as-hero-prix .as-hero-prix-titre { max-width: none; margin: 0 0 .8rem; font-size: .8rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--terre); }
.as-hero-prix ul { margin: 0; padding: 0; list-style: none; }
.as-hero-prix li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .65rem 0; border-bottom: 1px dashed #D5DEDC; }
.as-hero-prix li span { font-size: .98rem; color: #34403F; }
.as-hero-prix li strong { font-size: 1.35rem; font-weight: 800; color: var(--mag); white-space: nowrap; }
.as-hero-compare .as-hero-prix .as-hero-prix-note { max-width: none; margin: .8rem 0 1rem; font-size: .8rem; line-height: 1.45; color: #5E6868; }
.as-hero-prix .btn { display: block; margin: 0; text-align: center; background: var(--terre); color: #fff; }
.as-hero-prix .btn:hover { background: var(--terre-fonce); }
.as-hero-estimer { display: block; margin-top: .7rem; text-align: center; font-size: .9rem; color: var(--mag); }
@media (max-width: 900px) {
	.as-hero-grille { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
	.as-hero-prestep { max-width: none; }
}

/* ---------- V3.3 : formulaire du partenaire en pleine largeur du cadre ----------
   L'iframe va d'un filet à l'autre du cadre ; les marges blanches internes du formulaire
   du partenaire (environ 28 px de chaque côté) sont masquées. À ajuster si besoin : --as-rogne. */
.as-form .as-iframe { --as-rogne: 28px; margin: .5rem -2rem 0; overflow: hidden; }
.as-form .as-iframe #FrnLCA, .as-form .as-iframe iframe { width: calc(100% + 2 * var(--as-rogne)) !important; max-width: none; margin-left: calc(-1 * var(--as-rogne)); }
@media (max-width: 640px) { .as-form .as-iframe { margin-left: -1rem; margin-right: -1rem; } }
.as-form .as-mention a, .as-prestep-bloc .as-mention a { text-decoration: underline; text-underline-offset: 2px; }
