/* Densité maîtrisée, même grille et accès tactiles sur chaque appareil. */
html body #main#main.home-page #home-content>.feature[href="#integration"]{min-height:60px!important;padding:10px 12px!important;gap:10px!important;margin-top:0!important;margin-bottom:8px!important;border-radius:16px!important}
html body #main#main.home-page #home-content>.feature[href="#integration"]>svg:first-child{width:27px!important;height:27px!important;min-width:27px!important;border:0!important;padding:0!important}
html body #main#main.home-page #home-content>.feature[href="#integration"] h2{font-size:18px!important;line-height:1.25!important;margin:0!important}
html body #main#main.home-page #home-content>.feature[href="#integration"] p{font-size:12px!important;line-height:1.35!important;margin:3px 0 0!important}
html body #main#main.home-page .message-home-row{min-height:52px!important;margin:0 0 12px!important;padding:8px 12px!important}
html body #main#main.home-page .message-home-row .copy small{display:block!important;font-size:12px!important;line-height:1.35!important;margin:1px 0 0!important}
html body #main#main.home-page .message-home-row .message-badge{position:static!important;display:grid!important;place-items:center!important;min-width:24px;width:auto!important;height:24px;border-radius:12px;background:#d21c35!important;color:#fff!important;font-size:12px!important;font-weight:750;padding:0 6px;margin-left:auto;flex:none}
html body #main#main.home-page .message-home-row>.arrow{position:static!important;flex:none;width:14px;height:14px}
html body #main#main.home-page .home-group{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:auto;gap:6px!important}
html body #main#main.home-page .home-group>.row{min-height:82px!important;padding:6px 9px!important;align-self:stretch!important;align-content:center!important}
html body #main#main.home-page .home-group>.row>svg:first-child{width:23px!important;height:23px!important;min-width:23px!important;stroke-width:1.8;color:var(--brand-blue,var(--user-accent))!important}
html body #main#main.home-page .home-group>.row:is([href="#sac-intervention"],[href="#procedures"],[href="#annonces-radio"] )>svg:first-child{color:var(--brand-red,#d21c35)!important}
html body #main#main.home-page .home-group>.row strong{font-size:16px!important;line-height:1.25!important;min-height:0!important;overflow:visible!important;-webkit-line-clamp:unset!important}
html body #main#main.home-page .home-group>.row small{font-size:12px!important;line-height:1.3!important;overflow:visible!important;-webkit-line-clamp:unset!important}
html body #main#main.home-page .home-group>.ref-control-tile small{color:var(--brand-blue,var(--user-accent))!important;font-weight:650}
.ref-equipment-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:10px 0}
.ref-equipment-nav button{display:flex;align-items:center;gap:8px;text-align:left;min-height:52px;min-width:0;padding:9px 10px;border:1px solid var(--line);border-radius:12px;background:var(--ui-surface);color:var(--ui-ink);font-size:14px;font-weight:650;line-height:1.35;cursor:pointer}
.ref-equipment-nav svg{width:22px;height:22px;flex:none;color:var(--brand-blue,var(--user-accent))}
.ref-equipment-nav button:last-child svg{color:var(--brand-red,#d21c35)}
.ref-equipment-more{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0 10px}
.ref-equipment-more .button{margin:0!important;font-size:13px!important;min-height:44px}
.ref-jump-section{scroll-margin-top:112px}
.ref-source{border:1px solid var(--line);background:var(--ui-surface);color:var(--ui-ink);border-radius:12px;margin:10px 0 12px;font-size:13px}
.ref-source>summary{list-style:none;display:flex;gap:9px;align-items:center;padding:9px 11px;min-height:44px;cursor:pointer}
.ref-source>summary::-webkit-details-marker{display:none}
.ref-source>summary>svg{width:20px;height:20px;color:var(--brand-blue,var(--user-accent));flex:none}
.ref-source>summary>span:nth-child(2){flex:1;min-width:0}
.ref-source strong{display:block;font-size:13px;line-height:1.4;color:var(--ui-ink)}
.ref-source small{display:block;font-size:12px;line-height:1.4;color:var(--ui-muted);margin-top:2px}
.ref-source>div{padding:0 11px 10px}.ref-source p{font-size:13px;color:var(--ui-muted);line-height:1.5}
.ref-control-resume{display:flex;align-items:center;gap:10px;background:var(--ui-surface);border:1px solid var(--line);border-radius:12px;padding:10px 12px;text-decoration:none;margin:10px 0;color:var(--ui-ink);min-height:52px}
.ref-control-resume>svg{width:23px;height:23px;flex:none;color:var(--brand-blue,var(--user-accent))}.ref-control-resume>span{flex:1;min-width:0}.ref-control-resume strong{display:block;font-size:15px;line-height:1.35}.ref-control-resume small{display:block;font-size:12px;line-height:1.45;color:var(--ui-muted);margin-top:3px}
.ref-offline{display:flex;align-items:center;gap:7px;font-size:12px!important;color:var(--ui-muted)!important;padding:6px 9px;margin:0 0 8px;background:var(--soft);border-radius:8px}.ref-offline svg{width:17px;height:17px;flex:none}
.sy-time[data-stale=true]{border-left:3px solid var(--brand-red,#d21c35);padding-left:9px}
html[data-text-size=large] .ref-equipment-nav button{font-size:16px}html[data-text-size=larger] .ref-equipment-nav button{font-size:18px}
html[data-text-size=larger] body #main#main.home-page .home-group>.row strong{font-size:19px!important}html[data-text-size=larger] body #main#main.home-page .home-group>.row small{font-size:15px!important}
@media(max-width:350px){.ref-equipment-nav button{padding:8px;gap:5px;font-size:13px}.ref-equipment-nav svg{width:19px;height:19px}}
html body #main#main.home-page .home-group>.row>.home-bag-visual{stroke:currentColor!important;fill:none!important;filter:none!important;flex:0 0 23px!important}
html body #main#main.home-page #home-content>.feature[href="#integration"]{height:auto!important;max-height:none!important}
html[data-text-size=larger] body #main#main.home-page #home-content>.feature[href="#integration"] h2{font-size:21px!important}
html[data-text-size=larger] body #main#main.home-page #home-content>.feature[href="#integration"] p{font-size:15px!important}
html body #main#main .ref-equipment-guide .lc-intro{min-height:0!important;height:auto!important;padding:12px 14px!important;margin-bottom:10px!important}
html body #main#main .ref-equipment-guide .lc-intro h1{font-size:24px!important;line-height:1.25!important;margin:5px 0!important}
html body #main#main .ref-equipment-guide .lc-intro>p{margin:0!important;font-size:11px!important}
html body #main#main .ref-equipment-guide .lc-intro>span{display:block;font-size:13px!important;line-height:1.4!important}
html body #main#main.home-page .home-group>.row :is(strong,small){overflow-wrap:normal!important;word-break:normal!important;hyphens:none!important}
@media(max-width:380px){html[data-text-size=larger] body #main#main.home-page .home-group{grid-template-columns:1fr!important}.ref-equipment-more{gap:5px}}

/* L'accueil conserve des titres entiers ; seuls les espaces sont resserrés. */
html body #main#main.home-page .home-group{margin:9px 0!important}
html body #main#main.home-page .home-group>h2{margin:5px 0 4px!important}
html body #main#main.home-page .home-group>.row{grid-template-rows:minmax(40px,auto) auto;gap:2px 6px!important}
html body #main#main.home-page .home-group>.row small{margin-top:0!important}
html body #main#main.home-page .message-home-row{margin-bottom:8px!important}

/* La présentation partage la ligne Messages, sans ajouter une grande tuile. */
html body #main#main.home-page .home-information-bar{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:stretch;margin:0 0 8px}
html body #main#main.home-page .home-information-bar .message-home-row{margin:0!important;min-height:52px!important;padding:8px 10px!important;gap:7px!important}
html body #main#main.home-page .home-information-bar .message-home-row>.arrow{display:none}
html body #main#main.home-page .home-information-bar .message-home-row>svg:first-child{width:19px!important;height:19px!important;flex:0 0 19px}
html body #main#main.home-page .home-information-bar .message-home-row .copy{min-width:0}
html body #main#main.home-page .home-information-bar .message-home-row strong{font-size:15px!important;line-height:1.3!important}
html body #main#main.home-page .home-information-bar .message-home-row small{font-size:11px!important;line-height:1.35!important}
html body #main#main.home-page .home-presentation-button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:8px 10px;border:1px solid var(--line);border-radius:var(--ui-radius);background:var(--ui-surface);color:var(--brand-blue);text-decoration:none;font-size:14px;font-weight:700;line-height:1.35;box-sizing:border-box}
.home-presentation-button svg{width:22px;height:22px;flex:0 0 22px;color:var(--brand-red)}
.carnet-presentation{max-width:720px;margin-inline:auto;color:var(--ui-ink)}
.carnet-presentation .topic-category{font-size:11px;color:var(--brand-red);font-weight:750;letter-spacing:.04em;margin:12px 0 4px}
.carnet-presentation h1{font-size:26px;line-height:1.25;margin:4px 0 14px;color:var(--ui-ink)}
.carnet-welcome{display:flex;gap:10px;align-items:flex-start;padding:14px;border:1px solid var(--line);border-left:3px solid var(--brand-red);border-radius:var(--ui-radius);background:var(--ui-surface)}
.carnet-welcome svg{width:26px;height:26px;flex:none;color:var(--brand-blue)}
.carnet-welcome h2{font-size:20px!important;line-height:1.4;margin:0!important;color:var(--ui-ink)!important}
.carnet-presentation-copy{font-size:16px;line-height:1.7;color:var(--ui-ink)}
.carnet-presentation-copy p{margin:16px 0}
.carnet-purpose{padding:12px 14px;background:var(--soft);border-radius:var(--ui-radius);color:var(--ui-ink)}
.carnet-presentation>.button{min-height:44px}
html[data-text-size=larger] body #main#main.home-page .home-information-bar{grid-template-columns:1fr}
html[data-text-size=larger] .carnet-presentation-copy{font-size:19px}

.carnet-presentation-dialog{box-sizing:border-box;width:min(94vw,640px);max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 28px);padding:0;border:1px solid var(--line);border-radius:18px;background:var(--ui-surface);color:var(--ui-ink);box-shadow:0 16px 60px #0005;overflow:hidden}
.carnet-presentation-dialog::backdrop{background:#061426ad}
.presentation-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-bottom:1px solid var(--line)}
.presentation-dialog-heading h2{font-size:19px;line-height:1.3;color:var(--ui-ink);margin:0}
.presentation-dialog-close{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:11px;color:var(--brand-blue);background:var(--soft);font-size:28px;line-height:1;cursor:pointer}
.presentation-startup-scroll{max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 174px);overflow:auto;overscroll-behavior:contain;padding:14px;scrollbar-gutter:stable}
.presentation-startup-scroll .carnet-welcome{padding:10px;gap:8px}
.presentation-startup-scroll .carnet-presentation-copy{font-size:16px;line-height:1.65}
.presentation-dialog-actions{padding:10px 14px;border-top:1px solid var(--line);background:var(--ui-surface)}
.presentation-dialog-actions .button{width:100%;min-height:44px;white-space:normal}
html[data-text-size=larger] .presentation-startup-scroll .carnet-presentation-copy{font-size:19px}

/* Accès direct au parcours, au premier accueil comme en relecture. */
.presentation-dialog-actions,.presentation-page-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.presentation-dialog-actions .button,.presentation-page-actions .button{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:52px;padding:8px 10px;box-sizing:border-box;text-align:center;white-space:normal;font-size:14px;line-height:1.35;text-decoration:none}
.presentation-page-actions{margin:16px 0}
.presentation-page-actions svg{width:21px;height:21px;flex:0 0 21px}
.presentation-startup-scroll{max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 200px)}
html[data-text-size=larger] .presentation-dialog-actions,html[data-text-size=larger] .presentation-page-actions{grid-template-columns:1fr}
html[data-text-size=larger] .presentation-startup-scroll{max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 260px)}
html[data-text-size=larger] .presentation-dialog-actions .button,html[data-text-size=larger] .presentation-page-actions .button{font-size:17px}

/* Le titre Messages garde toujours son mot entier, même avec le compteur. */
html body #main#main.home-page .home-information-bar .message-home-row{gap:5px!important;padding:8px!important}
html body #main#main.home-page .home-information-bar .message-home-row strong{white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;hyphens:none!important}
html body #main#main.home-page .home-information-bar .message-home-row .message-badge{min-width:32px!important;height:32px;border-radius:999px;padding:0 5px!important;margin:0 0 0 auto!important;font-size:17px!important;box-sizing:border-box}
@media(max-width:350px){
 html body #main#main.home-page .home-information-bar .message-home-row{gap:4px!important;padding:8px 6px!important}
 html body #main#main.home-page .home-information-bar .message-home-row>svg:first-child{width:16px!important;height:16px!important;flex:0 0 16px!important}
 html body #main#main.home-page .home-information-bar .message-home-row strong{font-size:14px!important}
}

/* Spécialités : pictogrammes sobres, sans cadres et sans masquer les libellés. */
html body #main .hospital-floor-services .hospital-service-symbols{display:flex;flex-direction:column;gap:5px;flex:0 0 23px;align-items:center;padding-top:1px}
html body #main .hospital-service-symbols svg{width:22px;height:22px;margin:0;color:var(--user-accent,#084acb)}
html body #main .hospital-service-symbols svg[data-service-symbol=heart],html body #main .hospital-service-symbols svg[data-service-symbol=blood],html body #main .hospital-service-symbols svg[data-service-symbol=urgent]{color:#c62b45}
html.theme-dark body #main .hospital-service-symbols svg[data-service-symbol=heart],html.theme-dark body #main .hospital-service-symbols svg[data-service-symbol=blood],html.theme-dark body #main .hospital-service-symbols svg[data-service-symbol=urgent]{color:#ff8699}
html body #main .hospital-floor-services p>span:last-child{min-width:0;flex:1}

/* Localisation indépendante de l’ouverture de la fiche : aucun lien imbriqué. */
html body #main .paris-hospital-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:10px}
.paris-hospital-link{display:flex;align-items:center;gap:8px;min-width:0;color:var(--ink);text-decoration:none}
.paris-hospital-link>div{min-width:0;flex:1}
.paris-hospital-link .paris-hospital-icon{width:25px;flex:0 0 25px;height:30px}
.paris-hospital-link>.arrow{width:14px;height:14px;flex:none}
html body #main .paris-locate{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;align-self:start;min-width:62px;min-height:48px;padding:5px;color:var(--user-accent);background:var(--soft);border:1px solid var(--line);border-radius:10px;text-decoration:none;font-size:12px;font-weight:700;box-sizing:border-box}
.paris-locate svg{width:21px;height:21px}
.paris-detail-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 18px}
.paris-detail-heading h1{min-width:0;flex:1;margin:0}
html body #main .paris-locate-detail{flex:0 0 auto;max-width:155px;padding:9px 10px;font-size:13px;line-height:1.35;min-height:48px}
.paris-locate-detail svg{width:21px;height:21px;flex:none}
@media(max-width:350px){.paris-hospital-link>.arrow{display:none}.paris-detail-heading{gap:8px}html body #main .paris-locate-detail{max-width:126px}}
html[data-text-size=larger] body #main .paris-detail-heading{flex-wrap:wrap}
html[data-text-size=larger] body #main .paris-locate-detail{max-width:none;font-size:16px}

/* Villes : un index compact, recherche persistante et repères prioritaires. */
html body #main#main.cities-indexed>h1{margin-bottom:10px}
html body #main#main.cities-indexed>.city-search{position:sticky;top:calc(6px + env(safe-area-inset-top,0px));z-index:15;margin:8px 0 4px!important;min-height:46px;background:var(--ui-surface,var(--surface))!important;border:1px solid var(--line);box-shadow:0 3px 10px #071c4808}
html body #main#main.cities-indexed .city-search input{font-size:16px!important}
html body #main#main.cities-indexed .results-count{font-size:12px!important;margin:6px 0 8px;color:var(--ui-muted,var(--muted))}
html body #main .city-letter-heading{display:flex;align-items:center;justify-content:space-between;font-size:17px!important;margin:14px 0 5px;padding:5px 9px;background:transparent;border-left:3px solid var(--brand-red,#d21c35);border-radius:0;scroll-margin-top:calc(66px + env(safe-area-inset-top,0px))}
.city-letter-heading small{font-size:11px!important;font-weight:500;letter-spacing:0;color:var(--ui-muted,var(--muted))}
html body #main#main.cities-indexed .city-group-list{border:1px solid var(--line);border-radius:13px;overflow:hidden;background:var(--ui-surface,var(--surface))}
html body #main#main.cities-indexed .city-list-row{margin:0!important;padding:8px 10px!important;min-height:44px!important;clip-path:none!important;background:var(--ui-surface,var(--surface))!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;box-shadow:none!important;gap:9px}
html body #main#main.cities-indexed .city-list-row:last-child{border-bottom:0!important}
html body #main#main.cities-indexed .city-list-row strong{font-size:15px!important;line-height:1.35;overflow-wrap:normal;word-break:normal;hyphens:none}
html body #main#main.cities-indexed .city-list-row>svg:first-child{width:19px;height:21px;color:var(--brand-blue,var(--user-accent))}
html body #main#main.cities-indexed .city-list-row>.arrow{width:13px;height:15px}
html body #main .city-alphabet{border:1px solid var(--line);box-shadow:none;background:var(--ui-surface,var(--surface))}
html body #main .city-alphabet button.active{background:#0b439c!important;color:#fff!important}
.city-source-details{margin:16px 0;border-top:1px solid var(--line);padding-top:8px;color:var(--ui-muted,var(--muted))}
.city-source-details>summary{display:flex;align-items:center;gap:7px;font-size:12px;min-height:44px;cursor:pointer}
.city-source-details>summary>svg{width:17px;height:17px;flex:none}
.city-empty{display:grid;justify-items:center;gap:8px;padding:24px 12px;text-align:center;color:var(--ui-ink,var(--ink))}
.city-empty>svg{width:26px;height:26px;color:var(--user-accent)}.city-empty p{font-size:14px!important;margin:0}
.city-detail-label{font-size:11px!important;font-weight:750;letter-spacing:.08em;color:var(--brand-red,#d21c35)!important;margin:6px 0}
html body #main#main.city-detail-page .city-route-reference{padding:12px;margin:14px 0;background:var(--ui-surface,var(--surface));border-radius:14px}
.city-route-reference h2{display:flex;align-items:center;gap:8px}.city-route-reference h2>svg{width:22px;height:22px;color:var(--user-accent)}
html body #main#main.city-detail-page .city-route-reference .route{padding:0;background:transparent!important;border:0;line-height:1.65;font-size:16px;margin:8px 0 0}
html body #main#main.city-detail-page .city-route-panel h2{font-size:18px;margin:0 0 2px}
html body #main#main.city-detail-page .city-route-origin{font-size:13px!important;margin:0 0 5px}
.city-route-actions{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 5px}
html body #main .city-route-actions .button{font-size:13px;min-height:44px;padding:8px 10px;margin:0;justify-content:center;flex:1 1 130px}
.city-map-details{border-top:1px solid var(--line);margin-top:5px}
.city-map-details>summary{display:flex;align-items:center;gap:8px;min-height:44px;font-size:14px;font-weight:650;cursor:pointer}
.city-map-details>summary>svg{width:19px;height:19px}.city-map-details>summary>.arrow{margin-left:auto;transform:rotate(90deg)}.city-map-details[open]>summary>.arrow{transform:rotate(-90deg)}
html[data-text-size=larger] body #main#main.cities-indexed .city-list-row strong{font-size:19px!important}
html[data-text-size=larger] body #main .city-route-actions .button{font-size:17px}
html[data-text-size=larger] body #main .city-route-reference .route{font-size:20px}

/* Repères routiers : séquence fidèle, routes saillantes et alternatives séparées. */
html body #main#main.city-detail-page .city-road-itinerary{margin-top:5px}
.city-road-steps{list-style:none;padding:0;margin:0;counter-reset:city-road}
.city-road-steps>li{position:relative;display:grid;grid-template-columns:25px minmax(0,1fr);gap:8px;padding:4px 0;counter-increment:city-road;align-items:start}
.city-road-steps>li::before{content:counter(city-road);display:grid;place-items:center;width:25px;height:25px;border:1px solid var(--line);border-radius:50%;font-size:12px;font-weight:750;color:var(--ui-ink,var(--ink));background:var(--soft);z-index:1}
.city-road-steps>li:not(:last-child)::after{content:"";position:absolute;left:12px;top:29px;bottom:-4px;border-left:1px solid var(--line)}
.city-road-copy{display:block;min-width:0;white-space:pre-line;overflow-wrap:break-word;font-size:16px;line-height:1.6;color:var(--ui-ink,var(--ink))}
html body #main#main .city-road-badge{display:inline;padding:1px 5px;border-radius:5px;background:var(--brand-blue-soft,#eaf1ff);color:var(--brand-blue,#084acb);font-weight:750;white-space:nowrap;box-decoration-break:clone;-webkit-box-decoration-break:clone}
html body #main#main .city-road-action{color:var(--ui-ink,var(--ink));font-weight:750}
.city-road-alternative{display:flex;align-items:center;gap:10px;margin:5px 0;font-size:12px;line-height:1.5;font-weight:750;color:var(--brand-red,#d21c35);white-space:pre-line;text-transform:uppercase}
.city-road-alternative::before,.city-road-alternative::after{content:"";height:1px;flex:1;background:var(--line)}
html[data-text-size=large] body #main .city-road-copy{font-size:18px}
html[data-text-size=larger] body #main .city-road-copy{font-size:20px}
@media(prefers-contrast:more){html body #main#main .city-road-badge{outline:1px solid currentColor}}
html body #main#main.city-detail-page :is(.city-route-reference,.city-route-panel)>h2>svg{color:var(--brand-blue,#084acb)!important}

/* Préparation compacte, commandes tactiles conservées et carte ouverte. */
html body #main#main.city-detail-page .city-route-panel{padding:9px 10px;margin:10px 0}
html body #main#main.city-detail-page .city-route-map{height:190px;margin:0 0 5px;border-radius:10px}
html body #main#main.city-detail-page .city-route-panel>.meta{font-size:12px;line-height:1.45;margin:5px 0 0}
