.aide-etat-wrap {
  max-width: 1280px;
  margin: 30px auto;
  padding: 0 16px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}


/* Évite tout dépassement / décalage à droite (padding + width + border) */
.aide-etat-wrap,
.aide-etat-wrap * {
  box-sizing: border-box;
}

.aide-etat-card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  padding: 18px;
}

.aide-etat-head {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
}

.aide-etat-title {
  font-size: 32px;
  font-weight: 750;
  line-height: 1.1;
}

.aide-etat-sub {
  margin-top: 10px;
  color: #444;
  font-size: 15px;
}

.aide-etat-disclaimer {
  margin-top: 8px;
  font-size: 12px;
  color: #666;
}

.aide-etat-badge {
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.aide-etat-form {
  margin-top: 16px;
  /* Laisse une respiration visuelle identique à gauche/droite */
  padding: 0 8px;
}

.aide-etat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* Sous-grille pour aligner 2 champs sur une même ligne (ex: MDPH + MSA) */
.aide-etat-row-2 {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 760px) {
  .aide-etat-row-2 { grid-template-columns: 1fr; }
}


@media (min-width: 1024px) {
  .aide-etat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .aide-etat-grid { grid-template-columns: 1fr; }
  .aide-etat-title { font-size: 26px; }
}

.aide-etat-field span {
  display: block;
  font-size: 13px;
  color: #222;
  margin-bottom: 6px;
  font-weight: 600;
}

.aide-etat-field input,
.aide-etat-field select {
  width: 100%;
  border: 1px solid #d8d8d8;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  background: #fff;
  outline: none;
}

.aide-etat-field input:focus,
.aide-etat-field select:focus {
  border-color: #111;
}

.aide-etat-btn {
  margin-top: 14px;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 750;
  color: #fff;
  background: #111;
  cursor: pointer;
}

.aide-etat-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.aide-etat-footnote {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
}

.aide-etat-msg {
  margin-top: 12px;
  border-radius: 14px;
  padding: 12px 12px;
  font-size: 14px;
  border: 1px solid #e6e6e6;
  background: #f8f8f8;
  /* Aligné avec le padding du formulaire */
  margin-left: 8px;
  margin-right: 8px;
}
.aide-etat-msg.error {
  border-color: #f1c0c0;
  background: #fff2f2;
}
.aide-etat-msg.info {
  border-color: #c9d8ff;
  background: #f1f6ff;
}
.aide-etat-msg .muted {
  display: block;
  margin-top: 6px;
  color: #666;
  font-size: 12px;
}

.aide-etat-results {
  margin-top: 18px;
}

/* === Résultats en grille (FORCÉ: 3 fiches par ligne) === */
.results-grid,
.gridCards,
.cardsGrid{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: start;
}

.results-head {
  max-width: 980px;
  margin: 18px auto 12px;
  padding: 0 2px;
}
.results-title {
  font-size: 22px;
  font-weight: 800;
}
.results-sub {
  margin-top: 6px;
  font-size: 13px;
  color: #666;

}

.results-col {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  padding: 12px;
}

.results-col-title {
  font-weight: 800;
  margin-bottom: 10px;
}

.aide-card {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
  background: #fff;
}

.aide-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.aide-name {
  font-weight: 800;
  font-size: 14px;
}

.aide-badge {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #eaeaea;
  white-space: nowrap;
}

.aide-badge.ok { background: #e9f8ee; border-color: #bfe8c7; }
.aide-badge.maybe { background: #fff7e6; border-color: #f0d49a; }
.aide-badge.no { background: #ffecec; border-color: #f1b6b6; }

.aide-meta {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-block;
  font-size: 12px;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid #e6e6e6;
  background: #f7f7f7;
}
.chip-light {
  background: #fff;
}

.aide-reasons {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #444;
  font-size: 13px;
}

/* === Résultats en grille (3 cartes par ligne) === */
.results-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  align-items:start;
}
.results-group-head{
  grid-column:1 / -1;
  display:flex;
  gap:8px;
  align-items:center;
  font-weight:800;
  margin:6px 0 2px;
}
.results-group-head .hint{ font-weight:600; color:#666; }
.results-group-head.ok{ color:#14532d; }
.results-group-head.maybe{ color:#7c2d12; }
.results-group-head.no{ color:#7f1d1d; }

/* (compat) anciennes colonnes */
.results-col{ display: contents; padding:0; border:0; background:transparent; }
.results-col-title{ display:none; }

/* === Actions fiche aide === */
.aide-card-actions{
  margin-top: 10px;
  display:flex;
  justify-content:flex-end;
}
.aide-card-actions .aide-link{
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid #d9d9ff;
  background:#f3f2ff;
  color:#3f37ff;
  font-weight:700;
  font-size:12px;
  text-decoration:none;
}
.aide-card-actions .aide-link:hover{
  filter:brightness(0.98);
}


/* === FORÇAGE GRILLE RÉSULTATS: 3 FICHES PAR LIGNE (simulateur + catalogue) === */
.results-grid,
.gridCards,
.cardsGrid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
  align-items:start !important;
}


/* === AIDE ETAT: rendu unifié fiches (simulateur + catalogue) === */

.results-grid, .gridCards, .cardsGrid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:16px !important;
  align-items:start;
}

@media (max-width: 980px){
  .results-grid, .gridCards, .cardsGrid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}
@media (max-width: 720px){
  .results-grid, .gridCards, .cardsGrid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}

.aide-card{
  background:#fff;
  border:1px solid #eee;
  border-radius:14px;
  padding:14px 14px 12px;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
}

.ae-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.ae-title{
  margin:0;
  font-size:16px;
  line-height:1.25;
  font-weight:700;
}

.ae-pill{
  font-size:12px;
  line-height:1;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid #e6e6e6;
  white-space:nowrap;
  background:#fafafa;
}

.ae-pill.ae-ok{ border-color:#cfead6; background:#f3fbf5; }
.ae-pill.ae-maybe{ border-color:#ffe2b9; background:#fff8ef; }
.ae-pill.ae-no{ border-color:#ffd0d0; background:#fff3f3; }

.ae-chips{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.ae-chip{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid #e7edf6;
  background:#f4f8ff;
}
.ae-chip-muted{ background:#f7f7f7; border-color:#eee; color:#444; }

.ae-amount{
  font-size:13px;
  font-weight:700;
  margin:6px 0 8px;
}

.ae-desc{
  font-size:13px;
  line-height:1.35;
  color:#333;
  margin:0 0 10px;
}

.ae-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:8px;
}

.ae-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid #dbe6ff;
  background:#f5f8ff;
  font-weight:700;
  font-size:13px;
  text-decoration:none;
}

.ae-btn:hover{ filter:brightness(.98); }

/* ===========================
   AIDE ETAT — Options Front
   (onglets, catalogue, cartes)
   =========================== */

.ae-shell { width: 100%; }
.ae-topbar{
  display:flex; gap:14px; align-items:flex-start; justify-content:space-between;
  margin-bottom:12px;
}
.ae-brand .ae-title{ font-size:28px; font-weight:800; line-height:1.1; margin:0; }
.ae-brand .ae-sub{ margin-top:6px; color:#444; font-size:14px; }
.ae-pill{
  align-self:flex-start;
  background:#f6f7fb;
  border:1px solid #e6e6e6;
  padding:8px 10px;
  border-radius:999px;
  font-size:12px;
  color:#333;
  white-space:nowrap;
}

.ae-tabs{
  display:flex;
  gap:8px;
  margin: 10px 0 14px;
}
.ae-tab{
  border:1px solid #e6e6e6;
  background:#fff;
  border-radius:999px;
  padding:10px 14px;
  cursor:pointer;
  font-weight:700;
}
.ae-tab.is-active{
  background:#111;
  color:#fff;
  border-color:#111;
}

.ae-view{ display:none; }
.ae-view.is-active{ display:block; }

.ae-msg{
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e6e6e6;
  background:#fafafa;
  font-size:14px;
}
.ae-msg.error{ border-color:#ffcccc; background:#fff5f5; color:#7a0000; }

.ae-block-title{
  font-size:18px;
  font-weight:800;
  margin-bottom:10px;
}

.ae-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1100px){
  .ae-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .ae-grid{ grid-template-columns: 1fr; }
}

.ae-field span{
  display:block;
  font-size:12px;
  color:#444;
  margin-bottom:6px;
  font-weight:700;
}
.ae-field input, .ae-field select{
  width:100%;
  border:1px solid #e6e6e6;
  border-radius: 12px;
  padding: 10px 12px;
  font-size:14px;
  background:#fff;
}

.ae-btn{
  margin-top:12px;
  border: 1px solid #111;
  background:#111;
  color:#fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight:800;
  cursor:pointer;
}
.ae-btn:disabled{ opacity:0.6; cursor:not-allowed; }
.ae-btn-secondary{
  background:#fff;
  color:#111;
}

.ae-footnote{ margin-top:10px; font-size:12px; color:#555; }
.ae-mini{ font-size:13px; color:#444; margin-top:4px; }

.ae-grid-cards{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 1100px){
  .ae-grid-cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .ae-grid-cards{ grid-template-columns: 1fr; }
}

.ae-card{
  background:#fff;
  border:1px solid #e6e6e6;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  padding: 14px;
  min-width:0;
}
.ae-card-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.ae-card-title{
  font-size:16px;
  font-weight:850;
  line-height:1.2;
}
.ae-status{
  font-weight:850;
  font-size:13px;
  white-space:nowrap;
}
.ae-meta{ margin-top:6px; font-size:12px; color:#444; }
.ae-subcat{ color:#666; }
.ae-amount{ margin-top:8px; font-size:14px; font-weight:850; }
.ae-desc{ margin-top:10px; font-size:13px; color:#333; }
.ae-reasons{ margin-top:8px; font-size:13px; color:#222; }

.ae-actions{
  margin-top: 10px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.ae-link{
  font-size:13px;
  text-decoration:underline;
}

.ae-select{
  margin-left:auto;
  border:1px solid #e6e6e6;
  background:#fff;
  border-radius:999px;
  padding:8px 10px;
  font-weight:800;
  cursor:pointer;
}
.ae-select.is-on{
  border-color:#111;
  background:#111;
  color:#fff;
}

.ae-filters{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:10px;
  align-items:center;
  justify-content:flex-start;
  background:#f6f7fb;
  border:1px solid #e6e6e6;
  border-radius:16px;
  padding:12px;
}
.ae-audience{ display:flex; gap:8px; flex-wrap:wrap; }
.ae-chip{
  border:1px solid #e6e6e6;
  background:#fff;
  border-radius:999px;
  padding:8px 10px;
  cursor:pointer;
  font-weight:800;
  font-size:13px;
}
.ae-chip.is-on{ border-color:#111; background:#111; color:#fff; }

.ae-search{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin-left:auto;
}
@media (max-width: 760px){
  .ae-search{ margin-left:0; width:100%; }
  .ae-search input{ flex:1 1 200px; min-width:0; }
}
.ae-search input{
  border:1px solid #e6e6e6;
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 260px;
  font-size:14px;
  flex: 1 1 320px;
}

.ae-catbar{
  margin-top:12px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.ae-cat{
  border:1px solid #e6e6e6;
  background:#fff;
  border-radius:999px;
  padding:8px 10px;
  cursor:pointer;
  font-weight:850;
  font-size:13px;
}
.ae-cat span{
  margin-left:6px;
  opacity:0.8;
  font-weight:900;
}
.ae-cat.is-on{
  border-color:#111;
  background:#111;
  color:#fff;
}

.ae-subcats{
  margin-top:12px;
  display:flex;
  gap:10px;
  align-items:flex-end;
  flex-wrap:wrap;
}

.ae-more{
  margin-top:12px;
  display:flex;
  justify-content:center;
}
/* ===========================
   AIDE ETAT — Catalogue (filtre rapide + grille catégories)
   Aligné sur les screenshots "Vérifier mes aides".
   =========================== */

.ae-mini{ margin-top:8px; font-size:12px; color:#666; }
.ae-mini code{ background:#f3f3f3; padding:2px 6px; border-radius:8px; }

.ae-catGrid{
  margin-top:14px;
  background:#fff;
  border:1px solid #e6e6e6;
  border-radius:16px;
  padding:12px;
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
}
@media (max-width: 980px){
  .ae-catGrid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px){
  .ae-catGrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ae-catBtn{
  text-align:left;
  border: 1px solid #e6e6e6;
  background: #f6f7fb;
  border-radius: 14px;
  padding: 12px;
  cursor:pointer;
}
.ae-catBtn:hover{ filter: brightness(0.99); }
.ae-catBtn.is-on{
  background:#111;
  border-color:#111;
  color:#fff;
}
.ae-catBtn.is-off{
  opacity: 0.45;
  cursor:not-allowed;
}
.ae-catTitle{ font-weight: 900; font-size: 14px; }
.ae-catCount{ margin-top: 6px; font-size: 12px; opacity: 0.9; }


/* =========================================================
   Harmonisation fiches (Catalogue = Simulateur)
   Objectif: mêmes largeurs, mêmes gras, mêmes espacements
   ========================================================= */
#aide-etat-root .results-grid{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: start !important;
}
@media (max-width: 980px){
  #aide-etat-root .results-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 640px){
  #aide-etat-root .results-grid{ grid-template-columns: 1fr !important; }
}

#aide-etat-root .aide-card{
  background:#fff !important;
  border:1px solid #eee !important;
  border-radius:14px !important;
  padding:14px 14px 12px !important;
  box-shadow:0 6px 20px rgba(0,0,0,0.06) !important;
}

#aide-etat-root .ae-title{
  font-weight:800 !important;
  font-size:16px !important;
  line-height:1.25 !important;
}

#aide-etat-root .results-group-head{
  grid-column:1 / -1 !important;
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  padding:10px 12px !important;
  border:1px solid #e6e6e6 !important;
  border-radius:12px !important;
  background:#f8f8f8 !important;
  font-weight:800 !important;
  margin-top:4px !important;
}



/* =========================================================
   Catalogue — barre filtres propre (répartition + fond blanc)
   Objectif : aligner boutons (Tout/Particulier/Entreprise) + recherche
   + afficher les nombres "X aides" DANS les boutons.
   ========================================================= */
.ae-filters{
  background:#fff !important;
  border:1px solid #e6e6e6 !important;
  border-radius:16px !important;
  padding:14px !important;
  display:grid !important;
  grid-template-columns: 1fr auto !important;
  gap:12px !important;
  align-items:center !important;
}
@media (max-width: 900px){
  .ae-filters{ grid-template-columns: 1fr !important; }
}

.ae-audience{
  display:flex !important;
  gap:10px !important;
  flex-wrap:wrap !important;
  align-items:stretch !important;
}

.ae-chip{
  min-width: 128px;
  padding: 10px 14px !important;
  border-radius: 999px !important;
  border: 1px solid #e6e6e6 !important;
  background: #f3f3f3 !important;
  color:#111 !important;
  font-weight: 850 !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:1.1 !important;
  gap:4px !important;
}
.ae-chip .ae-chip-label{ font-size:13px; font-weight:900; }
.ae-chip .ae-chip-count{ font-size:12px; font-weight:900; color:#555; opacity:.95; }

.ae-chip.is-on{
  background:#111 !important;
  border-color:#111 !important;
  color:#fff !important;
}
.ae-chip.is-on .ae-chip-count{ color:#fff !important; opacity:.9; }

.ae-search{
  margin-left:0 !important;
  display:flex !important;
  gap:10px !important;
  align-items:center !important;
  justify-content:flex-end !important;
  flex-wrap:wrap !important;
}
@media (max-width: 900px){
  .ae-search{ justify-content:flex-start !important; }
}
.ae-search input{
  flex: 1 1 320px !important;
  min-width: 220px !important;
  border:1px solid #e6e6e6 !important;
  border-radius: 14px !important;
  padding: 10px 12px !important;
  background:#fff !important;
}

#ae-q-go{
  border-radius: 14px !important;
  padding: 10px 14px !important;
  border:1px solid #111 !important;
  background:#111 !important;
  color:#fff !important;
  font-weight:900 !important;
}

/* Petite homogénéisation des boutons catégories (déjà en grille) */
.ae-catGrid{
  background:#fff !important;
}
.ae-catBtn{
  background:#f3f3f3;
  border:1px solid #e6e6e6;
}
.ae-catBtn.is-on{
  background:#111;
  border-color:#111;
  color:#fff;
}
.ae-catCount{
  color:#555;
}
.ae-catBtn.is-on .ae-catCount{ color:#fff; opacity:.9; }



/* =========================================================
   Catalogue — bloc gris pour catégories (comme la barre au-dessus)
   Objectif : une "ligne grise" qui regroupe TOUS les autres filtres.
   ========================================================= */
.ae-filterBlock{
  margin-top: 12px;
  background: #f3f3f3;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  padding: 12px;
}
.ae-filterBlock .ae-catGrid{
  margin-top: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
.ae-filterBlock .ae-subcats{
  margin-top: 10px !important;
}

/* Aligner recherche + bouton "Afficher" sur la même ligne que les boutons audience */
@media (min-width: 901px){
  .ae-search{ flex-wrap: nowrap !important; }
  .ae-search input{ max-width: 420px; }
}


/* Secondaire (catalogue) : ligne de contexte sous le sous-titre */
.results-sub2{opacity:.85;}

/* =========================================================
   Cartes — chips sur une seule ligne (Service-Public + Catégorie)
   Objectif : éviter que "Service‑Public" et la catégorie passent sur 2 lignes
   ========================================================= */
#aide-etat-root .ae-chips{
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  gap: 8px !important;
}
#aide-etat-root .ae-chips::-webkit-scrollbar{ height: 6px; }
#aide-etat-root .ae-chip{ flex: 0 0 auto; white-space: nowrap; }

/* =========================================================
   PATCH 2026-03-05 — Mobile : éviter "Voir la source" tronqué
   - Bouton peut passer sur 2 lignes en très petit écran
   - On garde un rendu propre et cliquable
   ========================================================= */
#aide-etat-root .aide-card .ae-actions{
  flex-wrap: wrap !important;
  gap: 10px !important;
}
#aide-etat-root .aide-card .ae-actions .ae-btn{
  max-width: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}
@media (max-width: 420px){
  #aide-etat-root .aide-card .ae-actions .ae-btn{
    white-space: normal !important; /* autorise le retour à la ligne si nécessaire */
    text-align: center;
  }
}


/* =========================================================
   PATCH 2026-03-05 — Mobile : recadrage filtres Catalogue
   Objectif :
   - Boutons audience (Tout voir / Particulier / Entreprise) sur 1 ligne (3 colonnes)
   - Champ recherche + bouton sur largeur utile
   ========================================================= */
@media (max-width: 520px){
  .ae-audience{
    display:grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap:10px !important;
    width:100% !important;
  }
  .ae-chip{
    min-width: 0 !important;
    width: 100% !important;
    padding: 10px 10px !important;
  }
  .ae-search{
    width:100% !important;
  }
  .ae-search input{
    min-width: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;
  }
  #ae-q-go{
    width: 100% !important;
  }
}

/* Cache les infos techniques si jamais elles existent encore dans le DOM (sécurité) */
.ae-mini{ display:none !important; }
.aide-etat-badge{ display:none !important; }


/* =========================================================
   
/* =========================================================
   PATCH 2026-03-05 — Alignement résultats (desktop + sous-catégories)
   Problème : dans certaines vues "sous-catégorie" (ex : Logement),
   le bloc Résultats (titre + grille) peut paraître décalé par rapport
   aux filtres/catégories au-dessus.
   Objectif : aligner Résultats sur les mêmes marges que le reste.
   ========================================================= */

#aide-etat-root #ae-simu-results,
#aide-etat-root #ae-catalog-results{
  padding-left: 8px !important;
  padding-right: 8px !important;
}

#aide-etat-root #ae-simu-results .results-head,
#aide-etat-root #ae-catalog-results .results-head{
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#aide-etat-root #ae-simu-results .results-grid,
#aide-etat-root #ae-catalog-results .results-grid{
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}


PATCH 2026-03-05 — Mobile : aligner les fiches résultats
   Problème constaté : sur téléphone, certaines pills (ex: "À vérifier")
   débordent à droite et les cartes ne s’alignent pas comme les blocs du haut.
   Objectif :
   - 1 colonne sur mobile
   - aucune fuite horizontale
   - header de carte (titre + pill) qui wrap proprement
   ========================================================= */

#aide-etat-root .aide-etat-results{overflow-x:hidden;}

@media (max-width: 640px){
  /* Forcer 1 colonne, même si des anciens blocs CSS imposent 3 colonnes */
  #aide-etat-root .results-grid,
  #aide-etat-root .gridCards,
  #aide-etat-root .cardsGrid{
    grid-template-columns: 1fr !important;
  }

  /* Cartes : éviter toute largeur implicite / débordement */
  #aide-etat-root .aide-card{
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Header carte : permettre le retour à la ligne + éviter la pill collée au bord */
  #aide-etat-root .aide-card .ae-head{
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }
  #aide-etat-root .aide-card .ae-head > div{
    min-width: 0 !important; /* autorise le wrap du titre */
    flex: 1 1 260px !important;
  }
  #aide-etat-root .aide-card .ae-pill{
    flex: 0 0 auto !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    margin-left: auto !important;
  }

  /* Chips : éviter que ça pousse la carte en largeur */
  #aide-etat-root .aide-card .ae-chips{
    max-width: 100% !important;
  }

  /* Harmoniser le bloc "Résultats" avec les marges des filtres */
  #aide-etat-root .results-head{
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

/* =========================================================
   PATCH 2026-03-05 — Afficher la session (sous "Vérifier mes aides")
   Objectif : afficher "Session :" proprement, aligné et responsive.
   ========================================================= */
#aide-etat-root .ae-sessionline{
  margin-top: 10px;
  font-size: 12px;
  color: #666;
  line-height: 1.2;
}
#aide-etat-root .ae-sessionline code{
  background: #f3f3f3;
  padding: 2px 6px;
  border-radius: 8px;
  word-break: break-all;
  white-space: normal;
}

/* =========================================================
   PATCH 2026-03-05 — Desktop : alignement fiches résultats (ex: Logement)
   Problème : sur certaines fiches, la pastille (Probable/À vérifier/Peu probable)
   peut dépasser à droite (flex item qui ne rétrécit pas).
   Objectif :
   - empêcher tout débordement horizontal
   - autoriser le titre à se casser proprement
   - garder la pastille dans la carte (toujours visible)
   ========================================================= */

#aide-etat-root .aide-card{
  min-width: 0 !important;
  overflow: hidden !important; /* garde tout à l'intérieur (y compris la pill) */
}

#aide-etat-root .aide-card .ae-head{
  min-width: 0 !important;
}

#aide-etat-root .aide-card .ae-head > div{
  min-width: 0 !important; /* autorise le texte à rétrécir au lieu de pousser la pill dehors */
}

#aide-etat-root .aide-card .ae-title{
  overflow-wrap: anywhere;
  word-break: break-word;
}

#aide-etat-root .aide-card .ae-pill{
  flex: 0 0 auto !important;
  max-width: 100% !important;
}

/* =========================================================
   PATCH 2026-03-05 — Cartes résultats : séparateur sous le titre
   Objectif : améliorer la lisibilité (ligne discrète entre titre et puces).
   ========================================================= */
#aide-etat-root .aide-card .ae-sep{
  height: 1px;
  background: #eee;
  margin: 10px 0 8px;
}



/* =========================================================
   PATCH 2026-03-05 — Chips résultats : centrage + wrap (desktop + mobile)
   Problème : certaines puces (ex: "Travaux / rénovation") paraissent décalées
   à cause du mode "nowrap + scroll". Objectif : rendu propre et centré.
   ========================================================= */
#aide-etat-root .aide-card .ae-chips{
  display:flex !important;
  flex-wrap: wrap !important;
  overflow: visible !important;
  justify-content: flex-start !important;
  align-items: center !important;
}
#aide-etat-root .aide-card .ae-chip{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  white-space: normal !important;
}


/* =========================================================
   PAYWALL FICTIF (MODE DÉMO) — overlay plein écran
   - Résultats : 1,99 €
   - Catalogue : 4,99 €
   Aucune donnée n’est envoyée au serveur.
   ========================================================= */
#ae-paywall.ae-paywall,
.ae-paywall{
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.ae-paywall-card{
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e6e6e6;
  box-shadow: 0 18px 70px rgba(0,0,0,0.30);
  padding: 18px;
  position: relative;
}

.ae-paywall-x{
  position:absolute;
  top: 10px;
  right: 10px;
  border: 1px solid #e6e6e6;
  background:#fff;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-weight: 900;
  cursor: pointer;
}

.ae-paywall-badge{
  display:inline-block;
  background:#111;
  color:#fff;
  border-radius:999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.ae-paywall-title{
  margin-top: 12px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
}
.ae-paywall-sub{
  margin-top: 6px;
  color:#555;
  font-size: 13px;
}

.ae-paywall-price{
  margin-top: 14px;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  background: #f6f7fb;
  padding: 12px;
  text-align:center;
}
.ae-paywall-price-num{
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -0.5px;
}
.ae-paywall-price-note{
  margin-top: 6px;
  font-size: 12px;
  color:#444;
}

.ae-paywall-form{
  margin-top: 14px;
  display: grid;
  gap: 10px;
}
.ae-paywall-field span{
  display:block;
  font-size: 12px;
  font-weight: 800;
  color:#222;
  margin-bottom: 6px;
}
.ae-paywall-field input{
  width:100%;
  border:1px solid #e0e0e0;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  outline:none;
}
.ae-paywall-field input:focus{
  border-color:#111;
}

.ae-paywall-row{
  display:grid;
  grid-template-columns: 1.6fr 0.8fr 0.6fr;
  gap: 10px;
}
@media (max-width: 520px){
  .ae-paywall-row{ grid-template-columns: 1fr; }
}

.ae-paywall-actions{
  display:flex;
  gap: 10px;
  margin-top: 4px;
}
@media (max-width: 520px){
  .ae-paywall-actions{ flex-direction: column; }
}

.ae-paywall-btn{
  flex:1 1 auto;
  border: 1px solid #111;
  background:#111;
  color:#fff;
  border-radius: 14px;
  padding: 11px 12px;
  font-weight: 900;
  cursor:pointer;
}
.ae-paywall-btn.ae-paywall-cancel{
  background:#fff;
  color:#111;
  border-color:#e6e6e6;
}

.ae-paywall-hint{
  font-size: 12px;
  color:#666;
}
.ae-paywall-error{
  margin-top: 6px;
  border: 1px solid #f1c0c0;
  background:#fff2f2;
  color:#7a0000;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}


/* =========================================================
   PAYWALL (patch esthétique)
   - champs bien contenus dans la carte (pas de débordement)
   - alignements propres (desktop) + empilement mobile
   ========================================================= */
.ae-paywall-card{ overflow:hidden; }
.ae-paywall-form{ margin-top:14px; }
.ae-paywall-field{ display:block; }
.ae-paywall-field span{ display:block; margin-bottom:6px; font-weight:800; font-size:12px; color:#222; }
.ae-paywall-field input{
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}
.ae-paywall-row{
  display:grid !important;
  grid-template-columns: 1fr 140px 110px !important;
  gap: 10px !important;
  align-items: end !important;
}
@media (max-width: 640px){
  .ae-paywall-row{ grid-template-columns: 1fr !important; }
}
.ae-paywall-actions{
  display:flex !important;
  gap:10px !important;
  align-items:center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
}
.ae-paywall-actions .ae-paywall-btn{
  flex: 1 1 220px !important;
  min-width: 0 !important;
}
