/* --- Global wrapper --- */
.ae-wrap {
  font-family: inherit;
}

/* --- Filtres --- */
.ae-wrap .ae-filters{
  box-sizing: border-box;
  grid-template-columns: minmax(260px,1fr) minmax(260px,1fr); /* 2 colonnes stables */
}

.ae-wrap .ae-filters .field{
  flex-direction: column; /* label au-dessus du select */
  min-width: 0;           /* évite les débordements */
}

.ae-wrap .ae-filters label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

.ae-wrap .ae-filters .field select{
  width: 100% !important;     /* force pleine largeur */
  max-width: 100%;
  height: 44px;
  padding: 0 14px;
  box-sizing: border-box;
}


.ae-wrap .ae-filters select:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}

/* --- Boutons dans les filtres --- */
.ae-wrap .ae-filters .buttons {
  display: flex;
  gap: 12px;
  grid-column: span 2; /* prend toute la ligne */
}

.ae-wrap .ae-filters .button,
.ae-wrap .ae-filters a.button {
  flex: 1; /* même largeur pour tous */
  padding: 10px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #d1d5db;
}

/* Filtrer = bouton principal */
.ae-wrap .ae-filters .button-primary {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  margin-top: 12px;
}

.ae-wrap .ae-filters .button-primary:hover {
  background: #1e40af;
}

/* Réinitialiser = bouton secondaire */
.ae-wrap .ae-filters .button-reset {
  background: #f3f4f6;
  color: #374151;
}

.ae-wrap .ae-filters .button-reset:hover {
  background: #e5e7eb;
}


/* --- Liste des aides --- */
.ae-list {
  display: grid;
  grid-template-columns: 1fr; /* une seule colonne */
  gap: 16px;
}

.ae-list .item {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  min-height: 110px; /* assure une hauteur minimale identique */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Titre de l’aide */
.ae-list .item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
}

/* Lien dans le titre */
.ae-list .item h3 a {
  text-decoration: none;
  color: inherit;
}

.ae-list .item h3 a:hover {
  color: #2c5282; /* bleu moderne */
}

/* Description / résumé */
.ae-list .item .ae-meta {
  margin-top: 10px;
  font-size: 0.9rem;
  color: #444;
  line-height: 1.4;
  margin-bottom: 12px;
}

/* --- Pagination --- */
.ae-pagination {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.ae-pagination a,
.ae-pagination span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #1e3a8a;
  text-decoration: none;
  font-size: 0.9rem;
  min-width: 34px;
  text-align: center;
}

.ae-pagination .current {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  font-weight: bold;
}

.ae-pagination .disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.ae-pagination .dots {
  border: none;
  background: transparent;
  color: #6b7280;
}


/* --- Total --- */
.ae-wrap .ae-total {
  margin: 10px 0;
  font-weight: 600;
  color: #111827;
}

/* --- Bouton retour --- */
.ae-wrap .ae-back {
  margin-bottom: 10px;
  display: inline-block;
  text-decoration: none;
  color: #2563eb;
  font-weight: 500;
}

.ae-wrap .ae-back:hover {
  text-decoration: underline;
}

/* --- Fiche détail --- */
.ae-wrap .ae-detail {
  padding: 16px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
}

.ae-wrap .ae-detail h2 {
  margin-top: 0;
}

.ae-wrap .ae-detail .row {
  margin: 12px 0;
}

.ae-wrap .ae-detail .row p {
  margin: .4em 0;
}

/* --- Date --- */
.ae-wrap .ae-date {
  margin-top: 6px;
  font-size: 0.7rem;
  color: #999;
  font-style: italic;
  display: block;
  text-align: right;    /* aligné à droite, comme une note de bas de page */
}


/* ===== FICHE AIDE – STYLE ===== */
.ae-wrap .ae-back{margin-bottom:14px;display:inline-flex;gap:6px;align-items:center;color:#2563eb;text-decoration:none}
.ae-wrap .ae-back:hover{text-decoration:underline}

.ae-detail{
  background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:20px;
  box-shadow:0 2px 6px rgba(0,0,0,.03);max-width:1000px;margin:0 auto;
}

.ae-detail .ae-header{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}
.ae-detail .ae-title{margin:0;font-size:1.4rem;line-height:1.2;color:#0f172a;font-weight:800}

.ae-detail .ae-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.ae-detail .ae-chip{
  display:inline-flex;align-items:center;gap:6px;
  background:#f1f5f9;border:1px solid #e2e8f0;color:#0f172a;
  padding:6px 10px;border-radius:999px;font-size:.85rem;font-weight:600
}

/* Grille : 2 colonnes, avec cartes wide qui prennent les 2 colonnes */
.ae-sections{display:grid;grid-template-columns:1fr;gap:14px}
@media (min-width: 900px){ .ae-sections{grid-template-columns:1fr 1fr} }
.ae-card{background:#ffffff;border:1px solid #e5e7eb;border-radius:12px;padding:14px}
.ae-card--wide{grid-column:1 / -1}

.ae-card h3{margin:0 0 8px;font-size:1rem;font-weight:800;color:#0f172a}
.ae-card .ae-content{color:#334155;line-height:1.55;font-size:.95rem}
.ae-card .ae-content p{margin:.5em 0}
.ae-card .ae-content ul{margin:.5em 0 .5em 1.2em}
.ae-card .ae-content li{margin:.25em 0}

/* 1) Supprimer les bordures "noires" injectées par l'HTML de l'API */
.ae-card .ae-content, 
.ae-card .ae-content *{
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}
.ae-card .ae-content table, 
.ae-card .ae-content th, 
.ae-card .ae-content td{
  border: none !important;
}

/* 2) Plus d'espace après retours à la ligne dans Conditions */
.ae-card--conditions .ae-content br{
  display:block;
  content:"";
  margin-top:.6em; /* espace visuel au-dessus de la ligne suivante */
}

/* 3) Liste de sources en pleine largeur */
.ae-source-list{list-style:none;margin:0;padding-left:0}
.ae-source-list li{margin:6px 0}
.ae-source-list a{color:#2563eb;text-decoration:none;border-bottom:1px dashed #93c5fd}
.ae-source-list a:hover{border-bottom-style:solid}

/* Nettoyage des bordures héritées */
.ae-card .ae-content table,
.ae-card .ae-content td,
.ae-card .ae-content th {
  border: none !important;
}

/* Style moderne pour remplacer les anciennes boîtes noires */
.ae-card .ae-content table {
  background: #f9fafb;         /* gris clair */
  padding: 12px 16px;          /* espace intérieur */
  margin: 20px 0;              /* espace au-dessus et en dessous */
  border-radius: 8px;          /* coins arrondis */
  box-shadow: 0 1px 3px rgba(0,0,0,0.08); /* petite ombre légère */
  width: 100%;                 /* prendre toute la largeur dispo */
}

.ae-card .ae-content td, 
.ae-card .ae-content th {
  padding: 4px 6px;            /* espace entre lignes internes */
  background: transparent;     /* on garde le fond uniforme */
}

/* Sources beaucoup plus discrètes */
.ae-card--sources {
  background:#f8fafc;
  border-color:#e5e7eb;
  grid-column: 1 / -1; /* prend toute la largeur */
  padding: 12px;
  border-radius: 8px;
  margin-top: 20px; /* <-- ajoute un espace au-dessus */
}

.ae-card--sources h3{
  font-size:0.95rem;
  margin:0 0 6px;
  color:#334155;
  font-weight:700;
}
.ae-card--sources .ae-source-list{
  font-size:0.85rem;
  color:#667085;
  line-height:1.5;
}
.ae-card--sources .ae-source-list li{ margin:4px 0; }
.ae-card--sources .ae-source-list a{
  color:#2563eb;
  text-decoration:none;
  border-bottom:1px dashed #93c5fd;
  font-weight:500;
}
.ae-card--sources .ae-source-list a:hover{
  border-bottom-style:solid;
  color:#1e40af;
}

