/* Styles propres a Insee.html.
   La structure a deux colonnes et les cartes Actualites sont dans site2.css. */

.intro-insee { padding: 8px 6px 20px; }
.intro-insee p { line-height: 1.6; }

.logo-insee {
  display: block;
  width: min(260px, 50%);
  height: auto;
  margin: 20px auto;
}

.presentation-insee {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 8px 0 24px;
  padding: 18px 20px;
  border: 1px solid #dce3ec;
  border-radius: 12px;
  background: #fff;
}
.presentation-insee p {
  flex: 1;
  margin: 0;
  text-align: justify;
  line-height: 1.65;
}
.logo-insee-integre {
  flex: 0 0 170px;
  width: 170px;
  max-width: 28%;
  height: auto;
}

.liens-ccvcd-modernes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 18px 0 35px;
}
.lien-ccvcd-moderne {
  display: flex;
  min-height: 165px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 15px;
  border: 1px solid #dce3ec;
  border-radius: 14px;
  background: #fff;
  color: #293e63;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(41,62,99,.10);
  transition: transform .2s ease, box-shadow .2s ease;
}
.lien-ccvcd-moderne:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(41,62,99,.18);
}
.lien-ccvcd-moderne img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 10px;
}
.lien-ccvcd-moderne strong { display: block; }

.communes-section {
  width: 100%;
  margin: 35px 0 10px;
  color: #263238;
}
.communes-entete {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 20px;
}
.communes-surtitre {
  color: #4f772d;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.communes-entete h2 {
  margin: 5px 0 8px;
  color: #293e63;
  font-size: clamp(24px, 3vw, 34px);
}
.communes-entete p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}
.compteur-communes {
  flex: 0 0 auto;
  min-width: 125px;
  padding: 12px 18px;
  border: 1px solid #d9e4ce;
  border-radius: 14px;
  background: #edf5e5;
  color: #4f772d;
  text-align: center;
}
.compteur-communes strong { display: block; font-size: 26px; }
.compteur-communes span { font-size: 12px; font-weight: bold; text-transform: uppercase; }

.recherche-commune { position: relative; margin-bottom: 16px; }
.recherche-commune i {
  position: absolute;
  top: 50%;
  left: 17px;
  color: #405a86;
  transform: translateY(-50%);
}
.recherche-commune input {
  width: 100%;
  min-height: 50px;
  padding: 11px 16px 11px 48px;
  border: 1px solid #dce3ec;
  border-radius: 12px;
  outline: none;
  font-size: 16px;
}
.recherche-commune input:focus {
  border-color: #405a86;
  box-shadow: 0 0 0 4px rgba(64,90,134,.14);
}

.tableau-responsive {
  overflow: hidden;
  border: 1px solid #dce3ec;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(41,62,99,.10);
}
#tableauCommunes { width: 100%; border-collapse: collapse; font-size: 15px; }
#tableauCommunes thead,
#tableauCommunes tfoot { background: #59709e; color: #fff; }
#tableauCommunes th,
#tableauCommunes td {
  padding: 14px 15px;
  border-bottom: 1px solid #dce3ec;
  vertical-align: middle;
}
#tableauCommunes thead th { text-align: left; font-size: 13px; text-transform: uppercase; }
#tableauCommunes tbody tr:nth-child(odd) { background: #e8efd3; }
#tableauCommunes tbody tr:nth-child(even) { background: rgb(193,203,223); }
#tableauCommunes tbody tr:hover { filter: brightness(.96); }
#tableauCommunes td:nth-child(2) { font-weight: bold; }
#tableauCommunes td:nth-child(3),
#tableauCommunes th:nth-child(3) { text-align: right; white-space: nowrap; }
#tableauCommunes td:nth-child(4),
#tableauCommunes td:nth-child(5),
#tableauCommunes td:nth-child(6),
#tableauCommunes th:nth-child(4),
#tableauCommunes th:nth-child(5),
#tableauCommunes th:nth-child(6) { text-align: center; }

.bouton-insee {
  display: inline-flex;
  min-width: 105px;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
}
.bouton-dossier { background: #eef3fa; color: #293e63; }
.bouton-resume { background: #edf5e5; color: #4f772d; }
.bouton-recensement { background: #fff4dd; color: #8a5700; }
.pas-de-lien {
  display: inline-block;
  min-width: 105px;
  color: rgba(255,255,255,.8);
  text-align: center;
  font-weight: bold;
}
.bouton-insee:hover { background: #59709e; color: #fff; }
#tableauCommunes tfoot .bouton-insee {
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.15);
  color: #fff;
}
.aucun-resultat { padding: 40px 20px; text-align: center; }
.note-population,
.source-insee { color: #64748b; font-size: 13px; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media screen and (max-width: 785px) {
  .liens-ccvcd-modernes { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .communes-entete { display: block; }
  .compteur-communes { display: inline-block; margin-top: 15px; }
  .tableau-responsive { overflow: visible; border: 0; box-shadow: none; background: transparent; }
  #tableauCommunes,
  #tableauCommunes tbody,
  #tableauCommunes tfoot,
  #tableauCommunes tr,
  #tableauCommunes td,
  #tableauCommunes th { display: block; width: 100%; }
  #tableauCommunes thead { display: none; }
  #tableauCommunes tbody tr {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid #dce3ec;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(41,62,99,.10);
  }
  #tableauCommunes tbody td {
    display: flex;
    width: 100% !important;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-align: right !important;
  }
  #tableauCommunes tbody td::before {
    flex: 0 0 40%;
    content: attr(data-label);
    color: #64748b;
    font-size: 12px;
    font-weight: bold;
    text-align: left;
    text-transform: uppercase;
  }
  #tableauCommunes tfoot { margin-top: 20px; border-radius: 12px; overflow: hidden; }
  #tableauCommunes tfoot th { text-align: center; }
  #tableauCommunes tfoot td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right !important;
  }
  #tableauCommunes tfoot td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
  }
  .presentation-insee { display: block; padding: 16px; }
  .logo-insee-integre {
    display: block;
    width: 150px;
    max-width: 65%;
    margin: 0 auto 16px;
  }
}

@media screen and (max-width: 500px) {
  .liens-ccvcd-modernes { grid-template-columns: 1fr; }
}
/* =========================================================
   GPU : règles propres aux documents d'urbanisme
   La structure commune et les Actualités sont dans site2.css
   ========================================================= */
:root {
  --gpu-bleu: #233c6e;
  --gpu-bleu-moyen: #405a86;
  --gpu-bleu-clair: #eef3fa;
  --gpu-vert: #4f772d;
  --gpu-vert-clair: #edf5e5;
/*   --gpu-jaune: #f4c542;
 */  --gpu-jaune: #ffcb04;
  --gpu-texte: #263238;
  --gpu-texte-clair: #64748b;
  --gpu-bordure: #dce3ec;
  --gpu-blanc: #fff;
}

#visuel { background: var(--gpu-blanc) !important; color: var(--gpu-texte) !important; }
#visuel > .w3-border:first-of-type { border-radius: 12px; background: linear-gradient(135deg,#fff,var(--gpu-bleu-clair)); }
#visuel > .w3-border:first-of-type p { margin: 0; line-height: 1.65; }
#visuel > .w3-border:first-of-type a { color: var(--gpu-bleu); font-weight: bold; text-decoration: none; }
#visuel > .w3-border:first-of-type a:hover { text-decoration: underline; }

#visuel3 {
  display: flex !important; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 10px;
  border-radius: 13px; background: var(--gpu-bleu-clair) !important;
  box-shadow: inset 0 0 0 1px var(--gpu-bordure);
}
#visuel3 .tablink {
  float: none !important; flex: 1 1 230px; min-height: 49px;
  border: 1px solid transparent !important; border-radius: 9px;
  background: var(--gpu-blanc) !important; color: var(--gpu-bleu) !important;
  font-weight: bold; line-height: 1.3; box-shadow: 0 3px 10px rgba(41,62,99,.07);
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
#visuel3 .tablink:hover, #visuel3 .tablink.w3-yellow { background: var(--gpu-jaune) !important; color: #17213a !important; transform: translateY(-2px); }

.city {
  width: 100% !important; max-width: none !important; overflow: visible;
  padding: 18px !important; border: 1px solid var(--gpu-bordure) !important;
  border-radius: 14px; background: var(--gpu-blanc);
}
.city > .two.row {
  display: grid !important; grid-template-columns: minmax(280px,.9fr) minmax(0,1.5fr) !important;
  align-items: start; gap: 20px; width: 100% !important;
}
.city > .two.row > .col { float: none !important; width: auto !important; min-width: 0 !important; max-width: none !important; padding: 0 !important; }
.city > .two.row > .col:first-child {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); align-content: start;
  gap: 12px; text-align: center !important;
}
.city > .two.row > .col:first-child > br { display: none; }
.city .tablink2 {
  float: none !important; width: 100%; min-width: 0; padding: 0 !important; overflow: hidden;
  border: 1px solid var(--gpu-bordure) !important; border-radius: 12px;
  background: var(--gpu-blanc) !important; color: var(--gpu-bleu) !important;
  box-shadow: 0 4px 13px rgba(41,62,99,.08);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.city .tablink2:hover, .city .tablink2.w3-yellow {
  border-color: #aac45d !important; background: var(--gpu-vert-clair) !important;
  transform: translateY(-3px); box-shadow: 0 9px 18px rgba(41,62,99,.14);
}
.city .tablink2 p {
  display: flex !important; width: 100% !important; min-height: 135px !important; height: auto !important;
  align-items: flex-end; justify-content: center; margin: 0 !important; padding: 76px 12px 14px !important;
  background-position: center 18px !important; background-repeat: no-repeat !important; background-size: 55px auto !important;
}
.city .tablink2 p span {
  display: block; width: 100%; padding: 8px; border-radius: 7px;
  background: rgba(35,60,110,.94); color: #fff; font-size: 13px; font-weight: bold; line-height: 1.35;
}

.DU {
  overflow: hidden; padding: 20px !important; border: 1px solid var(--gpu-bordure) !important;
  border-radius: 13px; background: #fff; box-shadow: 0 5px 15px rgba(41,62,99,.08);
}
.DU > b:first-child {
  display: block; margin: -20px -20px 16px; padding: 17px 20px;
  background: linear-gradient(135deg,var(--gpu-bleu),var(--gpu-bleu-moyen)); color: #fff; font-size: 20px;
}
.DU ol, .DU ul { margin: 10px 0; padding-left: 25px; }
.DU li { margin: 6px 0; line-height: 1.4; overflow-wrap: anywhere; }
.DU li::marker { color: var(--gpu-bleu-moyen); font-weight: bold; }
.DU li a { color: var(--gpu-bleu); text-decoration: none; border-bottom: 1px dotted #aebbd0; }
.DU li a:hover { color: var(--gpu-vert); border-bottom-style: solid; }
.DU > a > p {
  display: flex !important; width: min(100%,280px) !important; height: 130px !important;
  align-items: flex-end; justify-content: center; margin: 12px 0 0 !important; padding: 12px !important;
  border: 1px solid var(--gpu-bordure); border-radius: 12px; background-color: var(--gpu-bleu-clair);
  background-position: center 14px !important; background-repeat: no-repeat !important; background-size: 60px auto !important;
  box-shadow: 0 4px 12px rgba(41,62,99,.08);
}
.DU > a > p span { width: 100%; padding: 7px; border-radius: 7px; background: var(--gpu-bleu); color: #fff; text-align: center; font-size: 13px; font-weight: bold; }

#RNU .two { width: 100% !important; }
#RNU .two_3 {
  display: grid !important; grid-template-columns: repeat(auto-fit,minmax(190px,1fr));
  gap: 12px; width: 100% !important; text-align: center;
}
#RNU .two_3 > a { text-decoration: none; }
#RNU .two_3 > a > p {
  display: flex !important; width: 100% !important; min-height: 140px !important; height: auto !important;
  align-items: flex-end; justify-content: center; margin: 0 !important; padding: 76px 12px 14px !important;
  border: 1px solid var(--gpu-bordure); border-radius: 12px; background-color: #fff;
  background-position: center 18px !important; background-repeat: no-repeat !important; background-size: 55px auto !important;
  box-shadow: 0 4px 13px rgba(41,62,99,.08); transition: transform .2s ease, box-shadow .2s ease;
}
#RNU .two_3 > a > p:hover { transform: translateY(-3px); box-shadow: 0 9px 18px rgba(41,62,99,.14); }
#RNU .two_3 p span { width: 100%; padding: 8px; border-radius: 7px; background: var(--gpu-bleu); color: #fff; text-align: center; font-weight: bold; }

#ff {
  width: 100% !important; margin-top: 22px; padding: 20px !important;
  border: 1px solid var(--gpu-bordure) !important; border-radius: 14px; background: #fff;
}
#ff h3 { margin-top: 0; color: var(--gpu-bleu); }
#ff .gloss {
  display: grid !important; grid-template-columns: minmax(90px,140px) 1fr; align-items: center; gap: 10px;
  margin: 7px 0; padding: 10px 12px; border: 1px solid var(--gpu-bordure); border-radius: 9px; background: #f8fafc;
}
#ff .gloss b { color: var(--gpu-bleu); }
#ff .gloss img { display: none; }

/* Le pied GPU ne masque pas les longues listes de documents */
body:has(#PLU) .w3-bottom.w3-green { position: static !important; width: 100% !important; margin-top: 24px; }
body:has(#PLU) .fixe-bas { position: static; width: 100%; height: auto; padding: 10px; }

@media screen and (max-width: 785px) {
  #visuel3 { display: grid !important; grid-template-columns: 1fr; }
  #visuel3 .tablink { width: 100%; }
  .city { padding: 12px !important; }
  .city > .two.row { display: block !important; }
  .city > .two.row > .col:first-child { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 18px; }
  .DU { padding: 15px !important; }
  .DU > b:first-child { margin: -15px -15px 14px; }
}
@media screen and (max-width: 520px) {
  .city > .two.row > .col:first-child, #RNU .two_3 { grid-template-columns: 1fr; }
  #ff .gloss { grid-template-columns: 1fr; }
}

/* =========================================================
   LP.HTML : LIEUX PUBLICS
   ========================================================= */

.entete-lieux-publics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.entete-lieux-publics h2 {
  min-height: 42px;
  margin: 0;
  padding: 0 2px;
  color: #233c6e;
  font-size: 30px;
  line-height: 42px;
}
.bouton-pleine-page {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid #d9e4ce;
  border-radius: 10px;
  background: #edf5e5;
  color: #4f772d;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(41,62,99,.10);
  transition: transform .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.bouton-pleine-page:hover {
  background: #4f772d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(41,62,99,.16);
}
#LPLP {
  width: 100%;
  margin: 0 !important;
  padding: 10px !important;
  overflow: hidden;
  border: 1px solid #dce3ec !important;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(41,62,99,.10);
}
#Mada {
  display: block;
  width: 100%;
  height: 700px;
  border: 0;
  border-radius: 9px;
  background: #eef3fa;
}

/* Arrondis du bandeau Actualites sur toutes les pages */
#visuel2 {
  overflow: visible !important;
  border-radius: 15px !important;
  background: transparent !important;
  box-shadow: none !important;
}
#visuel2 .actualites-sticky {
  width: 100%;
  overflow: hidden !important;
  border: 1px solid #dce3ec;
  border-radius: 15px !important;
  background: #fff;
  box-shadow: 0 8px 24px rgba(41,62,99,.10);
}
#visuel2 .actualites-entete {
  border-radius: 14px 14px 0 0;
}
#visuel2.w3-green,
#visuel2.w3-blue,
#visuel2.w3-mobile {
  background: transparent !important;
}

/* Pied de page depliant commun */
.pied-page-depliant {
  width: 100%;
  margin-top: 24px;
  background: #4f772d;
  color: #fff;
}
.pied-page-resume {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: bold;
}
.pied-page-contenu {
  display: none;
  padding: 4px 18px 15px;
}
.pied-page-depliant.ouvert .pied-page-contenu { display: block; }
.pied-page-depliant a { color: #fff; font-weight: bold; }

@media screen and (max-width: 950px) {
  #Mada { height: 650px; }
}
@media screen and (max-width: 785px) {
  .entete-lieux-publics { display: block; }
  .entete-lieux-publics h2 { margin-bottom: 12px; font-size: 26px; line-height: 1.3; }
  .bouton-pleine-page { width: 100%; margin-bottom: 4px; }
  #LPLP { padding: 5px !important; }
  #Mada { height: 75vh; min-height: 550px; }
}
@media screen and (max-width: 520px) {
  #Mada { height: 70vh; min-height: 500px; }
}



/* =========================================================
   PRATIQUES.HTML : CARTES DE LIENS GENEREES EN JAVASCRIPT
   ========================================================= */
.pratiques-intro {
  margin: 0 0 18px;
  color: #64748b;
  line-height: 1.6;
}
.pratiques-outils {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.recherche-pratique {
  position: relative;
  flex: 1 1 auto;
}
.recherche-pratique i {
  position: absolute;
  top: 50%;
  left: 16px;
  color: #405a86;
  transform: translateY(-50%);
  pointer-events: none;
}
.recherche-pratique input {
  width: 100%;
  min-height: 48px;
  padding: 10px 15px 10px 46px;
  border: 1px solid #dce3ec;
  border-radius: 12px;
  outline: none;
  font: inherit;
}
.recherche-pratique input:focus {
  border-color: #405a86;
  box-shadow: 0 0 0 4px rgba(64,90,134,.14);
}
.compteur-pratiques {
  flex: 0 0 auto;
  min-width: 105px;
  padding: 10px 14px;
  border: 1px solid #d9e4ce;
  border-radius: 12px;
  background: #edf5e5;
  color: #4f772d;
  text-align: center;
  font-weight: bold;
}
.liens-pratiques-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 16px;
}
.carte-pratique {
  display: flex;
  min-width: 0;
  min-height: 245px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dce3ec;
  border-radius: 14px;
  background: #fff;
  color: #263238;
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(41,62,99,.10);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.carte-pratique:hover {
  border-color: #aac45d;
  color: #263238;
  transform: translateY(-4px);
  box-shadow: 0 11px 24px rgba(41,62,99,.17);
}
.carte-pratique-image {
  height: 145px;
  background-color: #eef3fa;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.carte-pratique-corps {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 15px 42px 15px 15px;
}
.carte-pratique-categorie {
  margin-bottom: 5px;
  color: #4f772d;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.carte-pratique-titre {
  color: #293e63;
  font-size: 17px;
  line-height: 1.3;
}
.carte-pratique-description {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}
.carte-pratique-fleche {
  position: absolute;
  right: 15px;
  bottom: 17px;
  color: #59709e;
  font-size: 17px;
}
.aucun-lien-pratique {
  grid-column: 1 / -1;
  padding: 36px 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: #64748b;
  text-align: center;
}
@media screen and (max-width:785px) {
  .pratiques-outils { display: block; }
  .compteur-pratiques { display: inline-block; margin-top: 10px; }
  .liens-pratiques-grille { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media screen and (max-width:520px) {
  .liens-pratiques-grille { grid-template-columns: 1fr; }
}


/* =========================================================
   BOUTON DU PIED DE PAGE SANS CADRE BLEU
   ========================================================= */

.pied-page-resume {
  display: flex;
  width: 100%;

  align-items: center;
  gap: 8px;

  margin: 0;
  padding: 10px 16px;

  border: 0;
  border-radius: 0;
  outline: 0;

  background: transparent;
  color: #ffffff;

  font-family: inherit;
  font-size: inherit;
  font-weight: bold;
  text-align: left;

  cursor: pointer;

  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.pied-page-resume:hover {
  background: #59709e;
  color: #ffffff;
}

.pied-page-resume:focus {
  outline: 0;
  box-shadow: none;
}

/* Indication clavier discrète et accessible */

.pied-page-resume:focus-visible {
  outline: 2px solid #f4c542;
  outline-offset: -3px;
  box-shadow: none;
}

.pied-page-resume i {
  color: inherit;
}



/* =========================================================
   CARTO.HTML : CARTHOTHEQUE MODERNISEE
   ========================================================= */
.carto-intro { margin-bottom:18px; padding:16px 18px; border:1px solid #dce3ec; border-radius:12px; background:linear-gradient(135deg,#fff,#eef3fa); line-height:1.6; }
.carto-intro p { margin:0 0 10px; }
.carto-intro p:last-child { margin-bottom:0; }
.carto-onglets { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; padding:10px; border:1px solid #dce3ec; border-radius:13px; background:#eef3fa; }
.carto-onglet { flex:1 1 185px; min-height:48px; padding:10px 14px; border:1px solid transparent; border-radius:9px; background:#fff; color:#293e63; font:inherit; font-weight:bold; cursor:pointer; box-shadow:0 3px 10px rgba(41,62,99,.07); transition:transform .2s ease,background .2s ease,color .2s ease; }
.carto-onglet:hover,.carto-onglet.actif { background:#f4c542; color:#17213a; transform:translateY(-2px); }
.carto-panneau[hidden] { display:none !important; }
.carto-outils { display:flex; align-items:center; gap:12px; margin:0 0 18px; }
.carto-recherche { position:relative; flex:1 1 auto; }
.carto-recherche i { position:absolute; top:50%; left:16px; color:#405a86; transform:translateY(-50%); pointer-events:none; }
.carto-recherche input { width:100%; min-height:48px; padding:10px 15px 10px 46px; border:1px solid #dce3ec; border-radius:12px; outline:none; font:inherit; }
.carto-recherche input:focus { border-color:#405a86; box-shadow:0 0 0 4px rgba(64,90,134,.14); }
.carto-compteur { flex:0 0 auto; min-width:105px; padding:10px 14px; border:1px solid #d9e4ce; border-radius:12px; background:#edf5e5; color:#4f772d; text-align:center; font-weight:bold; }
.carto-section { margin-bottom:24px; }
.carto-section-entete { margin:0 0 13px; }
.carto-section-entete span { display:block; color:#4f772d; font-size:11px; font-weight:bold; letter-spacing:.7px; text-transform:uppercase; }
.carto-section-entete h3 { margin:4px 0 3px; color:#293e63; font-size:22px; }
.carto-section-entete p { margin:0; color:#64748b; font-size:13px; line-height:1.45; }
.carto-grille { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:16px; }
.carte-carto { display:flex; min-width:0; min-height:245px; flex-direction:column; overflow:hidden; border:1px solid #dce3ec; border-radius:14px; background:#fff; color:#263238; text-decoration:none; box-shadow:0 5px 16px rgba(41,62,99,.10); transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease; }
.carte-carto:hover { border-color:#aac45d; color:#263238; transform:translateY(-4px); box-shadow:0 11px 24px rgba(41,62,99,.17); }
.carte-carto-image { height:150px; background-color:#eef3fa; background-position:center; background-repeat:no-repeat; background-size:cover; }
.carte-carto.image-contain .carte-carto-image { background-size:contain; }
.carte-carto-corps { position:relative; display:flex; flex:1 1 auto; flex-direction:column; padding:14px 42px 14px 14px; }
.carte-carto-categorie { margin-bottom:5px; color:#4f772d; font-size:11px; font-weight:bold; letter-spacing:.6px; text-transform:uppercase; }
.carte-carto-titre { color:#293e63; font-size:16px; line-height:1.3; }
.carte-carto-detail { margin:6px 0 0; color:#64748b; font-size:12px; line-height:1.4; }
.carte-carto-icone { position:absolute; right:14px; bottom:15px; color:#59709e; font-size:17px; }
.carto-archives { margin:0; padding:0; list-style:none; border:1px solid #dce3ec; border-radius:13px; overflow:hidden; }
.carto-archives li + li { border-top:1px solid #dce3ec; }
.carto-archives a { display:flex; align-items:center; gap:11px; padding:13px 15px; color:#293e63; text-decoration:none; background:#fff; }
.carto-archives a:hover { background:#eef3fa; }
.carto-note { margin-top:18px; padding:12px 14px; border-left:4px solid #aac45d; background:#f8fafc; color:#64748b; font-size:13px; line-height:1.5; }
.aucune-carte { grid-column:1/-1; padding:36px 18px; border:1px dashed #cbd5e1; border-radius:12px; color:#64748b; text-align:center; }
@media screen and (max-width:785px) { .carto-outils { display:block; } .carto-compteur { display:inline-block; margin-top:10px; } .carto-grille { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media screen and (max-width:520px) { .carto-grille { grid-template-columns:1fr; } .carto-onglets { display:grid; grid-template-columns:1fr; } }


/* =========================================================
   CARTHOTHÈQUE : conserver la taille des vignettes filtrées
   ========================================================= */

.carto-grille {
  display: grid;

  /*
   * auto-fill conserve les emplacements de la grille,
   * même lorsqu'il reste peu de résultats.
   */
  grid-template-columns:
    repeat(auto-fill, minmax(210px, 260px));

  justify-content: start;
  align-items: stretch;

  gap: 16px;
}

/* Largeur maximale stable des cartes */

.carte-carto {
  width: 100%;
  max-width: 260px;
}

/* Tablette */

@media screen and (max-width: 785px) {

  .carto-grille {
    grid-template-columns:
      repeat(auto-fill, minmax(190px, 1fr));
  }

  .carte-carto {
    max-width: none;
  }
}

/* Téléphone */

@media screen and (max-width: 520px) {

  .carto-grille {
    grid-template-columns: 1fr;
  }

  .carte-carto {
    max-width: none;
  }
}


