/* V77: rectification des dimensions, uniformisation des cartes et visionneuses. */
#materiaux .native-grid > .native-card {
  min-height:516px; display:flex; flex-direction:column; align-self:stretch;
  background:#fff; border:1px solid #e9e9e6; border-radius:12px;
}
#materiaux .native-card > .native-static-card,
#materiaux .native-card > details {display:flex; flex-direction:column; flex:1 1 auto; min-width:0;}
#materiaux .native-card > details > summary {display:flex; flex-direction:column; flex:1 1 auto; min-width:0;}
#materiaux .native-card .native-card-info {display:flex; flex-direction:column; flex:1 1 auto; min-width:0; padding:12px;}
#materiaux .native-card .native-card-info .native-tech:last-of-type {margin-top:auto;}
#materiaux .native-card .aed-zoom-trigger,
#materiaux .native-card .native-placeholder,
#materiaux .native-card summary > img {flex:0 0 290px; height:290px!important; width:100%; overflow:hidden; background:#eee;}
#materiaux .native-card .aed-zoom-trigger > img {display:block;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;}
#materiaux .native-card .native-placeholder {display:grid!important;place-items:center!important; text-align:center; padding:12px;}
#materiaux .native-card-info h3 {overflow-wrap:break-word;hyphens:auto;}
/* Les images originales restent entières dans les vues agrandies. */
.aed-viewer:target {background:rgba(7,8,8,.995)!important;}
.aed-viewer .aed-viewer-inner {min-height:0;justify-content:safe center!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;}
.aed-viewer .aed-viewer-inner img {max-width:100%!important;object-fit:contain!important;min-height:0;}
.aed-viewer .aed-viewer-details, .aed-viewer .aed-viewer-meta {flex:0 0 auto;max-width:100%;}
.aed-viewer .aed-viewer-count {flex:0 0 auto;}
.aed-viewer>a.aed-close,.aed-viewer>a.aed-prev,.aed-viewer>a.aed-next {width:44px!important;height:44px!important;min-width:44px;min-height:44px;}
body:has(.aed-viewer:target) {overflow:hidden;}
/* Cartes des réalisations : légendes de hauteur constante, sans rognage des textes. */
#realisations .works > .aed-new-work {display:flex!important;flex-direction:column;overflow:hidden;}
#realisations .aed-new-work > img {flex:0 0 auto;}
#realisations .aed-new-work > span {display:flex; flex-direction:column; gap:3px; justify-content:center;min-height:72px; flex:1 1 auto;box-sizing:border-box;}
#realisations .aed-new-work > span small {max-width:100%;overflow-wrap:anywhere;}
@media(max-width:600px){
 #materiaux .native-grid > .native-card {min-height:550px;}
 #materiaux .native-card .aed-zoom-trigger,
 #materiaux .native-card .native-placeholder,
 #materiaux .native-card summary > img {height:190px!important;flex-basis:190px;}
 .aed-viewer {padding:60px 45px 22px!important;}
 .aed-viewer .aed-viewer-inner {max-height:calc(100dvh - 82px)!important;justify-content:safe center!important;}
 .aed-viewer .aed-viewer-inner img {max-height:calc(100dvh - 340px)!important;}
 .aed-viewer .aed-prev {left:1px!important;}
 .aed-viewer .aed-next {right:1px!important;}
 #realisations .aed-new-work > span {min-height:82px;}
}
@media(max-width:360px){
 #materiaux .native-grid > .native-card {min-height:590px;}
 .aed-viewer .aed-viewer-inner img {max-height:calc(100dvh - 360px)!important;}
}
@media(max-height:620px){
 .aed-viewer .aed-viewer-inner {justify-content:safe center!important;}
 .aed-viewer .aed-viewer-inner img {max-height:calc(100dvh - 350px)!important;}
}
/* Trois cartes deviennent trop serrées sur les tablettes en paysage ; privilégier deux colonnes. */
@media (min-width:801px) and (max-width:1100px) {
 #materiaux .native-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
/* Visionneuse en paysage : photo et caractéristiques côte à côte, et non une image de 40px. */
@media (min-width:601px) and (max-height:620px), (orientation:landscape) and (min-width:480px) and (max-width:600px) {
 .aed-viewer {padding:20px 58px 18px!important;}
 .aed-viewer .aed-viewer-inner {
   width:100%;max-height:calc(100dvh - 40px)!important;
   display:flex;flex-direction:row;align-items:center;
   justify-content:safe center!important; gap:14px;
   overflow-y:auto!important;
 }
 .aed-viewer .aed-viewer-inner img {
   width:auto!important; max-width:54%!important;
   max-height:calc(100dvh - 52px)!important;
   flex:0 1 auto;
 }
 .aed-viewer .aed-viewer-details,.aed-viewer .aed-viewer-meta {
   width:auto!important;flex:1 1 42%;min-width:0;
   max-height:calc(100dvh - 52px);overflow:auto;
 }
 .aed-viewer .aed-viewer-count {
   position:absolute;left:50%;bottom:4px;transform:translateX(-50%);
   white-space:nowrap;order:initial;
 }
 .aed-viewer .aed-close {top:4px!important;}
}

/* V81: descriptions et liens des fiches Ēclos */
#materiaux .aed-eclos-summary{font-size:12px;line-height:1.5;margin:10px 0 5px;}#materiaux .aed-eclos-source{font-size:12px;margin:4px 0 10px;}#materiaux .aed-eclos-source a{color:inherit;text-decoration:underline;text-underline-offset:2px;}
