/* ==========================================================================
   Urgence Repair — Pages de réparation, pages modèles, atelier, pages légales
   (chargé uniquement sur les pages intérieures, pas sur l'accueil)
   ========================================================================== */

/* ---------- En-tête de page ---------- */
.phero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + clamp(24px, 4vw, 44px)) 0 clamp(56px, 8vw, 96px);
  background: var(--frost);
}
.phero__glow {
  position: absolute; right: -18%; top: -38%;
  width: min(920px, 120vw); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--glow-rgb), .2), rgba(var(--glow-rgb), .06) 55%, rgba(var(--glow-rgb), 0));
  pointer-events: none;
}
.phero .container { position: relative; }
.phero__pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.phero__kicker {
  margin-top: 26px;
  color: var(--accent-text);
  font-size: clamp(15px, 1.4vw, 18px); font-weight: 600; letter-spacing: -0.012em;
}
.phero__title {
  margin-top: 10px;
  max-width: 15em;
  font-family: var(--font-display);
  font-size: clamp(38px, 6.2vw, 80px);
  line-height: 1.04; font-weight: 600; letter-spacing: -0.04em;
  text-wrap: balance;
}
.phero__lead {
  margin-top: 22px; max-width: 740px;
  color: var(--smoke);
  font-size: clamp(18px, 1.8vw, 22px); line-height: 1.45; font-weight: 300; letter-spacing: -0.012em;
  text-wrap: pretty;
}
.phero__lead p + p { margin-top: 12px; }
.phero__lead a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.phero__lead strong { font-weight: 600; color: var(--carbon); }
.phero__ctas { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.phero__facts { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--smoke); font-size: 15px; }
.phero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.phero__facts svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent-glow); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* entrée douce, sans jouer sur l'opacité (le titre s'affiche immédiatement) */
.phero__kicker, .phero__title, .phero__lead, .phero__ctas { animation: pheroIn 1s var(--ease-out) both; }
.phero__title { animation-delay: .04s; }
.phero__lead { animation-delay: .08s; }
.phero__ctas { animation-delay: .12s; }
@keyframes pheroIn { from { transform: translateY(18px); } }
@media (max-width: 600px) {
  .phero__ctas .btn { flex: 1 1 100%; }
}

/* ---------- Sections intérieures ---------- */
.psec { position: relative; padding-block: clamp(72px, 9vw, 128px); }
.psec .section-head { margin-bottom: clamp(32px, 4vw, 56px); }
.psec .h2 { font-size: clamp(32px, 4.4vw, 56px); }
.psec .lead { font-size: clamp(18px, 1.7vw, 21px); }

/* Cartes (pannes, services…) */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.pcard {
  display: flex; flex-direction: column;
  padding: 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--frost);
  transition: border-color .4s ease, background-color .4s ease, transform .6s var(--ease-out);
}
.section--frost .pcard { background: var(--white); }
.pcard:hover { border-color: rgba(var(--glow-rgb), .45); background: var(--ice); }
.pcard__num {
  display: grid; place-items: center;
  width: 30px; height: 30px; margin-bottom: 18px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), .1); color: var(--accent-text);
  font-size: 13px; font-weight: 600;
}
.pcard h3 { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; }
.pcard p { margin-top: 8px; color: var(--ash); font-size: 15px; line-height: 1.5; }
.pcard .link { margin-top: auto; padding-top: 14px; align-self: flex-start; font-size: 15px; }

/* Texte courant */
.prose { max-width: 760px; color: var(--smoke); font-size: 17px; line-height: 1.65; }
.prose > * + * { margin-top: 16px; }
.prose h3 { margin-top: 32px; color: var(--carbon); font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--carbon); font-weight: 600; }
.callout {
  padding: 18px 22px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--ice);
  color: var(--smoke);
}
.section--white .callout { background: var(--ice); }

/* Deux colonnes : texte + encadré */
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.aside-card {
  position: sticky; top: calc(var(--nav-h) + 24px);
  padding: 28px;
  border-radius: var(--radius);
  background: var(--frost);
}
.section--frost .aside-card { background: var(--white); }
.aside-card h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.aside-card ul { margin-top: 14px; display: grid; gap: 10px; color: var(--smoke); font-size: 15px; line-height: 1.45; }
.aside-card li { display: flex; gap: 10px; }
.aside-card li::before {
  content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), .12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5' fill='none' stroke='%23b21a19' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.aside-card .btn { margin-top: 20px; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .aside-card { position: static; }
}

/* Délais, garantie, devis */
.facts3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fact { padding: 28px; border-radius: var(--radius); background: var(--frost); }
.section--frost .fact { background: var(--white); }
.fact__icon {
  display: grid; place-items: center;
  width: 42px; height: 42px; margin-bottom: 18px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), .1); color: var(--accent);
}
.fact__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fact h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.fact p { margin-top: 8px; color: var(--smoke); font-size: 15px; line-height: 1.55; }
.fact a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 860px) { .facts3 { grid-template-columns: 1fr; } }

/* ---------- Tableaux de prix (remplis depuis data/prices.js) ---------- */
.ptable-wrap { border-radius: var(--radius); overflow: hidden; background: var(--frost); }
.section--frost .ptable-wrap { background: var(--white); }
.ptable { width: 100%; border-collapse: collapse; font-size: 15px; }
.ptable caption { padding: 18px 22px 0; color: var(--ash); font-size: 13px; text-align: left; caption-side: bottom; padding-bottom: 18px; }
.ptable th, .ptable td { padding: 14px 22px; text-align: left; vertical-align: middle; }
.ptable thead th { color: var(--ash); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--hairline); }
.ptable tbody tr + tr td, .ptable tbody tr + tr th { border-top: 1px solid var(--hairline); }
.ptable tbody th { font-weight: 600; color: var(--carbon); }
.ptable tbody th a { color: var(--carbon); text-decoration: underline; text-decoration-color: var(--hairline); text-underline-offset: 3px; }
.ptable tbody th a:hover { color: var(--accent-text); text-decoration-color: currentColor; }
.ptable__price { font-weight: 600; color: var(--carbon); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ptable__price.is-quote { font-weight: 400; color: var(--ash); }
.ptable__time { color: var(--ash); }
.ptable__acts { text-align: right; white-space: nowrap; }
.ptable__acts .btn + .btn { margin-left: 6px; }
.ptable tbody tr { transition: background-color .3s; }
.ptable tbody tr:hover { background: rgba(var(--glow-rgb), .05); }
.ptable--no-time .ptable__time { display: none; }
@media (max-width: 760px) {
  .ptable thead { display: none; }
  .ptable, .ptable tbody, .ptable tr, .ptable th, .ptable td { display: block; width: 100%; }
  .ptable { display: flex; flex-direction: column; }
  .ptable caption { display: block; order: 2; padding: 14px 18px 18px; border-top: 1px solid var(--hairline); }
  .ptable tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 18px; }
  .ptable tbody tr + tr { border-top: 1px solid var(--hairline); }
  .ptable tbody tr + tr td, .ptable tbody tr + tr th { border-top: 0; }
  .ptable th, .ptable td { padding: 0; }
  .ptable__price { text-align: right; }
  .ptable__time { grid-column: 1 / -1; font-size: 14px; }
  .ptable__acts { grid-column: 1 / -1; margin-top: 8px; text-align: left; white-space: normal; display: flex; flex-wrap: wrap; gap: 8px; }
  .ptable__acts .btn + .btn { margin-left: 0; }
  /* tableau multi-modèles : libellé de colonne devant chaque prix */
  .ptable--models tbody tr { grid-template-columns: 1fr 1fr; }
  .ptable--models tbody th { grid-column: 1 / -1; margin-bottom: 6px; font-size: 17px; }
  .ptable--models td[data-label]::before { content: attr(data-label); display: block; color: var(--ash); font-size: 12px; font-weight: 400; }
  .ptable--models .ptable__price { text-align: left; }
}
.ptable-note { margin-top: 14px; color: var(--ash); font-size: 13px; line-height: 1.5; }

/* Liens vers les modèles (pastilles) */
.chiplinks { display: flex; flex-wrap: wrap; gap: 10px; }
.chiplinks a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 9px 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--carbon); font-size: 15px;
  transition: border-color .3s, color .3s, transform .5s var(--ease-spring);
}
.chiplinks a:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-2px); }
.chiplinks svg { width: 11px; height: 11px; }

/* Autres réparations (maillage interne) */
.links3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.links3 a {
  display: flex; flex-direction: column; gap: 6px;
  height: 100%;
  padding: 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--carbon);
  transition: border-color .3s, background-color .3s, transform .5s var(--ease-spring);
}
.links3 a:hover { border-color: rgba(var(--glow-rgb), .45); background: var(--ice); transform: translateY(-3px); }
.links3 b { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.016em; }
.links3 b svg { width: 12px; height: 12px; flex: none; color: var(--accent-text); transition: transform .45s var(--ease-out); }
.links3 a:hover b svg { transform: translateX(3px); }
.links3 span { color: var(--ash); font-size: 14px; line-height: 1.45; }

/* ---------- Photos de l'atelier ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.photo { margin: 0; }
.photo img, .photo .ph { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); object-fit: cover; background: var(--pebble); }
.photo figcaption { margin-top: 10px; color: var(--ash); font-size: 14px; line-height: 1.45; }
/* emplacement de photo : visible tant que la vraie photo n'a pas été ajoutée */
.ph {
  display: grid; place-content: center; justify-items: center; gap: 10px;
  padding: 20px;
  border: 1.5px dashed var(--mist);
  background: repeating-linear-gradient(135deg, var(--frost) 0 14px, #ececf0 14px 28px);
  color: var(--ash);
  font-size: 14px; font-weight: 600; text-align: center;
}
.ph svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ph small { display: block; font-weight: 400; font-size: 12px; }

/* ---------- Pages légales ---------- */
.legal { padding-top: calc(var(--nav-h) + clamp(32px, 6vw, 72px)); padding-bottom: clamp(72px, 10vw, 120px); }
.legal .crumbs { margin-bottom: 28px; }
.legal__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 68px);
  hyphens: auto;
  line-height: 1.04; font-weight: 600; letter-spacing: -0.035em;
}
.legal__lead {
  max-width: 720px; margin-top: 20px;
  color: var(--smoke);
  font-size: clamp(18px, 2vw, 22px); line-height: 1.4; font-weight: 300;
}
.legal__summary { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.legal__point { padding: 22px; border-radius: var(--radius); background: var(--white); }
.legal a[href^="tel:"], .prose a[href^="tel:"], .faq__a a[href^="tel:"] { white-space: nowrap; }
.legal__icon {
  width: 38px; height: 38px; margin-bottom: 14px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), .1); color: var(--accent);
}
.legal__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.legal__point b { display: block; margin-bottom: 4px; font-size: 17px; letter-spacing: -0.016em; }
.legal__point span { color: var(--ash); font-size: 14px; line-height: 1.45; }
.legal section { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--hairline); }
.legal h2 { font-size: clamp(21px, 2.2vw, 26px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.legal h3 { margin-top: 22px; font-size: 18px; font-weight: 600; letter-spacing: -0.016em; }
.legal section p, .legal section li { max-width: 760px; margin-top: 12px; color: var(--smoke); font-size: 17px; line-height: 1.6; }
.legal section ul { padding-left: 1.2em; list-style: disc; }
.legal section li { margin-top: 6px; }
.legal section a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.legal__updated { margin-top: 56px; color: var(--ash); font-size: 13px; }
.legal code { padding: 1px 5px; border-radius: 4px; background: var(--frost); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }
@media (max-width: 760px) { .legal__summary { grid-template-columns: 1fr; } }

/* ---------- Page 404 ---------- */
.notfound { min-height: 70svh; display: grid; align-content: center; padding-top: var(--nav-h); }
