/* Pages services et villes */

/* Hero de page */
.phero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: calc(var(--header-h) + clamp(28px, 4vw, 48px)) 0 clamp(64px, 8vw, 110px);
  background:
    radial-gradient(ellipse 70% 60% at 80% 120%, rgba(227, 22, 27, .36), transparent 65%),
    radial-gradient(ellipse 50% 45% at 10% 115%, rgba(255, 74, 28, .2), transparent 70%),
    var(--bg);
}
.phero__fire { height: 62%; bottom: -22%; }
.phero__inner { position: relative; z-index: 2; }
.crumbs { margin-bottom: clamp(28px, 4vw, 44px); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; list-style: none; font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; color: var(--muted-2); }
.crumbs li { display: inline-flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: "/"; color: rgba(255, 255, 255, .25); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs [aria-current] { color: #ffb08a; }
.phero__grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(32px, 5vw, 72px); align-items: end; }
.phero .hero__kicker { margin-bottom: 22px; }
.phero__title {
  font-size: clamp(2.4rem, 5.4vw, 5.1rem); line-height: .96; letter-spacing: -.035em;
  font-stretch: 114%; font-weight: 820; text-wrap: balance;
  animation: riseClip 1.1s var(--ease) both .12s;
}
.phero .hero__lead { margin: 24px 0 32px; }
.facts { display: grid; gap: 10px; margin: 0; animation: rise 1s var(--ease) both .45s; }
.facts > div {
  display: flex; flex-direction: column-reverse; gap: 6px;
  padding: 18px 22px; border-radius: 18px;
  background: rgba(14, 14, 17, .7); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.facts dt { font-family: var(--mono); font-size: .7188rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.facts__v {
  font-size: clamp(1.9rem, 3vw, 2.6rem); font-stretch: 122%; font-weight: 850; line-height: 1; letter-spacing: -.035em;
  background: var(--fire); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.facts small { font-family: var(--mono); font-size: .8125rem; color: #e2dcd5; }

/* Grilles de cartes */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc, .need {
  display: flex; flex-direction: column; padding: 26px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  transition: transform .5s var(--ease), border-color .3s;
}
.svc:hover, .need:hover { transform: translateY(-4px); border-color: var(--line-2); }
.svc__top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 22px; }
.svc__title { font-size: 1.2rem; font-stretch: 108%; font-weight: 720; letter-spacing: -.015em; line-height: 1.2; margin-bottom: 10px; }
.svc p, .need p { margin: 0; color: var(--muted); font-size: .9688rem; line-height: 1.55; }
.needs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.need { padding: clamp(26px, 3vw, 36px); }
.need__n {
  display: block; margin-bottom: 18px; font-size: 2.6rem; font-stretch: 125%; font-weight: 850; line-height: .9; letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 1.2px rgba(255, 122, 77, .7);
}

/* Détail */
.detail .section__intro { margin-bottom: 32px; }
.detail > .h2 { max-width: 900px; }
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 32px; }
.level { padding: 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.level__k { display: block; margin-bottom: 10px; font-size: 1.15rem; font-stretch: 112%; font-weight: 780; letter-spacing: -.02em; color: #fff; }
.level p { margin: 0; color: var(--muted); font-size: .9375rem; }
.level strong { color: #fff; }

.table-wrap { overflow-x: auto; border-radius: 22px; border: 1px solid var(--line-2); background: var(--card); -webkit-overflow-scrolling: touch; }
.fire-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: .9688rem; }
.fire-table th, .fire-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.fire-table thead th { font-family: var(--mono); font-size: .7188rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, .02); }
.fire-table tbody tr:last-child th, .fire-table tbody tr:last-child td { border-bottom: 0; }
.fire-table tbody tr { transition: background-color .2s; }
.fire-table tbody tr:hover { background: rgba(255, 74, 28, .06); }
.fire-table td { color: #d8d2cb; }
.fire-table td:nth-child(3) { color: #fff; font-weight: 600; }
.cls {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--fire-btn); color: #fff; font-stretch: 125%; font-weight: 850; font-size: 1.1rem;
  box-shadow: 0 8px 24px -10px rgba(255, 60, 28, .8);
}
.cls--elec { background: linear-gradient(135deg, #2a2a30, #17171b); border: 1px solid var(--line-2); box-shadow: none; }

/* Encadré réglementation */
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.callout {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: clamp(20px, 4vw, 48px); align-items: center;
  padding: clamp(28px, 4vw, 48px); border-radius: 28px;
  background: linear-gradient(100deg, #6e070c 0%, #b30f17 45%, #e3261b 80%, #ff5a1c 100%);
}
.callout::after {
  content: ""; position: absolute; inset: -40%; z-index: 0; opacity: .45; pointer-events: none;
  background: radial-gradient(circle at 25% 30%, rgba(255, 181, 71, .35), transparent 30%), radial-gradient(circle at 80% 70%, rgba(255, 74, 28, .5), transparent 35%);
  animation: heat 14s ease-in-out infinite alternate;
}
.callout > * { position: relative; z-index: 1; }
.callout__ref {
  margin: 0; font-stretch: 125%; font-weight: 900; font-size: clamp(2rem, 4.6vw, 4rem); line-height: .86; letter-spacing: -.04em; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .6); max-width: 5.5em; overflow-wrap: anywhere;
}
.callout .label { color: rgba(255, 255, 255, .85); }
.callout .label span { background: rgba(0, 0, 0, .2); color: #fff; border-color: rgba(255, 255, 255, .3); }
.callout__text { margin: 0; color: rgba(255, 255, 255, .92); max-width: 52em; }
.callout__text strong { color: #fff; }

/* Liens services et villes */
.svc-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.svc-link {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line); text-decoration: none; color: #fff; font-weight: 650;
  transition: transform .4s var(--ease), border-color .3s;
}
.svc-link:hover { transform: translateY(-3px); border-color: var(--line-2); }
.svc-link__ico { width: 42px; height: 42px; padding: 10px; flex: none; border-radius: 12px; color: #ff7a4d; background: rgba(255, 74, 28, .1); border: 1px solid rgba(255, 74, 28, .22); }
.svc-link__arrow { margin-left: auto; color: var(--flame); transition: transform .35s var(--ease); }
.svc-link:hover .svc-link__arrow { transform: translateX(4px); }
.svc-pole { display: flex; align-items: center; gap: 10px; margin: 32px 0 14px; font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.svc-pole:first-of-type { margin-top: 0; }
.svc-pole .ico { color: #ff7a4d; }

.zones-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: clamp(32px, 5vw, 56px); padding-top: 28px; border-top: 1px solid var(--line); }
.section--tight .zones-strip { margin-top: 0; padding-top: 0; border-top: 0; }
.zones-strip p { margin: 0; font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chip-links { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03);
  font-size: .9063rem; color: #fff; text-decoration: none; transition: border-color .2s, background-color .2s;
}
.chip-link:hover { border-color: var(--flame); background: rgba(227, 22, 27, .14); }
.chip-link--ghost { color: var(--muted); border-style: dashed; }

/* Radar mini (pages villes) */
.towns--single { grid-template-columns: 1fr; }
.radar--mini { max-width: 560px; margin-inline: auto; width: 100%; }
.radar__towns g { opacity: .55; }
.radar__towns g.is-on { opacity: 1; }
.radar__towns g.is-on circle { fill: #ffb547; filter: drop-shadow(0 0 8px rgba(255, 181, 71, .9)); }
.radar__towns g.is-on text { fill: #fff; font-weight: 500; font-size: 19px; }
.radar__link { stroke: #ff7a4d; stroke-width: 2; stroke-dasharray: 6 6; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.radar__ping--city { fill: none; stroke: #ffb547; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ping 2.4s var(--ease) infinite; }

/* Responsive */
@media (max-width: 980px) {
  .phero__grid { grid-template-columns: 1fr; align-items: start; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .callout { grid-template-columns: 1fr; }
  .callout__ref { display: none; }
  .callout .btn { justify-self: start; }
}
@media (max-width: 640px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div { flex-direction: row-reverse; justify-content: space-between; align-items: center; padding: 14px 18px; }
  .facts__v { font-size: 1.6rem; }
  .svc-grid, .needs-grid { grid-template-columns: 1fr; }
  .phero .hero__ctas .btn { width: 100%; }
}

/* Photo du hero de page */
.phero__grid--photo { grid-template-columns: 1.12fr .88fr; align-items: center; }
.phero__grid--photo .facts { grid-template-columns: repeat(3, 1fr); margin-top: 30px; animation-delay: .6s; }
.phero__grid--photo .facts > div { padding: 14px 16px; }
.phero__grid--photo .facts__v { font-size: clamp(1.5rem, 2.2vw, 2rem); }
.phero__photo {
  margin: 0; position: relative; overflow: hidden; border-radius: 28px; aspect-ratio: 5 / 6;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 50px 120px -40px rgba(255, 60, 28, .55);
  animation: rise 1.2s var(--ease) both .3s;
}
.phero__photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); animation: slowZoom 18s ease-in-out infinite alternate; }
.phero__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 7, 8, 0) 55%, rgba(7, 7, 8, .7) 100%), linear-gradient(0deg, rgba(255, 74, 28, .14), transparent 40%); }
@media (max-width: 980px) {
  .phero__grid--photo { grid-template-columns: 1fr; }
  .phero__photo { aspect-ratio: 16 / 10; max-width: 640px; }
}
@media (max-width: 640px) {
  .phero__grid--photo .facts { grid-template-columns: 1fr; }
}
/* Cadrages spécifiques */
.phero__photo img[src*="formation"] { object-position: 76% 50%; }
.phero__photo img[src*="interphone"] { object-position: 70% 50%; }
.phero__photo img[src*="camera"] { object-position: 72% 40%; }
.phero__photo img[src*="cuisine"] { object-position: 60% 50%; }

/* V3 : cadrages par clé de photo (fonctionne aussi avec les photos envoyées depuis l'admin) */
.phero__photo.is-formation img { object-position: 76% 50%; }
.phero__photo.is-interphone img { object-position: 70% 50%; }
.phero__photo.is-camera img { object-position: 72% 40%; }
.phero__photo.is-cuisine img { object-position: 60% 50%; }
.phero__photo.is-extincteur img { object-position: 60% 50%; }
.has-notice .phero { padding-top: calc(var(--header-h) + 34px + clamp(28px, 4vw, 48px)); }

/* Page Stéphane */
.phero--about { padding-bottom: 0; }
.about-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 56px); align-items: end; }
.about-hero .phero__copy { padding-bottom: clamp(64px, 8vw, 110px); }
.about-hero__role { margin: 12px 0 0; font-family: var(--mono); font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: #ffb08a; }
.hero__person--about { height: min(76vh, 720px); min-height: 460px; }
.bio { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.bio__text p { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.65; color: #dcd6cf; }
.bio__text p:first-child::first-letter { font-size: 3.2em; float: left; line-height: .9; margin: 6px 10px 0 0; font-stretch: 125%; font-weight: 850; color: var(--flame); }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.comp { display: flex; flex-direction: column; padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); transition: transform .5s var(--ease), border-color .3s; }
.comp:hover { transform: translateY(-4px); border-color: var(--line-2); }
.comp__n { display: block; margin-bottom: 16px; font-size: 2.2rem; font-stretch: 125%; font-weight: 850; line-height: .9; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1.2px rgba(255, 122, 77, .7); }
.comp p { margin: 0; color: var(--muted); font-size: .9688rem; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.cert { display: flex; gap: 18px; align-items: flex-start; padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line-2); }
.cert__badge { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 16px; background: var(--fire-btn); color: #fff; box-shadow: 0 10px 30px -12px rgba(255, 60, 28, .8); }
.cert__badge .ico { width: 28px; height: 28px; }
.cert__img { flex: none; width: 96px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); }
.cert__img img { width: 100%; height: 96px; object-fit: cover; }
.cert__year { display: inline-block; margin-bottom: 6px; padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(255, 74, 28, .35); font-family: var(--mono); font-size: .75rem; color: #ff7a4d; }
.cert__title { font-size: 1.15rem; font-stretch: 106%; font-weight: 720; line-height: 1.25; margin-bottom: 4px; }
.cert__org { margin: 0; color: #e2dcd5; font-size: .9375rem; }
.cert__note { margin: 6px 0 0; color: var(--muted); font-size: .9063rem; }
.pledges--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) {
  .about-hero, .bio { grid-template-columns: 1fr; }
  .about-hero .phero__copy { padding-bottom: 0; }
  .hero__person--about { height: min(70vh, 560px); min-height: 380px; }
  .pledges--4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .pledges--4 { grid-template-columns: 1fr; }
  .cert { flex-direction: column; }
}
/* Pages secondaires : mentions légales, 404 */
.legal { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 96px)); padding-bottom: clamp(64px, 9vw, 120px); max-width: 860px; }
.legal .h2 { margin-bottom: 14px; }
.legal__updated { font-family: var(--mono); font-size: .8125rem; color: var(--muted-2); margin-bottom: 48px; }
.legal section { padding: 28px 0; border-top: 1px solid var(--line); }
.legal h2 { font-size: 1.35rem; font-stretch: 110%; font-weight: 750; letter-spacing: -.015em; margin-bottom: 14px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); font-weight: 650; }
.legal a { color: #fff; text-decoration-color: var(--flame); text-underline-offset: 3px; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; display: grid; gap: 8px; }
.legal-back { margin-left: auto; }
.footer--slim { padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer--slim .footer__legal { padding-top: 0; }

.notfound {
  min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center;
  padding: calc(var(--header-h) + 40px) var(--gutter) 60px; position: relative; overflow: hidden; isolation: isolate;
}
.notfound::before {
  content: ""; position: absolute; z-index: -1; left: -10%; right: -10%; bottom: -30%; height: 70%;
  background: radial-gradient(ellipse at 50% 100%, rgba(227, 22, 27, .45), rgba(255, 74, 28, .15) 40%, transparent 70%);
  filter: blur(40px); animation: flicker 3.5s ease-in-out infinite alternate;
}
.notfound__code {
  margin: 0; font-size: clamp(7rem, 26vw, 18rem); font-stretch: 125%; font-weight: 900; line-height: .85; letter-spacing: -.06em;
  background: var(--fire); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.notfound p { color: var(--muted); margin: 18px auto 32px; max-width: 30em; }
.notfound .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* V4 : légende des vraies photos dans le hero des pages */
.phero__cap {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  padding: 10px 14px; border-radius: 14px; background: rgba(7, 7, 8, .68); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: .8125rem; line-height: 1.4; color: #f3eee9;
}
.phero__cap-k { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: #ffb08a; }
.phero__cap-k::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--flame); box-shadow: 0 0 10px var(--flame); }
.phero__photo.is-normandin img { object-position: 44% 50%; }
.phero__photo.is-eclairage img { object-position: 50% 35%; }
.phero__photo.is-sport img { object-position: 50% 45%; }
