/* =========================================================
   PROJET GORDES — zz_consultation.css
   ---------------------------------------------------------
   Feuille consolidée pour :
   1) l'espace de consultation du corpus
   2) la page displayLettres
   3) le moteur de requête / recherche plein texte
   ---------------------------------------------------------
   Principes de refonte :
   - conserver uniquement les blocs réellement utilisés
   - fusionner les redéfinitions accumulées
   - limiter la portée aux espaces consult-*, display-*,-
     sidebar-menu et idefx-*
   - commenter chaque partie pour faciliter la maintenance
   ========================================================= */


/* =========================================================
   1. BASE COMMUNE — PAGES DE CONSULTATION
   ---------------------------------------------------------
   Gabarit principal pour les pages d'accueil de la
   consultation, les index documentaires et les hubs.
   ========================================================= */

.consult-page,
.consult-index-page,
.consult-hub {
  display: block;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 24px 0;
  box-sizing: border-box;
}

.consult-page *,
.consult-index-page *,
.consult-hub * {
  box-sizing: border-box;
}

#texteAccueil .consult-page,
#texteAccueil .consult-index-page,
#texteAccueil .consult-hub {
  padding-top: 6px;
}


/* =========================================================
   2. EN-TÊTE DES PAGES DE CONSULTATION
   ---------------------------------------------------------
   Titre principal, phrase d'introduction et séparation
   documentaire.
   ========================================================= */

.consult-header {
  display: block;
  width: 100%;
  margin: 0 0 24px 0;
  padding: 0 0 14px 0;
  border-bottom: 1px solid #d8d8d8;
}

.consult-title {
  display: block;
  margin: 0 0 8px 0;
  font-size: 1.9em;
  line-height: 1.2;
  font-weight: 600;
}

.consult-intro,
.consult-description {
  display: block;
  max-width: 900px;
  margin: 0;
  line-height: 1.55;
  color: #444;
}


/* =========================================================
   3. PAGE D'ACCUEIL DE LA CONSULTATION
   ---------------------------------------------------------
   Cartes d'entrée vers les différents modes d'exploration.
   ========================================================= */

.consult-home-grid,
.consult-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 18px;
  margin: 22px 0 26px 0;
}

.consult-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: calc(50% - 9px);
  min-width: 280px;
  min-height: 176px;
  padding: 18px 18px 16px 18px;
  border: 1px solid #d8d8d8;
  border-radius: 14px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.consult-card:hover {
  border-color: #bdbdbd;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}

.consult-card h2,
.consult-card-title {
  margin: 0 0 10px 0;
  font-size: 1.2em;
  line-height: 1.25;
}

.consult-card p,
.consult-card-text {
  margin: 0 0 14px 0;
  line-height: 1.5;
  color: #4a4a4a;
}

.consult-card-meta {
  margin: 0 0 12px 0;
  font-size: .95em;
  color: #666;
}

.consult-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}


/* =========================================================
   4. BLOCS RÉSUMÉS / STATISTIQUES
   ---------------------------------------------------------
   Pastilles et cartes légères résumant le corpus.
   ========================================================= */

.consult-summary,
.consult-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 28px 0;
  padding: 0;
}

.consult-stat {
  display: inline-block;
  min-width: 170px;
  padding: 10px 14px;
  border: 1px solid #e1e1e1;
  border-radius: 999px;
  background: #fafafa;
  font-size: .95em;
  line-height: 1.3;
}

.consult-stat strong {
  font-weight: 700;
}


/* =========================================================
   5. NAVIGATION LOCALE DES PAGES DE CONSULTATION
   ---------------------------------------------------------
   Onglets / pilules d'accès aux différents modes.
   ========================================================= */

.consult-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px 0;
  padding: 0 0 18px 0;
  border-bottom: 1px solid #ececec;
}

.consult-nav a,
.consult-tab,
.consult-pill {
  display: inline-block;
  padding: 9px 14px;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  line-height: 1.25;
}

.consult-nav a:hover,
.consult-tab:hover,
.consult-pill:hover {
  border-color: #bdbdbd;
  text-decoration: none;
}

.consult-nav .active,
.consult-tab.active,
.consult-pill.active {
  font-weight: 700;
  background: #f5f5f5;
}


/* =========================================================
   6. OUTILS / FILTRES
   ---------------------------------------------------------
   Blocs de filtre ou d'outillage contextuel.
   ========================================================= */

.consult-tools,
.consult-filters {
  display: block;
  margin: 0 0 20px 0;
  padding: 14px 16px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fafafa;
}

.consult-tools h2,
.consult-filters h2,
.consult-tools h3,
.consult-filters h3 {
  margin-top: 0;
}

.consult-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.consult-filter-row label {
  font-weight: 600;
}

.consult-filter-row input,
.consult-filter-row select {
  min-width: 200px;
}


/* =========================================================
   7. LISTES / NOTICES DE RÉSULTATS DE CONSULTATION
   ---------------------------------------------------------
   Notices documentaires standard des pages auteurs, lieux,
   dates, volumes, etc.
   ========================================================= */

.consult-results,
.consult-list,
.consult-notices {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

.consult-result,
.consult-notice {
  display: block;
  width: 100%;
  margin: 0 0 14px 0;
  padding: 16px 18px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
}

.consult-result:last-child,
.consult-notice:last-child {
  margin-bottom: 0;
}

.consult-result-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
  margin: 0 0 8px 0;
}

.consult-ref {
  display: inline-block;
  font-weight: 700;
  white-space: nowrap;
}

.consult-label {
  display: inline-block;
  font-size: .92em;
  color: #666;
}

.consult-result-title {
  display: block;
  margin: 0 0 8px 0;
  font-size: 1.08em;
  line-height: 1.35;
  font-weight: 600;
}

.consult-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 10px 0;
  color: #555;
  line-height: 1.45;
}

.consult-meta-item {
  display: inline-block;
}

.consult-excerpt,
.consult-result p {
  margin: 0 0 12px 0;
  line-height: 1.55;
  color: #444;
}

.consult-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}


/* =========================================================
   8. GROUPES ALPHABÉTIQUES OU CHRONOLOGIQUES
   ---------------------------------------------------------
   Titres de sections, sous-groupes et index alphabétiques.
   ========================================================= */

.consult-section,
.consult-group {
  display: block;
  margin: 0 0 24px 0;
}

.consult-section-title,
.consult-group-title {
  display: block;
  margin: 0 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #ececec;
  font-size: 1.2em;
  line-height: 1.25;
}

.consult-alpha-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px 0;
}

.consult-alpha-index a {
  display: inline-block;
  min-width: 34px;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  background: #fff;
}

.consult-alpha-index a:hover {
  border-color: #bbb;
}


/* =========================================================
   9. CONSULTATION PAR TOMES / VOLUMES
   ---------------------------------------------------------
   Cartes de volumes et corps de sections.
   ========================================================= */

.consult-volumes {
  display: block;
  margin: 0;
  padding: 0;
}

.consult-volume {
  display: block;
  margin: 0 0 16px 0;
  border: 1px solid #dfdfdf;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.consult-volume-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #fafafa;
  border-bottom: 1px solid #ececec;
}

.consult-volume-title {
  margin: 0;
  font-size: 1.1em;
  line-height: 1.25;
}

.consult-volume-count {
  color: #666;
  white-space: nowrap;
}

.consult-volume-body {
  padding: 16px 18px 18px 18px;
}


/* =========================================================
   10. TIMELINE, BOUTONS ET ÉTATS VIDES
   ---------------------------------------------------------
   Éléments génériques réemployés sur plusieurs pages.
   ========================================================= */

.consult-timeline-page iframe,
.consult-timeline-frame,
.consult-timeline-embed {
  display: block;
  width: 100%;
  min-height: 680px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
}

.consult-button,
.consult-actions a,
.consult-card-actions a {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  line-height: 1.25;
}

.consult-button:hover,
.consult-actions a:hover,
.consult-card-actions a:hover {
  border-color: #b7b7b7;
  text-decoration: none;
}

.consult-empty {
  display: block;
  padding: 20px 18px;
  border: 1px dashed #d0d0d0;
  border-radius: 12px;
  background: #fafafa;
  color: #555;
}


/* =========================================================
   11. DISPLAY LETTRES — GABARIT GLOBAL
   ---------------------------------------------------------
   La page de lettre reste insérée dans le template général,
   mais on ouvre davantage l'espace utile de lecture.
   ========================================================= */

#texteAccueil .display-page {
  display: block;
  width: calc(100vw - 180px);
  max-width: none;
  margin: 0;
  padding: 0 24px 24px 0;
  box-sizing: border-box;
}

#texteAccueil .display-page * {
  box-sizing: border-box;
}


/* =========================================================
   12. DISPLAY LETTRES — EN-TÊTE DOCUMENTAIRE
   ---------------------------------------------------------
   Identité de la lettre, métadonnées principales et carte.
   ========================================================= */

#texteAccueil .display-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  margin: 0 0 14px 0;
  padding: 0 0 12px 0;
  border-bottom: 1px solid #d8d8d8;
}

#texteAccueil .display-header-meta {
  flex: 0 1 42%;
  min-width: 0;
  padding-top: 2px;
}

#texteAccueil .display-title {
  margin: 0 0 4px 0;
  font-size: 1.25em;
  line-height: 1.15;
  font-weight: 600;
}

#texteAccueil .display-ref {
  margin: 0 0 12px 0;
  font-size: 0.98em;
  color: #555;
  line-height: 1.35;
}

#texteAccueil .display-ref-sep {
  margin: 0 8px;
  color: #999;
}

#texteAccueil .displaylettres-identite {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

#texteAccueil .displaylettres-meta-line {
  margin: 0;
  line-height: 1.35;
  font-size: 0.98em;
}

#texteAccueil .displaylettres-meta-line i {
  width: 18px;
  margin-right: 6px;
  text-align: center;
}

#texteAccueil .display-header-map {
  flex: 0 1 58%;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  overflow: hidden;
}

#texteAccueil .display-header-map .displaylettres-map {
  width: 100%;
  max-width: 430px;
  height: 210px;
  min-height: 210px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
  background: #f3f3f3;
  overflow: hidden;
}


/* =========================================================
   13. DISPLAY LETTRES — BARRE D'OUTILS
   ---------------------------------------------------------
   Navigation locale, modes de lecture et accès édition.
   ========================================================= */

#texteAccueil .display-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 28px;
  width: 100%;
  margin: 0 0 18px 0;
  padding: 10px 0 12px 0;
  border-top: 1px solid #d0d0d0;
  border-bottom: 1px solid #d0d0d0;
}

#texteAccueil .display-toolbar-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

#texteAccueil .display-toolbar-label {
  min-width: 76px;
  padding-top: 7px;
  font-weight: 700;
  color: #333;
}

#texteAccueil .display-toolbar-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#texteAccueil .display-toolbar-links a,
#texteAccueil .display-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  line-height: 1.2;
}

#texteAccueil .display-toolbar-links a:hover,
#texteAccueil .display-edit-link:hover {
  border-color: #bdbdbd;
  text-decoration: none;
}

#texteAccueil .display-toolbar-links a.active {
  background: #f3f3f3;
  font-weight: 700;
}

#texteAccueil .display-toolbar-icon {
  min-width: 34px;
  justify-content: center;
}

#texteAccueil .display-toolbar-icon i,
#texteAccueil .display-edit-link i {
  font-size: 1em;
}

#texteAccueil .display-edit-link {
  font-weight: 600;
}


/* =========================================================
   14. DISPLAY LETTRES — LAYOUT PRINCIPAL
   ---------------------------------------------------------
   Double colonne : texte à gauche, fac-similé / panneaux
   documentaires à droite.
   ========================================================= */

#texteAccueil .display-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

#texteAccueil .display-main-text {
  flex: 0 1 54%;
  min-width: 0;
}

#texteAccueil .display-main-panel {
  flex: 0 1 46%;
  min-width: 0;
  overflow: hidden;
}

#texteAccueil .display-main-text .displaylettres-left-panel {
  width: 100%;
  min-width: 0;
  padding-right: 18px;
  border-right: 1px solid #000;
}

#texteAccueil .display-main-panel .displaylettres-right-panel,
#texteAccueil .display-main-panel .displaylettres-main-right {
  width: 100%;
  min-width: 0;
  padding-left: 0;
  overflow: hidden;
}

#texteAccueil .display-main-text h3,
#texteAccueil .display-main-panel h3 {
  writing-mode: horizontal-tb;
  white-space: normal;
}


/* =========================================================
   15. DISPLAY LETTRES — PANNEAU DROIT
   ---------------------------------------------------------
   Visionneuse OSD, panneaux de comparaison, métadonnées,
   notes et commentaires.
   ========================================================= */

#texteAccueil .displaylettres-right-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

#texteAccueil .displaylettres-osd-viewer {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 600px;
  min-height: 600px;
  position: relative;
  overflow: hidden;
}

#texteAccueil .displaylettres-osd-viewer img,
#texteAccueil .displaylettres-osd-viewer canvas,
#texteAccueil .displaylettres-osd-viewer > div {
  max-width: 100%;
}

#texteAccueil .displaylettres-osd-spinner {
  display: block;
  width: 100%;
  padding-top: 120px;
  text-align: center;
  color: #bfb29e;
}

#texteAccueil .displaylettres-comparaison-panel,
#texteAccueil .displaylettres-metadata-panel {
  display: block;
  min-height: 600px;
  padding-left: 10px;
  padding-right: 10px;
}

#texteAccueil .displaylettres-comparaison-panel {
  font-size: 1.15em;
  line-height: 1.65;
}

#texteAccueil .displaylettres-comparaison-panel h3,
#texteAccueil .displaylettres-metadata-panel h3 {
  margin-top: 0;
  margin-bottom: 16px;
}


/* =========================================================
   16. MENU LATÉRAL — HABILLAGE DU PLUGIN SIDEBAR
   ---------------------------------------------------------
   Reprise visuelle du menu principal et des sous-menus.
   ========================================================= */

#menugauche .sidebar-menu {
  list-style: none;
  width: 150px;
  margin: 0;
  padding: 14px 12px 18px 12px;
  background: #f7f5f2;
  border-right: 1px solid #ddd6cb;
  border-radius: 0 12px 12px 0;
}

#menugauche .sidebar-menu > li {
  margin: 0 0 8px 0;
  padding: 0;
}

#menugauche .sidebar-menu > li > a {
  display: block;
  padding: 10px 12px;
  border: 1px solid #d8d2c8;
  border-radius: 10px;
  background: #fff;
  color: #2f2f2f;
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: 0.92em;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  box-shadow: none;
}

#menugauche .sidebar-menu > li > a > .fa {
  width: 18px;
  margin-right: 6px;
}

#menugauche .sidebar-menu > li:hover > a,
#menugauche .sidebar-menu > li.active > a {
  color: #111;
  background: #ebe6de;
  border-left-color: #c7bba9;
}

#menugauche .sidebar-menu .treeview-menu,
#menugauche .sidebar-menu .sidebar-submenu {
  list-style: none;
  margin: 4px 0 10px 0;
  padding: 4px 0 0 0;
  background: transparent;
}

#menugauche .sidebar-menu .treeview-menu > li,
#menugauche .sidebar-menu .sidebar-submenu > li {
  margin: 0 0 4px 0;
  padding: 0;
  list-style: none;
}

#menugauche .sidebar-menu .treeview-menu > li::before {
  content: none !important;
}

#menugauche .sidebar-menu .treeview-menu > li > a,
#menugauche .sidebar-menu .sidebar-submenu > li > a {
  display: block;
  margin-left: 14px;
  padding: 8px 10px 8px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #6a655d;
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: 0.88em;
  line-height: 1.35;
  text-decoration: none;
  text-transform: none;
  box-shadow: none;
}

#menugauche .sidebar-menu .treeview-menu > li > a:hover,
#menugauche .sidebar-menu .treeview-menu > li.active > a,
#menugauche .sidebar-menu .sidebar-submenu > li > a:hover,
#menugauche .sidebar-menu .sidebar-submenu > li.active > a {
  background: #f1ece4;
  color: #1f1f1f;
}

#menugauche .sidebar-menu .treeview-menu > li.fa {
  font-family: inherit !important;
}

#menugauche .sidebar-menu .treeview-menu > li.fa > a::before {
  content: "—";
  display: inline-block;
  margin-right: 8px;
  color: #b7ad9e;
}


/* =========================================================
   17. QUERY / IDEFX — FORMULAIRE DE RECHERCHE
   ---------------------------------------------------------
   Bloc de recherche plein texte avec options fuzzy / regex.
   ========================================================= */

#widgetIdefx,
.idefx-form,
.query-form {
  max-width: 760px;
  margin: 24px 0 32px 0;
  padding: 22px 24px;
  background: #fcfbf9;
  border: 1px solid #ddd6cb;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(0,0,0,.05);
}

#widgetIdefx h2,
.idefx-form h2,
.query-form h2 {
  margin: 0 0 18px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #8f8a84;
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: 2.1em;
  font-weight: 400;
  color: #a3a0a0;
}

#widgetIdefx input[type="text"],
#widgetIdefx input[type="search"],
.idefx-form input[type="text"],
.idefx-form input[type="search"],
.query-form input[type="text"],
.query-form input[type="search"] {
  width: 100%;
  max-width: 520px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #d7d0c4;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
  color: #2f2a22;
  font-size: 1.02em;
  outline: none;
}

#widgetIdefx input[type="text"]:focus,
#widgetIdefx input[type="search"]:focus,
.idefx-form input[type="text"]:focus,
.idefx-form input[type="search"]:focus,
.query-form input[type="text"]:focus,
.query-form input[type="search"]:focus {
  border-color: #9e8770;
  box-shadow: 0 0 0 3px rgba(158,135,112,.12);
}

#widgetIdefx .query-options,
.idefx-form .query-options,
.query-form .query-options {
  margin: 18px 0 8px 0;
}

#widgetIdefx label,
.idefx-form label,
.query-form label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: #3d3933;
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: 1.05em;
}

#widgetIdefx input[type="checkbox"],
.idefx-form input[type="checkbox"],
.query-form input[type="checkbox"] {
  width: 21px;
  height: 21px;
  accent-color: #8b2d2b;
}

#widgetIdefx button,
#widgetIdefx input[type="submit"],
.idefx-form button,
.idefx-form input[type="submit"],
.query-form button,
.query-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  height: 48px;
  margin-top: 18px;
  padding: 0 24px;
  border: none;
  border-radius: 14px;
  background: #9a2f2a;
  color: #fff;
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: 1.02em;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

#widgetIdefx button:hover,
#widgetIdefx input[type="submit"]:hover,
.idefx-form button:hover,
.idefx-form input[type="submit"]:hover,
.query-form button:hover,
.query-form input[type="submit"]:hover {
  background: #842723;
  box-shadow: 0 6px 16px rgba(0,0,0,.14);
  transform: translateY(-1px);
}

#widgetIdefx button:active,
#widgetIdefx input[type="submit"]:active,
.idefx-form button:active,
.idefx-form input[type="submit"]:active,
.query-form button:active,
.query-form input[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
}


/* =========================================================
   18. QUERY / IDEFX — RÉSULTATS DE RECHERCHE
   ---------------------------------------------------------
   Version sobre, de type notice documentaire.
   ========================================================= */

.idefx-results,
#idefx-results,
#resultatsQuery {
	  width: 100%;
  max-width: 980px;
  margin: 22px auto 40px auto;
}

.idefx-results-title,
#resultatsQuery h1,
#resultatsQuery h2,
#texteAccueil .query-title {
  margin: 0 0 14px 0;
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: 2.4em;
  font-weight: 400;
  color: #8b2d2b;
  line-height: 1.12;
}

.idefx-footer,
#footeridefx {
  display: block;
  clear: both;
  margin: 0 0 18px 0;
  color: #7d766d;
  font-size: 1em;
  font-weight: 600;
  text-align: left;
}

.idefx-results > .idefx-result:first-of-type {
  clear: both;
}

#res,
.result-card,
.idefx-result {
	  width: 100%;
  margin: 0 0 16px 0;
  padding: 16px 20px;
  border: 1px solid #ddd6cb;
  border-left: 4px solid #8b2d2b;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.03);
}

#res:hover,
.result-card:hover,
.idefx-result:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}

#resres,
.result-meta,
.idefx-result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 14px;
}

.keyword.dico,
.result-keyword,
.idefx-vedette {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #c8d9ea;
  border-radius: 999px;
  background: #f7fafc;
  color: #2b67b1;
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: .96em;
  font-weight: 700;
  text-decoration: none;
}

.keyword.dico:hover,
.result-keyword:hover,
.idefx-vedette:hover {
  background: #edf4fb;
}

.keyword.dico.gold {
  background: #fbf2d8;
  border-color: #ead59a;
  color: #8a661a;
}

#domax,
.result-domain,
.idefx-domain {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f1ede6;
  color: #6b6258;
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: .94em;
  font-weight: 600;
}

.idefx-result h3,
.result-title,
.idefx-title,
#res h3 {
  margin: 0 0 14px 0;
  padding: 0 0 14px 0;
  border-bottom: 1px solid #e5ddd2;
  color: #2f2a22;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3em;
  line-height: 1.35;
  font-weight: 700;
}

#mention,
.result-usage,
.idefx-usage {
  margin: 0 0 14px 0;
  padding: 0 0 10px 0;
  border-bottom: 1px solid #f0e9df;
  color: #5d554c;
  font-family: "Source Sans Pro", Arial, sans-serif;
  font-size: 1em;
  line-height: 1.55;
}

#mention strong,
.result-usage strong,
.idefx-usage strong {
  color: #4e463d;
  font-weight: 700;
}

#ext,
.result-extract,
.idefx-extract {
  margin-top: 10px;
  color: #2f2a22;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15em;
  line-height: 1.75;
}

#ext p,
.result-extract p,
.idefx-extract p {
  margin: 0;
}

#ext mark,
.result-extract mark,
.idefx-extract mark,
#ext b,
.result-extract b,
.idefx-extract b {
  padding: 0 .18em;
  border-radius: 3px;
  background: #f7edc8;
  box-shadow: inset 0 -1px 0 rgba(139,45,43,.12);
  color: #2f2a22;
  font-weight: 700;
}

#sousent,
.result-subentry,
.idefx-subentry {
  display: inline-block;
  margin: 4px 8px 0 0;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f7f5f2;
  color: #5c544a;
  font-size: .92em;
}


/* =========================================================
   19. RESPONSIVE
   ---------------------------------------------------------
   Ajustements communs pour les petits écrans.
   ========================================================= */

@media (max-width: 1100px) {
  .consult-card {
    width: 100%;
  }

  .consult-stat {
    min-width: 0;
  }

  #texteAccueil .display-header-map .displaylettres-map {
    max-width: 100%;
    height: 220px;
  }
}

@media (max-width: 980px) {
  .consult-card {
    width: 100%;
  }

  #texteAccueil .display-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  #texteAccueil .display-toolbar-group {
    width: 100%;
    flex-direction: column;
    gap: 6px;
  }

  #texteAccueil .display-toolbar-label {
    min-width: 0;
    padding-top: 0;
  }
}

@media (max-width: 900px) {
  #texteAccueil .display-page {
    width: 100%;
    padding-right: 0;
  }

  #texteAccueil .display-header,
  #texteAccueil .display-main {
    flex-wrap: wrap;
  }

  #texteAccueil .display-header-meta,
  #texteAccueil .display-header-map,
  #texteAccueil .display-main-text,
  #texteAccueil .display-main-panel {
    flex-basis: 100%;
  }

  #texteAccueil .display-header-map {
    justify-content: flex-start;
  }

  #widgetIdefx,
  .idefx-form,
  .query-form,
  .idefx-results,
  #idefx-results,
  #resultatsQuery {
    max-width: 100%;
  }

  .idefx-results-title,
  #resultatsQuery h1,
  #resultatsQuery h2,
  #texteAccueil .query-title {
    font-size: 2em;
  }

  #res,
  .result-card,
  .idefx-result {
    padding: 14px 16px 16px 16px;
  }

  #ext,
  .result-extract,
  .idefx-extract {
    font-size: 1.05em;
  }
}

@media (max-width: 700px) {
  .consult-page,
  .consult-index-page,
  .consult-hub {
    padding-bottom: 14px;
  }

  .consult-title {
    font-size: 1.55em;
  }

  .consult-result,
  .consult-notice,
  .consult-card,
  .consult-volume-body,
  .consult-volume-header {
    padding-left: 14px;
    padding-right: 14px;
  }

  .consult-nav {
    gap: 8px;
  }

  .consult-nav a,
  .consult-tab,
  .consult-pill,
  .consult-button,
  .consult-actions a,
  .consult-card-actions a {
    width: 100%;
    text-align: center;
  }
}

/* ===== RESULTATS : structure générale ===== */

.idefx-results,
#idefx-results,
#resultatsQuery {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px 32px;
}

.idefx-results-title,
#resultatsQuery h1,
#resultatsQuery h2,
#texteAccueil .query-title {
  max-width: 980px;
  margin: 0 auto 18px;
  padding: 0 24px;
  line-height: 1.15;
}

/* ===== CARTE RESULTAT ===== */

#res,
.result-card,
.idefx-result {
  width: 100%;
  max-width: 100%;
  margin: 0 0 16px 0;
  padding: 18px 22px 16px;
  border: 1px solid #ddd6cf;
  border-left: 4px solid #9f2f2a;
  border-radius: 16px;
  background: #fffdfb;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  box-sizing: border-box;
}

.idefx-result:hover,
.result-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  transform: translateY(-1px);
  transition: box-shadow .2s ease, transform .2s ease;
}

/* ===== BADGES / META ===== */

.idefx-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.idefx-result-meta a,
.idefx-result-meta span,
.idefx-vedette,
.idefx-domain {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1;
}

.idefx-vedette {
  background: #eef5ff;
  border: 1px solid #c7daf6;
  color: #1f67c7;
}

.idefx-domain,
.idefx-result-meta .tome,
.idefx-result-meta .date {
  background: #f2eee9;
  border: 1px solid #e5ddd4;
  color: #6c6258;
}

/* ===== TITRE ===== */

.idefx-result h3,
.idefx-title {
  margin: 0 0 8px 0;
  font-size: 1.12rem;
  line-height: 1.35;
  font-weight: 700;
  color: #2f2a26;
}

/* ===== LIGNE DE METADONNEES ===== */

.idefx-usage {
  margin: 0 0 12px 0;
  font-size: .98rem;
  line-height: 1.45;
  color: #5b5249;
}

.idefx-usage strong {
  color: #332d28;
  font-weight: 700;
}

/* ===== EXTRAIT ===== */

.idefx-extract {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ece4dc;
  font-size: 1rem;
  line-height: 1.6;
  color: #3d3732;
}

.idefx-extract p {
  margin: 0;
}

.idefx-extract mark,
.idefx-extract b,
.result-extract b {
  padding: 0 .15em;
  border-radius: 3px;
  background: #f7edc8;
  color: #2f2a22;
  font-weight: 700;
}

#resultatsQuery h1,
.idefx-results-title {
  font-size: 2.2rem;
  color: #8f2a25;
  font-weight: 700;
  margin-top: 8px;
}

#resultatsQuery .query-count,
.idefx-count {
  margin-top: -4px;
  margin-bottom: 20px;
  color: #7a6f65;
  font-size: 1rem;
}

#res,
.result-card,
.idefx-result {
  padding: 16px 20px 14px;
  border: 1px solid #e2dad2;
  border-left: 3px solid #a2322b;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.idefx-result h3,
.idefx-title {
  font-size: 1.06rem;
}

.idefx-usage {
  font-size: .95rem;
  color: #62584f;
}

.idefx-extract {
  font-size: .98rem;
  line-height: 1.55;
}
