/* Accord refonte 2026 : pages partenaires-actus (lot parallele)
   partenaires_entites.php, partenaires_banques_assurances.php, actu/index.php.
   Aucune regle d'Immo ici. */

:where(.ac-part, .ac-actus-page, .ac-actus-raccourcis) :where(*) { color: inherit; font-family: inherit; }
.ac-part *, .ac-actus-page *, .ac-actus-raccourcis * { box-sizing: border-box; }

/* ---------- partenaires : colonne laterale + liste ---------- */
.ac-part { background: var(--ac-fond); color: var(--ac-texte); }
.ac-part-in { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }

.ac-part-cote { text-align: left; position: sticky; top: 130px; display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--ac-r); background: var(--ac-nuit); color: #fff; }
.ac-part .ac-part-compteur { display: flex; align-items: baseline; gap: 12px; margin: 0; }
.ac-part-compteur strong { font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.ac-part-compteur span { display: block; font-size: 15px; line-height: 1.35; font-weight: 600; color: rgba(255, 255, 255, .8); }
.ac-part-compteur em { font-style: normal; color: var(--ac-ambre); }
.ac-part .ac-part-cote-titre { margin: 4px 0 -4px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 14px; font-weight: 700; color: #fff; }
.ac-part-regions { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-part-regions a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: var(--ac-r-max, 7px); border: 1px solid rgba(255, 255, 255, .2); font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, .88); text-decoration: none; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.ac-part-regions a:hover { border-color: var(--ac-ambre); color: #fff; }
.ac-part-regions a.actif { background: var(--ac-ambre); border-color: var(--ac-ambre); color: var(--ac-nuit); }
.ac-part-regions strong { font-size: 14px; color: rgba(255, 255, 255, .8); }
.ac-part-cote .ac-btn { width: 100%; }

.ac-part-principal { min-width: 0; display: grid; gap: 14px; }
.ac-part-entete { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ac-part-entete .ac-titre-bloc { margin: 0; }
.ac-part-entete .ac-titre-bloc em { font-style: normal; color: var(--ac-ardoise); }
.ac-part-filtre { position: relative; display: block; width: 280px; margin: 0; }
.ac-part-filtre svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ac-gris); }
.ac-part-filtre input { width: 100%; height: 42px; min-height: 42px; margin: 0; padding: 0 14px 0 40px !important; border: 1px solid #CBD3DC; border-radius: var(--ac-r-max, 7px); background: #fff; font-family: var(--ac-police); font-size: 14.5px; color: var(--ac-encre); }
.ac-part-filtre input::placeholder { color: var(--ac-gris); }
.ac-part-filtre input:focus { outline: none; border-color: var(--ac-nuit); box-shadow: 0 0 0 3px rgba(67, 94, 121, .18); }

/* grilles de fiches */
.ac-part-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ac-part-grille-4 { gap: 12px; }
/* fiches banques / assurances : logo a gauche, texte a droite (liste longue, plus dense) */
.ac-part-carte.ac-part-carte-mini { flex-direction: row; align-items: stretch; gap: 14px; padding: 12px; }
.ac-part-carte-mini .ac-part-logo { width: 104px; height: 72px; flex: none; }
.ac-part-carte-mini .ac-part-corps { gap: 4px; }
.ac-part-carte-mini .ac-part-adresse { font-size: 13.5px; line-height: 1.4; }
.ac-part-carte-mini .ac-lien-fleche { font-size: 13px; }
.ac-part-carte { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--ac-r); background: #fff; box-shadow: var(--ac-ombre-1); transition: box-shadow .2s ease, transform .2s ease; }
.ac-part-carte:hover { box-shadow: var(--ac-ombre-2); transform: translateY(-2px); }
.ac-part-carte[hidden], .ac-part-groupe[hidden], .ac-part-vide[hidden] { display: none; }
/* derniere ligne incomplete : la derniere fiche s'elargit (pas de carte isolee ni de trou) ; en ligne pour les fiches larges */
.ac-part-grille > .ac-part-carte:last-of-type:nth-of-type(3n+1) { grid-column: 1 / -1; }
.ac-part-grille > .ac-part-carte:last-of-type:nth-of-type(3n+2) { grid-column: span 2; }
.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+1), .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+2) { flex-direction: row; align-items: center; gap: 22px; }
.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+1) .ac-part-logo, .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+2) .ac-part-logo { width: 220px; flex: none; }
.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+1) .ac-part-corps, .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+2) .ac-part-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: 28px; row-gap: 6px; align-items: start; }
.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+1) .ac-part-corps > *, .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+2) .ac-part-corps > * { grid-column: 1; }
.ac-part .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+1) .ac-part-coord, .ac-part .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+2) .ac-part-coord { grid-column: 2; grid-row: 1 / span 4; margin: 0; padding: 0 0 0 28px; border-top: 0; border-left: 1px solid var(--ac-ligne); }

/* zone du logo : taille fixe, fond blanc, logo contenu ; pictogramme de repli si pas de logo */
.ac-part-logo { position: relative; display: grid; place-items: center; height: 84px; margin: 0; padding: 10px; border: 1px solid var(--ac-ligne); border-radius: var(--ac-r-max, 7px); background: #fff; overflow: hidden; }
.ac-part-logo img { position: absolute; z-index: 1; inset: 8px; display: block; width: calc(100% - 16px); height: calc(100% - 16px); max-width: none; object-fit: contain; background: #fff; }
.ac-part-repli { position: absolute; width: 34px !important; height: 34px !important; color: var(--ac-ardoise-2); stroke-width: 1.6 !important; opacity: 0; }
.ac-part-logo.ac-sans-logo { background: var(--ac-fond); border-color: transparent; }
.ac-part-logo.ac-sans-logo .ac-part-repli { opacity: 1; }

.ac-part-corps { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.ac-part-nom { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 700; color: var(--ac-encre); overflow-wrap: anywhere; }
.ac-part-carte-mini .ac-part-nom { font-size: 15px; }
.ac-part-contact { margin: 0; font-size: 14px; font-weight: 600; color: var(--ac-ardoise); }
.ac-part .ac-part-adresse { display: flex; gap: 8px; margin: 0; font-size: 14px; line-height: 1.45; color: var(--ac-texte); }
.ac-part-adresse svg { width: 16px; height: 16px; margin-top: 2px; color: var(--ac-ambre-fonce); }
.ac-part .ac-part-coord { list-style: none; margin: 4px 0 0; padding: 10px 0 0; border-top: 1px solid var(--ac-ligne); display: grid; gap: 4px; font-size: 13.5px; line-height: 1.4; color: var(--ac-encre); }
.ac-part-coord li { display: flex; gap: 8px; min-width: 0; }
.ac-part-coord li > span { flex: none; width: 64px; color: var(--ac-gris); }
.ac-part-coord a { color: var(--ac-ardoise); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.ac-part-coord a:hover { text-decoration: underline; }
.ac-part-corps .ac-lien-fleche { margin-top: auto; padding-top: 4px; font-size: 14px; text-decoration: none; }

/* groupes (assurances, banques par secteur) */
.ac-part-groupes { display: grid; gap: 22px; }
.ac-part-groupe { display: grid; gap: 12px; }
.ac-part-groupe-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--ac-ligne); }
.ac-part-groupe-tete h3 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; color: var(--ac-encre); }
.ac-part-groupe-tete h3 a { color: var(--ac-encre); text-decoration: none; }
.ac-part-groupe-tete h3 a:hover { color: var(--ac-ardoise); text-decoration: underline; text-underline-offset: 3px; }
.ac-part-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: var(--ac-r-max, 7px); background: var(--ac-ambre-clair); font-size: 13px; font-weight: 700; color: var(--ac-ambre-fonce); }

.ac-part .ac-part-vide { grid-column: 1 / -1; margin: 0; padding: 18px 20px; border-radius: var(--ac-r); background: #fff; box-shadow: var(--ac-ombre-1); font-size: 15px; font-weight: 600; color: var(--ac-encre); }
.ac-part .ac-pagination { margin: 4px 0 0 !important; }
.ac-part .ac-pagination:empty, .ac-part .ac-pagination:not(:has(a + a)) { display: none; }
/* bloc actualites qui suit, sur le meme fond : pas de double marge */
.ac-part ~ .ac-actus { padding-top: 8px; }
.ac-pagination-ellipse { min-width: 24px; height: 38px; display: grid; place-items: center; font-weight: 700; color: var(--ac-gris); }

/* ---------- actualites ---------- */
.ac-actus-page { background: var(--ac-fond); color: var(--ac-texte); }
.ac-services + .ac-actus-page { padding-top: 40px; }
.ac-actus-page-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
/* la plus recente sur deux colonnes, et la derniere elargie si besoin : la grille reste pleine quel que soit le nombre */
.ac-actus-page-carte:first-child:not(:only-child) { background: var(--ac-nuit); }
.ac-actus-page-carte:first-child:not(:only-child):not(:nth-last-child(3n)), .ac-actus-page-carte:last-child:nth-child(3n+1):not(:only-child) { grid-column: span 2; }
.ac-actus-page .ac-actus-page-carte:first-child:not(:only-child) .titre_actu, .ac-actus-page .ac-actus-page-carte:first-child:not(:only-child) .titre_actu a { font-size: 21px !important; color: #fff !important; }
.ac-actus-page-carte:first-child:not(:only-child) .ac-actus-page-texte { color: rgba(255, 255, 255, .78); }
.ac-actus-page-carte:first-child:not(:only-child) .ac-lien-fleche { color: var(--ac-ambre); }
.ac-actus-page-carte:only-child { grid-column: 1 / -1; }
.ac-actus-page-carte { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; border-radius: var(--ac-r); background: #fff; box-shadow: var(--ac-ombre-1); transition: box-shadow .2s ease, transform .2s ease; }
.ac-actus-page-carte:hover { box-shadow: var(--ac-ombre-2); transform: translateY(-2px); }
.ac-actus-page .titre_actu { margin: 0 !important; padding: 0 !important; font-size: 17px !important; line-height: 1.3 !important; font-weight: 700 !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--ac-encre) !important; background: none !important; }
.ac-actus-page .titre_actu a { color: var(--ac-encre) !important; text-decoration: none; }
.ac-actus-page .titre_actu a:hover { color: var(--ac-ardoise) !important; }
.ac-actus-page-texte { font-size: 14.5px; line-height: 1.55; color: var(--ac-texte); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; overflow-wrap: anywhere; }
.ac-actus-page-texte img { display: none; }
.ac-actus-page .ac-actus-page-texte p { margin: 0 0 6px; }
.ac-actus-page-carte .ac-lien-fleche { margin-top: auto; font-size: 14px; text-decoration: none; }
.ac-actus-page .ac-actus-page-vide { grid-column: 1 / -1; margin: 0; padding: 18px 20px; border-radius: var(--ac-r); background: #fff; box-shadow: var(--ac-ombre-1); font-size: 15px; font-weight: 600; color: var(--ac-encre); }

.ac-actus-page { padding-bottom: 14px; }
.ac-actus-raccourcis { padding: 0 0 48px !important; background: var(--ac-fond); }
.ac-actus-raccourcis-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ac-actus-raccourcis .ac-raccourci { color: var(--ac-encre); }
.ac-actus-raccourcis .ac-raccourci strong { font-size: 16px; font-weight: 700; color: var(--ac-encre); }
.ac-actus-raccourcis .ac-fleche { margin-left: auto; color: var(--ac-ardoise); }

/* ---------- adaptations ---------- */
@media (max-width: 1140px) {
	.ac-actus-page-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ac-actus-page-carte:first-child:not(:only-child):not(:nth-last-child(3n)), .ac-actus-page-carte:last-child:nth-child(3n+1):not(:only-child) { grid-column: auto; }
	.ac-actus-page-grille > .ac-actus-page-carte:first-child:not(:only-child), .ac-actus-page-grille > .ac-actus-page-carte:last-child:nth-child(2n) { grid-column: 1 / -1; }
	.ac-part-in { grid-template-columns: 1fr; }
	.ac-part-cote { position: static; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 24px; align-items: center; }
	.ac-part-compteur, .ac-part-cote .ac-btn { grid-column: 1; }
	.ac-part-cote-titre { display: none; }
	.ac-part-regions { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 1000px) {
	.ac-part-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ac-part-grille > .ac-part-carte:last-of-type:nth-of-type(3n+1), .ac-part-grille > .ac-part-carte:last-of-type:nth-of-type(3n+2) { grid-column: auto; }
	.ac-part-grille > .ac-part-carte:last-of-type:nth-of-type(2n+1) { grid-column: 1 / -1; }
	.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+1), .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+2) { flex-direction: column; align-items: stretch; }
	.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+1) .ac-part-logo, .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+2) .ac-part-logo { width: auto; }
	.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+1) .ac-part-corps, .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+2) .ac-part-corps { display: flex; align-items: stretch; }
	.ac-part .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+1) .ac-part-coord, .ac-part .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(3n+2) .ac-part-coord { padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--ac-ligne); }
	.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(2n+1) { flex-direction: row; align-items: center; gap: 22px; }
	.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(2n+1) .ac-part-logo { width: 220px; flex: none; }
	.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(2n+1) .ac-part-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: 28px; row-gap: 6px; align-items: start; }
	.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(2n+1) .ac-part-corps > * { grid-column: 1; }
	.ac-part .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(2n+1) .ac-part-coord { grid-column: 2; grid-row: 1 / span 4; margin: 0; padding: 0 0 0 28px; border-top: 0; border-left: 1px solid var(--ac-ligne); }
}
@media (max-width: 767px) {
	.ac-part-cote { display: flex; align-items: stretch; padding: 20px; }
	.ac-part-cote-titre { display: block; }
	.ac-part-compteur strong { font-size: 42px; }
	.ac-part-filtre { width: 100%; }
	.ac-part-carte-mini .ac-part-logo { width: 88px; height: 64px; }
	.ac-part-grille { grid-template-columns: 1fr; }
	.ac-part-grille > .ac-part-carte { grid-column: auto !important; }
	.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(2n+1) { flex-direction: column; align-items: stretch; }
	.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(2n+1) .ac-part-logo { width: auto; }
	.ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(2n+1) .ac-part-corps { display: flex; align-items: stretch; }
	.ac-part .ac-part-grille:not(.ac-part-grille-4) > .ac-part-carte:last-of-type:nth-of-type(2n+1) .ac-part-coord { padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--ac-ligne); }
	.ac-actus-page-grille { grid-template-columns: 1fr; }
	.ac-actus-page-grille > .ac-actus-page-carte { grid-column: auto !important; }
	.ac-actus-raccourcis-grille { grid-template-columns: 1fr; gap: 10px; }
}
