/* Reference approved 26/09: compact toolbar, full-width pale map, square photos. */
.mode-client .hero-c { padding: 0; }
.mode-client .hb-left { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 24px; align-items: center; max-width: none; margin: 0; padding: 16px 3%; text-align: left; border-top: 1px solid #e4e7eb; border-bottom: 1px solid #e4e7eb; background: #ffffff; }
.mode-client .hb-left .h1 { grid-column: auto; grid-row: auto; font-size: clamp(21px,1.8vw,29px); max-width: none; margin: 0; white-space: nowrap; letter-spacing: -.04em; }
.mode-client .hb-left .hero-sub, .mode-client .hb-left .proof, .mode-client #les-chantiers { display: none; }
.mode-client .hb-left > * { opacity: 1; animation: none; }
.mode-client .hb-left .sfiche { grid-column: auto; grid-row: auto; display: flex; flex-direction: row; gap: 12px; width: 100%; max-width: none; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; border-radius: 0; }
.mode-client .sfiche .sf { padding: 0 12px; border: 1px solid #dce1e6; background: #fff; border-radius: 8px; min-width: 0; min-height: 46px; }
.mode-client .sfiche .sf:first-child { order: 2; flex: 1.6; }
.mode-client .sfiche .sf:nth-child(2) { order: 1; flex: 1; }
.mode-client .sfiche .sf input { min-width: 0; width: 100%; font-size: 14px; padding: 12px 4px; background: transparent; }
.mode-client .sfiche .sbtn { order: 3; flex-shrink: 0; position: relative; width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 999px; margin: 0; font-size: 0; line-height: 0; display: block; }
.mode-client .sfiche .sbtn::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); display: block; width: 21px; height: 21px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2210.6%22%20cy%3D%2210.6%22%20r%3D%226.2%22%2F%3E%3Cpath%20d%3D%22M15.2%2015.2l5.2%205.2%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.75%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2210.6%22%20cy%3D%2210.6%22%20r%3D%226.2%22%2F%3E%3Cpath%20d%3D%22M15.2%2015.2l5.2%205.2%22%2F%3E%3C%2Fsvg%3E") center/contain no-repeat; }
.explorer { width: 100%; margin: 0; color: #2b2a28; }
.explorer-views { display: flex; align-self: center; padding: 0; border: 1px solid #dce1e6; border-radius: 10px; background: #ffffff; }
.explorer-views button { font: inherit; cursor: pointer; border: 0; background: transparent; color: #2b2a28; border-radius: 8px; padding: 10px 20px; min-height: 44px; }
.explorer-views button[aria-pressed="true"] { background: #b5532a; color: #fff; }
.explorer button { font: inherit; cursor: pointer; }
.explorer button:focus-visible, .carte-marker:focus-visible { outline: 3px solid #b5532a; outline-offset: 4px; }
.carte-panel { position: relative; overflow: hidden; isolation: isolate; }
#carte-canvas { height: max(240px,calc(100svh - var(--explorer-top,164px))); min-height: 0; background: #f7f8fa; }
#carte-canvas .leaflet-control-attribution { font: 10px/1.4 Figtree,sans-serif; background: #fffffff0; }
#carte-canvas .leaflet-control-zoom { border: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 3px 16px #2b2a2818; margin: 18px; }
#carte-canvas .leaflet-control-zoom a { width: 44px; height: 44px; line-height: 44px; color: #2b2a28; background: #ffffff; }
.carte-chablais { position: absolute; z-index: 500; top: 18px; left: 3%; background: #ffffff; border: 1px solid #ffffff; padding: 12px 17px; min-height: 44px; border-radius: 12px; color: #2b2a28; font-weight: 600 !important; box-shadow: 0 3px 16px #2b2a2810; }
.carte-marker { border: 0; background: transparent; }
.carte-thumb { display: block; width: var(--thumb-size,48px); height: var(--thumb-size,48px); box-sizing: border-box; border: 3px solid #ffffff; border-radius: 8px; background: #edf2f5; box-shadow: 0 2px 6px #172b4d24; transition: box-shadow 180ms ease, outline-color 180ms ease; position: relative; }
#carte-canvas .carte-thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100% !important; max-height: 100% !important; object-fit: cover; border-radius: 4px; display: block; }
.carte-sans-photo { display: grid; place-content: center; text-align: center; height: 100%; font: 600 12px/1.4 Figtree,sans-serif; color: #5f6c7b; }
.carte-thumb [hidden], .carte-card-photo [hidden] { display: none; }
.carte-marker[aria-expanded="true"] .carte-thumb { outline: 3px solid #b5532a; outline-offset: 1px; }
.carte-city { display: block; width: max-content; max-width: 148px; position: absolute; left: 0; top: 72px; margin-top: 0; padding: 3px 6px; border-radius: 999px; background: #ffffff; box-shadow: 0 2px 8px #172b4d14; text-align: center; color: #2b2a28; font: 600 11px/1.2 Figtree,sans-serif; pointer-events: none; }
.carte-count { position: absolute; right: -8px; top: -10px; border: 3px solid #ffffff; border-radius: 50%; min-width: 24px; height: 24px; display: grid; place-items: center; padding: 0 6px; background: #2b2a28; color: white; font: 700 13px Figtree,sans-serif; box-shadow: 0 1px 5px #172b4d18; }
.carte-status { position: absolute; z-index: 500; left: 3%; bottom: 10px; max-width: calc(100% - 250px); padding: 5px 9px; font-size: 12px; color: #626b75; background: #fffffff0; border-radius: 6px; }
.carte-selection { position: absolute; z-index: 600; left: 3%; bottom: 48px; width: min(710px,calc(100% - 6%)); max-height: 65%; overflow: auto; padding: 20px; border-radius: 12px; border: 1px solid #e4e7eb; background: #ffffff; box-shadow: 0 12px 40px #172b4d1c; }
.carte-selection header { display: flex; align-items: start; gap: 12px; justify-content: space-between; margin-bottom: 0; }
.carte-selection h2 { font-size: 23px; line-height: 1.25; margin: 0; }
#carte-close { border: 0; background: none; color: #6b6e78; width: 44px; height: 44px; flex-shrink: 0; font-size: 30px; line-height: 1; }
.carte-selection-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 14px; margin-top: 12px; }
.carte-selection .carte-card { display: block; min-width: 0; background: #ffffff; border: 1px solid #e4e7eb; border-radius: 8px; overflow: hidden; text-decoration: none; color: #2b2a28; box-shadow: none; }
.carte-card-photo { height: 160px; min-height: 0; overflow: hidden; grid-template-rows: minmax(0,1fr); display: grid; place-items: center; background: #edf2f5; color: #5f6c7b; }
.carte-card-photo img { display: block; min-width: 0; min-height: 0; width: 100%; height: 100%; object-fit: cover; }
.carte-card-body { padding: 12px 14px; }
.carte-card-body h3 { font-size: 17px; line-height: 1.3; margin: 0 0 6px; }
.carte-card-body p { font-size: 14px; color: #686a76; margin: 5px 0; line-height: 1.3; }
.carte-card-signed span { color: #5a7265; margin-right: 5px; }
.carte-card-link { display: block; margin-top: 13px; color: #b5532a; font-size: 15px; font-weight: 600; }
.carte-selection-note { font-size: 13px; margin: 2px 0 0; color: #686a76; }
.explorer[data-view="carte"] + #results { display: none; }
.carte-panel[hidden], .carte-selection[hidden], .mode-client #results[hidden] { display: none; }
@media (max-width: 1050px) {
  .mode-client .hb-left { grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 12px 20px; }
  .mode-client .hb-left .sfiche { grid-row: 2; grid-column: 1/-1; }
  .mode-client .hb-left .h1 { font-size: 25px; }
}
@media (max-width: 640px) {
  .mode-client .hb-left { padding: 12px; gap: 10px; }
  .mode-client .hb-left .h1 { font-size: 20px; white-space: normal; }
  .mode-client .hb-left .sfiche { gap: 6px; }
  .mode-client .sfiche .sf { padding: 0 6px; }
  .mode-client .sfiche .sf input { font-size: 12px; }
  .mode-client .sfiche .sf-i { display: none; }
  .mode-client .sfiche .sf:first-child { flex: 1.2; }
  .mode-client .sfiche .sbtn { width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 0; }
  .explorer-views button { padding: 8px 12px; font-size: 13px; }
  .carte-chablais { top: 12px; left: 12px; font-size: 13px !important; padding: 10px 12px; }
  .carte-selection { left: 0; bottom: 35px; width: 100%; border-radius: 18px 18px 0 0; max-height: 72%; padding: 16px; }
  .carte-selection h2 { font-size: 19px; }
  .carte-selection-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .carte-selection .carte-card { flex: 0 0 240px; scroll-snap-align: start; }
  .carte-card-photo { height: 145px; }
  .carte-status { left: 8px; bottom: 24px; max-width: calc(100% - 16px); font-size: 10px; }
}

@media (hover: hover) {
  .carte-marker:hover .carte-thumb { outline: 2px solid #b5532a; outline-offset: 1px; }
  .carte-card:hover { border-color: #b5532a; }
  .carte-marker:hover .carte-thumb { box-shadow: 0 4px 12px #172b4d30; }
  #carte-canvas .leaflet-control-zoom a:hover, .carte-chablais:hover { background: #ffecd9; }
}

/* More energy through contrast and interaction; marker geometry stays fixed. */
.mode-client .hb-left .h1 { color: #2b2a28; }
.mode-client .sfiche .sf:focus-within { border-color: #b5532a; box-shadow: 0 0 0 3px #b5532a14; }
.explorer-views { padding: 3px; border-radius: 999px; background: #f0f2f5; border-color: transparent; }
.explorer-views button { border-radius: 999px; }
.explorer-views button[aria-pressed="true"] { box-shadow: 0 3px 8px #b5532a26; }
.carte-chablais { display: flex; align-items: center; gap: 8px; }
#carte-visible { color: #4b5563; background: #f0f2f5; padding: 4px 8px; border-radius: 999px; font-size: 12px; }
.carte-marker[aria-expanded="true"] .carte-city { background: #b5532a; color: #fff; }
.carte-sans-photo { background: #edf2f5; border-radius: 4px; }
.carte-card-link { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid #e4e7eb; }
.carte-card-link span { display: grid; place-items: center; width: 28px; height: 28px; background: #ffecd9; border-radius: 50%; }
@media (prefers-reduced-motion: reduce) {
  .carte-thumb { transition: none; }
}

.carte-sans-photo svg { width: min(30px,calc(var(--thumb-size,48px) - 12px)); height: auto; }
.carte-caption-hidden .carte-city { visibility: hidden; }
.carte-caption-hidden:hover .carte-city, .carte-caption-hidden:focus-visible .carte-city { visibility: visible; top: calc(100% + 8px); }
.carte-marker:focus-visible, .carte-marker:hover { z-index: 1000 !important; }

.carte-marker::before { content: ""; position: absolute; width: max(100%,44px); height: max(100%,44px); left: 50%; top: 50%; transform: translate(-50%,-50%); }


.carte-sans-photo svg { width: 26px !important; height: 26px !important; max-width: 100%; }

/* Keep one project compact; multiple projects retain the side-by-side grid. */
.carte-selection { box-sizing: border-box; }
.carte-selection:has(.carte-card:only-child) { width: min(340px,calc(100% - 6%)); }
@media (max-width: 640px) {
  .carte-selection:has(.carte-card:only-child) { width: 100%; }
}
