/* ==========================================================================
   DRAY & FILS — Pages communes (Deauville, Honfleur, Villers-sur-Mer)
   S'appuie sur style.css : mêmes coloris, mêmes conduites, mêmes vannes.
   ========================================================================== */

/* ---------- Ouverture ---------- */
.ville-hero { position: relative; z-index: 2; padding: calc(var(--header-h) + clamp(44px, 6vw, 88px)) 0 clamp(64px, 8vw, 112px); }
.ville-hero > .container > * { animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--k, 0) * 0.08s); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 34px; font-size: 13px; color: var(--text-3); }
.crumbs li + li::before { content: "›"; margin-right: 10px; }
.crumbs a { color: var(--text-2); border-bottom: 1px solid var(--line-2); transition: color 0.3s, border-color 0.3s; }
.crumbs a:hover { color: var(--accent); border-color: var(--accent); }
.ville-hero .title { max-width: 16ch; margin: 18px 0 26px; font-size: clamp(40px, 5.4vw, 80px); }
.ville-hero .lead { max-width: 62ch; }
.ville-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; margin-top: 38px; }

/* ---------- Le raccordement : la conduite de l'atelier jusqu'à la commune ---------- */
.route { margin-top: clamp(56px, 7vw, 96px); padding-top: 34px; border-top: 1px solid var(--line); }
.route__line { display: flex; }
.route__line li { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.route__fit { position: relative; z-index: 1; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 1px var(--m3), inset 0 0 0 3px var(--m1), inset 0 0 0 4px var(--m4); }
.route__fit::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--water); animation: port 0.5s var(--ease) both; animation-delay: calc(var(--i) * 0.42s + 0.45s); }
@keyframes port { from { transform: scale(0); } }
.route__pipe { position: absolute; top: 6px; right: 50%; width: 100%; height: 12px; border-radius: 6px; background: var(--metal-v); box-shadow: 0 0 0 1px var(--m3); }
.route__pipe i { position: absolute; inset: 4px 8px; overflow: hidden; border-radius: 2px; background: var(--bg); }
.route__pipe i::after {
  content: ""; position: absolute; inset: 0; transform-origin: 0 50%;
  background: repeating-linear-gradient(90deg, var(--water) 0 16px, var(--water-2) 16px 30px); background-size: 30px 100%;
  animation: fill-x 0.42s linear both, flow-x 1.1s linear infinite; animation-delay: calc(var(--i) * 0.42s), 0s;
}
@keyframes fill-x { from { transform: scaleX(0); } }
@keyframes fill-y { from { transform: scaleY(0); } }
.route__name { margin-top: 14px; padding: 0 4px; font-size: 13.5px; line-height: 1.3; color: var(--text-2); }
.route__name small { display: block; margin-top: 3px; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.route__name a { color: var(--text); border-bottom: 1px dotted var(--water-ink, var(--water)); transition: color 0.3s; }
.route__name a:hover { color: var(--water-ink, var(--water)); }
.route .is-source .route__fit { background: var(--accent); box-shadow: 0 0 0 1px var(--m3), inset 0 0 0 3px var(--m1), inset 0 0 0 7px var(--bg); }
.route .is-source .route__fit::after { display: none; }
.route .is-here .route__fit { width: 30px; height: 30px; margin-top: -3px; }
.route .is-here .route__fit::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; box-shadow: 0 0 0 1px var(--water); animation: pulse 2.6s var(--ease) infinite; animation-delay: calc(var(--i) * 0.42s + 0.9s); }
.route .is-here .route__name { font-family: var(--f-display); font-size: 21px; color: var(--text); }
.route figcaption { margin-top: 30px; font-size: 14px; color: var(--text-3); }
.route figcaption b { font-weight: 600; color: var(--water-ink, var(--water)); }

/* ---------- Sur place : ce qui change dans la commune ---------- */
.ville-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ville-card { padding: clamp(28px, 3.4vw, 46px); background: var(--bg-2); }
.ville-card .orb { margin-bottom: 26px; }
.ville-card h3 { margin-bottom: 12px; font-family: var(--f-display); font-weight: 400; font-size: clamp(22px, 2vw, 27px); line-height: 1.15; }
.ville-card p { color: var(--text-2); }
.ville-card:hover .orb__lever { transform: rotate(90deg); }

/* ---------- Prestations ---------- */
.ville-services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(32px, 5vw, 72px); border-top: 1px solid var(--line); }
.ville-services li { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.ville-services svg { grid-row: span 2; width: 28px; height: 28px; margin-top: 2px; color: var(--accent); }
.ville-services h3 { font-family: var(--f-display); font-weight: 400; font-size: 23px; line-height: 1.2; }
.ville-services p { font-size: 15.5px; color: var(--text-2); }
.ville-more { margin-top: 34px; }

/* Le conseil du plombier */
.ville-tip { display: grid; grid-template-columns: auto 1fr; gap: 26px; margin-top: clamp(56px, 7vw, 88px); padding: clamp(28px, 3.4vw, 46px); border-left: 2px solid var(--water); background: var(--sea); }
.ville-tip .label { margin-bottom: 10px; }
.ville-tip h3 { margin-bottom: 18px; font-family: var(--f-display); font-weight: 400; font-size: clamp(24px, 2.3vw, 32px); line-height: 1.15; }
.ville-tip ol { display: grid; gap: 12px; counter-reset: geste; }
.ville-tip li { position: relative; padding-left: 40px; color: var(--text-2); counter-increment: geste; }
.ville-tip li::before { content: counter(geste, decimal-leading-zero); position: absolute; left: 0; top: 1px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--water-ink, var(--water)); }
.ville-tip p { margin-top: 18px; color: var(--text-2); }

/* ---------- Autour de la commune ---------- */
.ville-around { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.ville-around .title { margin: 18px 0 20px; }
.ville-around p { color: var(--text-2); }
.ville-links { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ville-links a { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; background: var(--bg); font-family: var(--f-display); font-size: clamp(22px, 2vw, 28px); line-height: 1.15; transition: color 0.3s, background-color 0.3s; }
.ville-links a small { display: block; margin-top: 6px; font-family: var(--f-sans); font-size: 13.5px; color: var(--text-3); }
.ville-links a svg { flex: none; width: 22px; height: 22px; color: var(--accent); transition: transform 0.4s var(--ease); }
.ville-links a:hover { color: var(--accent); }
.ville-links a:hover svg { transform: translateX(6px); }

/* ---------- Dernier appel ---------- */
.ville-cta { text-align: center; }
.ville-cta .title { max-width: 18ch; margin: 18px auto 20px; }
.ville-cta p { max-width: 54ch; margin: 0 auto; color: var(--text-2); }
.ville-cta .label { justify-content: center; }
.ville-cta .ville-ctas { justify-content: center; }

/* ---------- Petits écrans : la conduite descend ---------- */
@media (max-width: 979px) {
  .ville-cards, .ville-services, .ville-around { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .route__line { flex-direction: column; }
  .route__line li { flex-direction: row; align-items: center; min-height: 48px; text-align: left; }
  .route__pipe { top: auto; bottom: 50%; right: auto; left: 6px; width: 12px; height: 100%; }
  .route .is-here .route__pipe { left: 9px; }
  .route .is-here .route__fit { margin-top: 0; }
  .route__pipe i { inset: 8px 4px; }
  .route__pipe i::after { transform-origin: 50% 0; background: repeating-linear-gradient(180deg, var(--water) 0 16px, var(--water-2) 16px 30px); background-size: 100% 30px; animation-name: fill-y, flow-y; }
  .route__name { margin: 0 0 0 16px; padding: 0; }
  .route__name small { display: inline; margin: 0 0 0 8px; }
  .ville-tip { grid-template-columns: 1fr; }
  .ville-ctas .btn { width: 100%; }
}
