/* GLOBAL FRIGO — contact & demande de devis : cartes de coordonnées, pièces à chiffrer, formulaire, comptoir + carte.
   Mêmes composants que l'accueil (site.css) ; seuls les blocs propres à la page sont définis ici. */

/* ---------- héro de page intérieure (bloc commun aux pages intérieures, à l'identique) ---------- */
.page-hero { position: relative; color: #fff; background: var(--navy); overflow: hidden; }
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18, 18, 18,.95) 0%, rgba(18, 18, 18,.82) 40%, rgba(18, 18, 18,.35) 100%); }
.page-hero .container { position: relative; z-index: 2; padding-top: clamp(44px, 6vw, 84px); padding-bottom: clamp(44px, 6vw, 84px); display: grid; gap: 14px; }
.page-hero h1 { color: #fff; } .page-hero .lead { color: #e8e8e0; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: #c8c8bf; } .crumbs a:hover { color: #fff; text-decoration: underline; } .crumbs span::before { content: '/'; margin-right: 8px; opacity: .6; }
.page-hero .kicker { color: #b3d1ff; }
.page-hero .container { min-height: clamp(300px, 27vw, 380px); align-content: center; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[data-ico] { display: contents; }
#devis, #comptoir { scroll-margin-top: 84px; }

/* ---------- cartes de coordonnées ---------- */
.ct-coords { padding-bottom: clamp(40px, 5vw, 72px); }
.ct-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
.ct-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: clamp(18px, 2vw, 26px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow .3s, border-color .3s, transform .3s; }
a.ct-card:hover { box-shadow: var(--shadow); border-color: #d9d9d0; transform: translateY(-3px); }
.ct-ico { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px; border-radius: 10px; background: var(--blue-50); color: var(--blue); flex: none; }
.ct-ico svg { width: 22px; height: 22px; }
.ct-card h3 { font-family: var(--f); font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ct-val, .ct-tel a { font-family: var(--fh); font-size: clamp(18px, 1.6vw, 21px); font-weight: 800; letter-spacing: -.01em; line-height: 1.25; color: var(--navy); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ct-val-sm { font-size: 16px; font-weight: 700; letter-spacing: 0; }
a.ct-card:hover .ct-val, .ct-tel a:hover { color: var(--blue); }
.ct-sub { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.ct-tel { display: grid; width: 100%; }
.ct-tel li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ct-tel li + li { border-top: 1px solid var(--line); }
.ct-tel a { display: inline-flex; align-items: center; min-height: 44px; }
.ct-tel span { font-size: 13px; color: var(--muted); }

/* ---------- demande de devis ---------- */
.dv-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(18px, 2.4vw, 32px); align-items: start; }
.dv-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: clamp(18px, 2.2vw, 30px); min-width: 0; }
.dv-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 16px; }
.dv-n { font-size: 13.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

.dv-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.dv-table th { padding: 0 10px 10px 0; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; color: var(--muted); border-bottom: 1px solid var(--line); }
.dv-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dv-table th:last-child, .dv-table td:last-child { padding-right: 0; width: 1%; }
.dv-ref { white-space: nowrap; }
.dv-ref a { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--blue); }
.dv-ref a:hover { text-decoration: underline; }
.dv-hc { display: inline-block; padding: 3px 8px; border-radius: 5px; background: #f8efd2; color: var(--orange-600); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.dv-name { font-weight: 600; line-height: 1.3; color: var(--navy); overflow-wrap: anywhere; }
.dv-del { height: 44px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; font-size: 13.5px; font-weight: 650; white-space: nowrap; color: var(--muted); transition: background .15s, color .15s; }
.dv-del:hover { background: #fdecea; color: #b3261e; }
.dv-del svg { width: 17px; height: 17px; flex: none; }

.dv-empty { display: grid; justify-items: center; gap: 10px; padding: clamp(22px, 3vw, 36px) 16px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.dv-empty-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--blue); }
.dv-empty-ico svg { width: 24px; height: 24px; }
.dv-empty p { max-width: 44ch; font-size: 14.5px; color: var(--muted); }
.dv-empty .btn { margin-top: 6px; }

.dv-undo { margin-top: 12px; padding: 10px 14px; border-radius: 8px; background: var(--blue-50); font-size: 14px; color: var(--navy); }
.dv-undo[hidden] { display: none; }
.dv-undo button { margin-left: 6px; min-height: 32px; font-weight: 700; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.dv-free { display: grid; gap: 10px; margin-top: 18px; padding: 16px; border: 1.5px dashed #d9d9d0; border-radius: var(--radius); background: var(--bg-soft); }
.dv-free label { font-size: 14.5px; font-weight: 650; color: var(--navy); }
.dv-free-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.dv-free-row .btn { height: 48px; }
.dv-free-note { font-size: 13px; color: var(--muted); }
.dv-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; }
.dv-foot .link-arrow { min-height: 44px; }
.dv-clear { min-height: 44px; padding: 0 4px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.dv-clear[hidden] { display: none; }
.dv-clear:hover { color: #b3261e; }

/* formulaire */
.dv-form { display: grid; gap: 16px; }
.dv-form .dv-head { margin-bottom: 0; }
.fld-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fld { display: grid; gap: 6px; align-content: start; }
.fld label { font-size: 14px; font-weight: 650; color: var(--navy); }
.fld .opt { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.fld .req { color: var(--orange-600); }
.fld input, .fld textarea, .dv-free input { width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: 8px; padding: 0 14px; background: #fff; font-size: 16px; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.fld textarea { height: auto; min-height: 112px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.fld input::placeholder, .fld textarea::placeholder, .dv-free input::placeholder { color: #8a8a84; }
.fld input:focus, .fld textarea:focus, .dv-free input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(41, 90, 169, .12); }
.fld [aria-invalid="true"], .dv-free [aria-invalid="true"] { border-color: #b3261e; }
.fld [aria-invalid="true"]:focus, .dv-free [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(179, 38, 30, .12); }
.fld-err { font-size: 13px; font-weight: 600; line-height: 1.4; color: #b3261e; }
.fld-err[hidden] { display: none; }

.dv-preview { border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); }
.dv-preview summary { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; font-size: 14.5px; font-weight: 650; color: var(--navy); cursor: pointer; list-style: none; border-radius: 8px; }
.dv-preview summary::-webkit-details-marker { display: none; }
.dv-preview summary svg { width: 17px; height: 17px; color: var(--blue); flex: none; }
.dv-preview summary::after { content: ''; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.dv-preview[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.dv-preview summary:hover { color: var(--blue); }
.dv-preview pre { margin: 0 14px; padding: 14px 16px; max-height: 320px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-family: var(--f); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.dv-copy { margin: 4px 14px 8px; min-height: 40px; font-size: 13.5px; font-weight: 650; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.dv-send { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dv-send .btn { padding: 0 14px; white-space: normal; line-height: 1.2; text-align: center; }
.dv-done { display: grid; gap: 8px; padding: 14px 16px; border-radius: 8px; background: #e5f6ee; border: 1px solid #bfe6d2; color: #0c5f3b; font-size: 14.5px; line-height: 1.5; }
.dv-done[hidden] { display: none; }
.dv-done b { color: #094a2e; }
.dv-done a, .dv-done button { font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.dv-privacy { font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* ---------- le comptoir + carte ---------- */
.cp-addr { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-style: normal; font-size: 16px; line-height: 1.55; color: var(--navy); font-weight: 600; }
.cp-addr svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--blue); }
.cp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.split-media:empty, .split-media:not(:has(img)) { background: var(--navy); }
.map-frame { position: relative; height: clamp(300px, 36vw, 440px); margin-top: clamp(28px, 4vw, 56px); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-soft); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 20px; text-align: center; color: var(--muted); font-size: 14.5px; }
.map-ph svg { width: 28px; height: 28px; color: var(--blue); }
.map-ph[hidden], .map-ph [hidden] { display: none; }

/* ---------- adaptatif ---------- */
@media (max-width: 1120px) {
  .ct-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .dv-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .page-hero::after { background: linear-gradient(180deg, rgba(18, 18, 18,.9) 0%, rgba(18, 18, 18,.8) 100%); }
}
@media (max-width: 600px) {
  .ct-cards { grid-template-columns: minmax(0, 1fr); }
  .ct-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; row-gap: 4px; align-items: start; }
  .ct-ico { grid-row: 1 / span 4; margin-bottom: 0; }
  .ct-card > :not(.ct-ico) { grid-column: 2; }

  /* la liste devient une pile de lignes : référence / désignation, bouton « Retirer » à droite */
  .dv-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dv-table, .dv-table tbody { display: block; }
  .dv-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'ref del' 'name del'; column-gap: 10px; row-gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .dv-table td { display: block; padding: 0; border: 0; width: auto; }
  .dv-table td:last-child { width: auto; }
  .dv-ref { grid-area: ref; white-space: normal; overflow-wrap: anywhere; }
  .dv-name { grid-area: name; }
  .dv-act { grid-area: del; align-self: center; }

  .dv-free-row { grid-template-columns: minmax(0, 1fr); }
  .dv-free-row .btn { width: 100%; }
  .fld-row, .dv-send { grid-template-columns: minmax(0, 1fr); }
  .cp-actions .btn { flex: 1 1 100%; }
  .cta-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  a.ct-card, .dv-preview summary::after { transition: none; }
  a.ct-card:hover { transform: none; }
}
