/* ====== Sommaire Collège — feuille locale ====== */
.archeo-sommaire{
  --max: min(1200px, 96vw);
  --gap: 12px;
  --r: 10px;
  --shadow: 0 6px 18px rgba(0,0,0,.08);
  --line: #e6e6e6;
  --ink: #1f2937;
  --paper:#fff;
  color: var(--ink);
}

/* Bandeau titre (facultatif : garde si tu veux un fond neutre) */
.archeo-sommaire .g1418-header{
  background:#e9f0fb;
  color:#0f172a;
  border:1px solid #cfe0ff;
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: clamp(10px, 1.2vw + 6px, 16px);
  text-align:center;
  max-width: var(--max);
  margin: 10px auto 14px;
}
.archeo-sommaire .g1418-header .page-title{ margin:0; line-height:1.2; }

/* === Grille : 5 colonnes desktop → 3/2/1 en responsive === */
.archeo-sommaire .cards-list{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));  /* 5 colonnes */
  gap: var(--gap);
  max-width: var(--max);
  margin: 10px auto 18px;
  padding: 0 var(--gap);
}
@media (max-width: 1100px){ .archeo-sommaire .cards-list{ grid-template-columns: repeat(4,1fr);} }
@media (max-width: 900px){  .archeo-sommaire .cards-list{ grid-template-columns: repeat(3,1fr);} }
@media (max-width: 640px){  .archeo-sommaire .cards-list{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 420px){  .archeo-sommaire .cards-list{ grid-template-columns: 1fr; } }

/* === Carte compacte (photo petite + légende développée) === */
.archeo-sommaire .card{
  display:block;
  background: var(--paper);
  border:1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  text-decoration:none;
  color: inherit;
  overflow:hidden;
}

/* Visuel volontairement “petit” : ratio 4/3 + hauteur modérée */
.archeo-sommaire .card-figure{ margin:0; display:grid; grid-template-rows: auto 1fr; }
.archeo-sommaire .card-figure img{
  display:block;
  width:100%;
  aspect-ratio: 4 / 3;     /* mini vignette, pas très haute */
  object-fit: cover;        /* remplit le cadre, coupe si besoin */
  line-height:0;
  border-bottom: 1px solid var(--line);
}

/* Légende généreuse (plus de texte) */
.archeo-sommaire .card-caption{
  padding: 8px 10px 10px;
  display:flex; flex-direction:column; gap:6px;
  min-height: clamp(88px, 10vw, 120px); /* “remplit” visuellement la carte */
}

/* Titre un peu plus lisible */
.archeo-sommaire .card-title{
  display:block;
  font-weight: 700;
  font-size: clamp(1rem, .45vw + .9rem, 1.15rem);
  line-height: 1.25;
  margin: 0;
}

/* Description (si tu l’utilises) — pas de troncature */
.archeo-sommaire .card-desc{
  display:block;
  font-size: clamp(.95rem, .35vw + .85rem, 1rem);
  line-height: 1.45;
  color:#334;
  margin:0;
}

/* Hover sobre */
.archeo-sommaire .card:hover{ transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,0,0,.12); transition: .25s; }

/* ===== Cadres sans image ===== */
.card-figure.no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f2ea; /* ton ivoire doux */
  border: 1px solid #e3ded4;
  border-radius: 12px;
  padding: 16px;
  min-height: 180px; /* ajuste selon la hauteur moyenne des vignettes */
  text-align: center;
}

.card-figure.no-img .card-caption {
  margin: 0;
}

.card-figure.no-img .card-title {
  display: block;
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.card-figure.no-img p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #2b2b2b;
}

/* --- Cartes "sans image" : le figure peint tout le panneau --- */

/* 1) Détecte la carte avec figure.no-img et neutralise l'habillage de la carte */
.archeo-sommaire .card:has(.card-figure.no-img){
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;            /* permet au figure de prendre toute la hauteur */
}

/* 2) Le figure remplit 100% et porte le fond ivoire + bordure + ombre */
.archeo-sommaire .card:has(.card-figure.no-img) .card-figure.no-img{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;        /* ajuste pour égaliser avec les autres vignettes */
  background: #f5f2ea;
  border: 1px solid #e3ded4;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  padding: 16px;
}

/* Un peu de typographie */
.archeo-sommaire .card-figure.no-img .card-caption{ margin:0; text-align:center; }
.archeo-sommaire .card-figure.no-img .card-title{ display:block; margin-bottom:6px; font-size:1.1rem; }
.archeo-sommaire .card-figure.no-img p{ margin:0; font-size:.98rem; line-height:1.5; color:#2b2b2b; }

.history-pager{
  display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;
  background:#e9f0fb; border:1px solid #cfe0ff; border-radius:10px;
  padding:8px 12px; margin:16px 0 8px;
}
.history-pager a{
  text-decoration:none; padding:8px 10px; border-radius:8px; border:1px solid rgba(0,0,0,.06);
  background:#fff; color:#0f172a; box-shadow:0 2px 8px rgba(0,0,0,.06);
}
.history-pager a:hover{ transform: translateY(-1px); box-shadow:0 6px 16px rgba(0,0,0,.10); }
.history-pager .history-sum{ background:#2f5fa7; color:#fff; border-color:transparent; }
.history-pager [aria-disabled="true"]{
  opacity:.45; pointer-events:none; filter:grayscale(20%);
}
.history-pagecount{ font-weight:600; }
