/* DA 2027, reprise 2 du 17/11/2026 : défauts du contrôle aveugle 1. Chargée après da27-affinage-5.css. */

/* ---------- Zones tactiles sans chevauchement ---------- */
/* liens de crédit : chacun dans sa propre boîte (aucune boîte commune avec le lien voisin), coupée dans les vignettes étroites */
html.da27 :is(figcaption, .home-credits li, [class*="credit"]) a { display: inline-block; max-width: 100%; white-space: normal; }
/* liens seuls dans une puce : 44 px de haut, numéro ou puce sur la première ligne du lien */
@media (pointer: coarse), (max-width: 1024px) {
    html.da27 #main-content :is(ul, ol):is(:not([class]), .sp-sources, .sp-liste):not(.ui-breadcrumb ol):not(nav ul):not(nav ol) > li > a:is(:not([class]), .sp-lien, .si-link):not(.ui-btn):not(.da-btn) { vertical-align: top !important; padding-top: 0 !important; padding-bottom: max(0px, calc(44px - 1lh)) !important; }
    /* rangées de liens (« A · B ») et source isolée : chaque lien a sa propre zone de 44 px */
    /* liens pris dans une phrase : aucune boîte gonflée qui déborde sur la ligne voisine */
    html.da27 #main-content .sp-essentiel__l .da-carte-corps > div > a.sp-lien { padding-block: 0; }
    /* lignes de contact : 44 px sans marge négative */
    html.da27 #main-content a.block:is([href^="tel:"], [href^="mailto:"]) { display: flex; align-items: center; min-height: 44px; margin-block: 0; padding-block: 0; }
    html.da27 .ui-contactbox__lignes a { margin-block: 0; }
    /* crédit posé sur la photo (tuiles du hub) : bandeau plein de 44 px, le lien en occupe toute la hauteur */
    html.da27 .ui-figure > figcaption.ui-figure__credit > a { display: inline-flex; align-items: center; min-height: 44px; margin-block: 0; padding-block: 0; }
    html.da27 #main-content :is(.ne-bloc__liens, .ro-sources, .ui-alert[data-renvoi] p, .ce-source-carte__org, td, .ui-timeline__meta, .ui-kpi__source, .fr-compte) > a:not(.ui-btn):not(.da-btn) { display: inline-flex; align-items: center; min-height: 44px; min-width: 48px; max-width: 100%; vertical-align: middle; margin-block: 0; padding-block: 0; }
}

/* ressources de l'accueil : pictogramme et nom séparés (la règle générique des liens de liste imposait inline-block) */
html.da27 #main-content .home-resources li > a { display: inline-flex !important; align-items: center; gap: 8px; min-height: 44px; padding-block: 0 !important; }

/* ---------- Formulaire « grand projet » : surface et unité l'une sous l'autre sur téléphone ---------- */
@media (max-width: 479.98px) { html.da27 #main-content .gp-form__ligne:not(.gp-form__ligne--2) > .gp-form__surface { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Carte économique : calques hors de la colonne d'outils et du zoom, parcours en aplats ---------- */
html.da27 .ce-bas { right: 64px; }
html.da27 .ce-haut { left: 66px; }
html.da27[dir="rtl"] .ce-bas { right: 8px; left: 64px; }
html.da27[dir="rtl"] .ce-haut { left: 64px; right: 66px; }
@media (min-width: 768px) { html.da27 .ce-carte--outils .ce-bas { right: calc(64px + min(380px, 100% - 72px) + 8px); } html.da27[dir="rtl"] .ce-carte--outils .ce-bas { right: 8px; left: calc(64px + min(380px, 100% - 72px) + 8px); } }
html.da27 .ce-parcours__btn { border: 0; border-radius: 0; background: var(--brand-50, #F1F5F9); }
html.da27 .ce-parcours__btn:hover { background: var(--ce-hover, #E2E8F0); }
html.da27 .ce-parcours__btn[aria-pressed="true"] { background: var(--c-brand-soft, #E6EDF3); box-shadow: none; }
html.da27 .ce-chip { border-color: transparent; }
html.da27 .ce-chip--tout { border-style: solid; border-color: transparent; background: var(--brand-50, #F1F5F9); }
/* chronologie : toutes les années visibles ; « Évolution depuis » passe dessous quand la place manque */
html.da27 .ce-chrono__bas { flex-wrap: wrap; row-gap: 4px; }
html.da27 .ce-chrono__annees { flex: 0 1 auto; max-width: 100%; }

/* ---------- Légende des tableaux défilants : entière dans la partie visible ---------- */
html.da27 .ui-table__cadre:has(> .ui-table--defile) { container-type: inline-size; }
html.da27 .ui-table__cadre > .ui-table--defile > caption { text-align: start; padding-inline-end: max(16px, calc(100% - 100cqw + 16px)); }
html.da27[dir="rtl"] .ui-table__cadre > .ui-table--defile > caption { padding-inline-end: max(16px, calc(100% - 100cqw + 16px)); }

/* ---------- Photo de commercialisateurs : légende en aplat de la même hauteur que la photo ---------- */
@media (min-width: 1024px) {
    html.da27 .cm27 > section .vz-piece > .ui-photo-libre { align-items: stretch; }
    html.da27 .cm27 > section .vz-piece > .ui-photo-libre .ui-photo-libre__legende { justify-content: flex-end; padding: clamp(24px, 2.5vw, 40px); background: var(--brand-50, #F1F5F9); }
}

/* ---------- Vidéo seule (interlocuteurs) : vignette de 640 px jamais agrandie, centrée dans la colonne (marges égales) ---------- */
html.da27 #main-content .da-videos-piece--grand > .da-video--sd { inline-size: 100%; max-inline-size: 640px; margin-inline: auto; }

/* ---------- Fiche entreprise : valeur en toutes lettres entière, comptes officiels en aplats de même largeur ---------- */
html.da27 #main-content .vo-chiffre__n--txt { font-size: 1.0625rem; line-height: 1.35; overflow-wrap: normal; hyphens: manual; }
html.da27 #main-content .ro-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: 4px; }
html.da27 #main-content .ro-liste > li { max-width: none; min-width: 0; }
html.da27 #main-content .ro-compte { display: flex !important; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; margin: 0 !important; padding: 0 14px !important; min-height: 44px; border: 0; border-radius: 0; background: var(--brand-50, #F1F5F9); }   /* !important : la règle générique des liens de liste (spécificité 1,9,5) ne s'applique pas à ces pastilles */
html.da27 #main-content .ro-compte:hover { background: var(--brand-100, #E2E8F0); }

/* ---------- Sans cadre : boutons fantômes, sources, bandeau des cookies, boutons secondaires ---------- */
html.da27 .da-btn--fantome { border-color: transparent; background: rgba(255, 255, 255, .16); }
html.da27 .da-btn--fantome:hover { border-color: transparent; background: rgba(255, 255, 255, .28); }
html.da27 .sp-sources:not(.sp-sources--pli) { border: 0; background: var(--brand-50, #F1F5F9); }
html.da27 .consentement { border: 0; }
html.da27 :is(.sp-contact .ui-btn--primary, .nb-btn--plein) { border-color: transparent; }
html.da27 altcha-widget { --altcha-color-border: transparent; --altcha-color-base: var(--brand-50, #F1F5F9); }
html.da27 altcha-widget .altcha { border-color: transparent; background: var(--brand-50, #F1F5F9); }
html.da27 :is(.ui-btn--secondary, .da-btn--secondaire) { border-color: transparent; box-shadow: none; }
html.da27 .sp-contact .ui-btn--secondary { border-color: transparent; background: rgba(255, 255, 255, .16); }
html.da27 .sp-contact .ui-btn--secondary:hover { border-color: transparent; background: rgba(255, 255, 255, .28); }
/* coordonnées : libellé et valeur sur la même ligne de base, quelle que soit la hauteur de la zone tactile */
html.da27 .sp-coordonnees > div { align-items: baseline; }

/* ---------- Galeries de photos : rangées complètes sous 900 px (dernière rangée élargie, jamais une photo seule à côté d'un vide) ---------- */
@media (max-width: 639.98px) {
    html.da27 #main-content .vz-galerie > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 640px) and (max-width: 899.98px) {
    html.da27 #main-content .vz-galerie { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    html.da27 #main-content .vz-galerie > li { grid-column: span 2; }
    html.da27 #main-content .vz-galerie > li:nth-last-child(2):nth-child(3n + 1), html.da27 #main-content .vz-galerie > li:last-child:nth-child(3n + 2) { grid-column: span 3; }
    html.da27 #main-content .vz-galerie > li:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
}

/* ---------- Graphiques à axes (#362) : libellés de 12 unités, entiers ; largeur bornée pour garder des libellés à taille de texte ---------- */
html.da27 .g362__svg.g362__svg--axes .ax { font-size: 12px; }
html.da27 .g362__svg.g362__svg--axes .v { font-size: 13px; }
html.da27 .g362__svg.g362__svg--axes { max-width: 480px; margin-inline: auto; }

/* ---------- Photos de 960 px : jamais agrandies au-delà de leur taille (colonne de 1008 px à 1920) ---------- */
html.da27 #main-content .vz-piece > :is(.vz-moyenne, .ui-photo-libre:not(.vz-grande)), html.da27 #main-content :is(.si-section, .da-acc__rep, .sp-corps > section) > .ui-photo-libre { max-width: 960px; }

/* ---------- Volets fermés : contenu retiré de la mise en page (aucun lien caché qui recouvre la page) ---------- */
html.da27 details:not([open]) > :not(summary) { display: none; }

/* ---------- Création de compte : sans cadre ni tuile arrondie, aides lisibles, lien « Se connecter » à 44 px ---------- */
html.da27 .glass-form { border-color: transparent; }
html.da27 .glass-form .bg-brand-soft.rounded-2xl { border-radius: 0; }
html.da27 .glass-form .help-text { font-size: .8125rem; line-height: 1.4; }
html.da27 .glass-form a[href$="/login/"].font-bold { display: inline-flex; align-items: center; min-height: 44px; vertical-align: middle; }

/* ---------- Boutons sans cadre : carte économique et encadré de contact ---------- */
html.da27 :is(.ce-btn--plein, .ce-btn--flot) { border-color: transparent; }
html.da27 .ui-contactbox .ui-btn--primary { border-color: transparent; }
/* bouton « i » de la légende : 44 px pris dans la ligne, sans marge négative qui chevauche l'en-tête */
html.da27 .ce-info { margin-block: 0; }
/* attribution MapLibre repliable : le bouton ne couvre plus le lien « MapLibre » */
html.da27 .maplibregl-ctrl-attrib.maplibregl-compact-show { padding-inline-end: 30px; }
/* tableaux de chiffres sur téléphone : en-têtes sur deux lignes, largeur réduite de 566 à 324 px (défilement résiduel à 360) */
@media (max-width: 479.98px) {
    html.da27 .si-table :is(thead th, th[scope="col"]) { white-space: normal; hyphens: manual; vertical-align: bottom; }
    html.da27 .si-table :is(th, td) { padding-inline: 4px; }
    html.da27 .si-table thead th { font-size: .75rem; }
}

/* ---------- Reliquats du balayage complet (51 pages × 6 largeurs) ---------- */
/* chiffres de domaine (annuaire) : aplats sans cadre */
html.da27 .acr-chiffres--bandeau > div { border-color: transparent; background: var(--brand-50, #F1F5F9); }
/* annuaire : bouton « Filtres » et emplacement du logo en aplats, sans cadre */
html.da27 .an-plus__t { border-color: transparent; background: var(--brand-50, #F1F5F9); }
html.da27 .an-tuile__logo { border-color: transparent; background: var(--brand-50, #F1F5F9); }
/* tableau des cookies : en-tête en aplat au lieu d'un filet */
html.da27 #main-content table thead { border-bottom-color: transparent; }
html.da27 #main-content table thead th { background: var(--brand-50, #F1F5F9); }
@media (pointer: coarse), (max-width: 1024px) {
    /* case « comparer » d'une fiche : 44 px sans marge négative sur le bouton voisin */
    html.da27 #main-content .cmp-case--fiche > input:is([type="checkbox"]) { margin-inline: 0; }
    /* lien seul sous un formulaire et chaîne d'une vidéo : 44 × 44 au moins */
    html.da27 .maj-rgpd p > a { display: inline-flex; align-items: center; min-height: 44px; }
    html.da27 a.vid-carte__chaine { min-width: 44px; justify-content: center; }
}
/* logos d'organismes : pastille blanche sans cadre */
html.da27 .ui-logo-org { border-color: transparent; }
/* « Les chiffres de ce domaine : A · B · C » : une rangée qui passe à la ligne, points entre les liens */
html.da27 #main-content p.acr-pages { display: flex; flex-wrap: wrap; align-items: center; column-gap: .5rem; }
html.da27 #main-content p.acr-pages > .ui-help { flex-basis: 100%; }
/* boutons « garder » et « alerte » des offres, zoom des cartes : sans cadre */
html.da27 .sel-btn { border-color: transparent; }
html.da27 .cmp-alerte { border-color: transparent; background: var(--brand-50, #F1F5F9); }
html.da27 .leaflet-bar { border-color: transparent; }
/* pagination : pages en aplats, page courante en aplat plein ; aucun cadre */
html.da27 .ui-page { border-color: transparent; }
html.da27 .ui-page:not([aria-current]):not(.is-gap) { background: var(--brand-50, #F1F5F9); }
/* bouton clair sur photo : voile blanc au lieu d'un contour */
html.da27 .ui-btn--contour-clair { border-color: transparent; background: rgba(255, 255, 255, .16); }
html.da27 .ui-btn--contour-clair:hover { background: rgba(255, 255, 255, .28); }
/* tableau des cookies : lignes séparées par des aplats alternés, sans grille */
html.da27 #main-content table:not(.si-table) :is(th, td) { border-color: transparent; }
html.da27 #main-content table:not(.si-table) tbody tr:nth-child(even) { background: var(--brand-50, #F1F5F9); }
@media (pointer: coarse), (max-width: 1024px) {
    /* attribution MapLibre sur écran tactile : bouton et lien de 44 px */
    html.da27 .maplibregl-ctrl-attrib.maplibregl-compact { min-height: 44px; min-width: 44px; box-sizing: border-box; }
    html.da27 .maplibregl-ctrl-attrib-button { width: 44px; height: 44px; background-position: center; background-repeat: no-repeat; background-size: 24px 24px; }
    html.da27 .maplibregl-ctrl-attrib.maplibregl-compact-show { padding-inline-end: 48px; }
    html.da27 .maplibregl-ctrl-attrib-inner a { display: inline-flex; align-items: center; min-height: 44px; }
}
/* carte de canton : l'attribution passe au-dessus de la légende posée en bas, jamais dessous */
html.da27 .fc-carte .maplibregl-ctrl-bottom-right { bottom: 48px; }
