/* Functional improvements applied to the original visual design. */
html {
  scroll-padding-top: 24px;
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid #164b62;
  outline-offset: 4px;
}
.skip-link {
  position: fixed;
  left: 10px;
  top: 10px;
  z-index: 10000;
  padding: 12px 20px;
  background: white;
  color: #164b62;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}
.nav-inner a {
  padding: 16px 18px;
}
.nav-inner a:first-child:not([aria-current]) {
  background: transparent;
}
.nav-inner a:hover {
  background: #107ca4;
}
.menu-toggle,
.mobile-contact {
  display: none;
}
.button {
  display: inline-block;
  padding: 14px 24px;
  min-height: 48px;
  border: 1px solid #2e8d20;
  border-radius: 28px;
  background: #2e8d20;
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.button:hover {
  background: #26761a;
}
.button.secondary {
  background: white;
  color: #164b62;
  border-color: #94b5c1;
}
.quote-form h2 {
  margin-top: 0;
  font-size: 1.55rem;
}
.quote-form > p,
.small-note {
  color: #516f7c;
}
.quote-form .form-grid {
  margin-top: 24px;
}
.quote-form select,
.quote-form input,
.quote-form textarea {
  min-width: 0;
  max-width: 100%;
}
.quote-form textarea {
  resize: vertical;
}
#formStatus {
  margin-top: 20px;
  font-weight: 700;
}
#mailFallback {
  margin-top: 20px;
  padding: 20px;
  background: #f1f8fa;
  border-radius: 12px;
}
#mailFallback a {
  text-decoration: underline;
  overflow-wrap: anywhere;
}
#mailFallback button,
#copyManual {
  margin-top: 16px;
}
.contact-line a {
  overflow-wrap: anywhere;
}
.contact-line a:hover {
  text-decoration: underline;
}
dialog {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  padding: 60px 28px 30px;
  border: 0;
  background: transparent;
  color: white;
}
dialog::backdrop {
  background: #07151cf2;
}
dialog[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
dialog img {
  max-width: 100%;
  max-height: calc(100dvh - 150px);
  object-fit: contain;
}
dialog p {
  font-size: .9rem;
  text-align: center;
}
dialog .photo-close {
  position: fixed;
  top: 15px;
  right: 20px;
  min-width: 44px;
  min-height: 44px;
}
@media (max-width: 850px) {
  .menu-toggle {
    display: block;
    min-height: 44px;
    margin: 0 14px 0 auto;
    padding: 10px 18px;
    border: 0;
    background: transparent;
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  .nav-inner {
    display: none;
  }
  .menu-open .nav-inner {
    display: flex;
    padding-bottom: 10px;
  }
  .nav-inner a {
    min-height: 44px;
    padding: 12px 8px;
  }
  .mobile-contact {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 10px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: white;
    border-top: 1px solid #dce8ec;
  }
  .mobile-contact a {
    min-height: 44px;
    padding: 11px 8px;
    border-radius: 24px;
    background: #179bcd;
    color: white;
    font-size: .85rem;
    text-align: center;
    font-weight: 700;
  }
  .mobile-contact a:last-child {
    background: #2e8d20;
  }
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition: none !important;
  }
}

/* Direct quote requests, within the existing visual identity. */
.quote-panel {
  max-width: 850px;
}
.quote-form fieldset {
  border: 0;
  border-top: 1px solid #dce8ec;
  padding: 22px 0 4px;
  margin: 26px 0 0;
  min-width: 0;
}
.quote-form legend {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0 14px 0 0;
}
.quote-form .form-grid {
  margin-top: 8px;
}
.quote-form .form-field label {
  margin-bottom: 0;
}
.quote-form label small {
  font-weight: 400;
}
.quote-form .form-field {
  margin-bottom: 20px;
  min-width: 0;
}
.quote-form input[aria-invalid=true],
.quote-form select[aria-invalid=true],
.quote-form textarea[aria-invalid=true] {
  border: 2px solid #a42626;
}
.field-error {
  display: block;
  font-size: .85rem;
  color: #a42626;
  margin-top: 5px;
}
.form-errors {
  background: #fff2ee;
  color: #8b2525;
  padding: 16px;
  border-left: 4px solid #a42626;
  margin-top: 20px;
  border-radius: 6px;
}
.form-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.message-help {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: #516f7c;
  font-size: .8rem;
  margin-top: 6px;
}
.quote-form .button:disabled {
  opacity: .65;
  cursor: wait;
}
.quote-success {
  border: 1px solid #b4d8a9;
  border-radius: 18px;
  padding: 32px;
  background: #f5fbf2;
  color: #164b62;
}
.success-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #2e8d20;
  color: white;
  font-size: 1.7rem;
}
.reference-box {
  padding: 15px;
  background: white;
  border: 1px solid #dce8ec;
  border-radius: 8px;
}
.reference-box strong {
  display: block;
  overflow-wrap: anywhere;
}
.owner-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}
.owner-lock svg { display: block; }
.requests-page {
  max-width: 900px;
  margin: auto;
  padding: 32px 20px;
  color: #164b62;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}
.request-card {
  padding: 24px;
  margin-top: 24px;
  border: 1px solid #c9dce4;
  border-radius: 12px;
  background: #f5fafb;
  overflow-wrap: anywhere;
}
.request-description {
  white-space: pre-wrap;
  padding-top: 16px;
  border-top: 1px solid #dce8ec;
}
.request-feedback:empty { display: none; }
.request-feedback { padding: 14px 18px; background: #edf8e9; border-radius: 8px; color: #245b1d; }
.request-error { padding: 14px 18px; background: #fff0ed; border-radius: 8px; color: #8b2525; }
.request-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.request-button { min-height: 44px; padding: 10px 16px; border: 1px solid #94b5c1; border-radius: 8px; background: white; color: #164b62; font: inherit; font-weight: 700; cursor: pointer; }
.request-button:disabled { opacity: .65; cursor: wait; }
.request-delete { border-color: #a42626; color: #982626; }
.request-delete:hover:not(:disabled) { background: #fff0ed; }
.request-confirmation { margin-top: 20px; padding: 18px; border: 1px solid #d99b8b; border-radius: 8px; background: #fff6f2; }
.request-confirmation p { margin: 0 0 12px; }

@media (min-width: 851px) and (max-width: 1100px) {
  .menu-toggle {
    display: block;
    min-height: 44px;
    margin: 0 14px 0 auto;
    padding: 10px 18px;
    border: 0;
    background: transparent;
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  .nav-inner {
    display: none;
  }
  .menu-open .nav-inner {
    display: flex;
    flex-wrap: wrap;
  }
}

/* Match the existing gallery controls on every content photo. */
.zoom-label { font-size: .875rem; }
.chantier-photo.vehicle-photo { height: auto; border-radius: 12px; }
.chantier-photo.vehicle-photo img { height: auto; object-fit: contain; }

/* Instagram link shared by the seven public page footers. */
.foot { flex-wrap: wrap; }
.footer-instagram {
  display: inline-flex;
  order: 1;
  margin-left: auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  max-width: 100%;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}
.footer-instagram svg { flex-shrink: 0; }
.footer-instagram:hover span { text-decoration: underline; }
.footer-instagram:focus-visible { outline: 3px solid white; outline-offset: 4px; }
.foot .owner-lock { order: 2; }
@media (max-width: 580px) {
  .footer-instagram { align-self: flex-end; text-align: right; }
}

[hidden] { display: none !important; }
.request-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 20px 0; }
.request-photos a { display: block; color: #164b62; }
.request-photos img { display: block; width: 100%; height: 160px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }

.quote-rooms, .paint-options { margin: 24px 0; padding: 22px; border: 1px solid #c9dce4; border-radius: 12px; background: #f5fafb; }
.quote-rooms h3, .paint-options h3 { margin: 0 0 10px; color: #164b62; font-size: 1.2rem; }
.room-row { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid #dce8ec; }
.room-title { margin: 16px 0 12px; font-size: 1rem; }
.room-remove { padding: 8px 14px; min-height: 44px; border: 1px solid #94b5c1; border-radius: 8px; background: white; color: #164b62; font: inherit; cursor: pointer; }
.quote-rooms input, .paint-options input, .paint-options select { width: 100%; }
@media (max-width: 580px) { .quote-rooms, .paint-options { padding: 16px; } }

.extra-services { margin: 24px 0; padding: 22px; border: 1px solid #c9dce4; border-radius: 12px; background: #f5fafb; }
.extra-services h3 { margin: 0 0 10px; color: #164b62; font-size: 1.2rem; }
.extra-service-row { padding: 4px 0 18px; margin-bottom: 18px; border-bottom: 1px solid #dce8ec; }
.extra-service-title { margin: 16px 0 12px; font-size: 1rem; }
@media(max-width:580px) { .extra-services { padding: 16px; } }

#service-groups { display: grid; gap: 24px; margin-bottom: 20px; }
.service-card { border: 1px solid #c9dce4; border-radius: 12px; background: #f5fafb; padding: 24px; }
.service-card > .service-title { margin: 0 0 20px; color: #164b62; font-size: 1.25rem; }
.service-card .quote-rooms { margin: 20px 0 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.service-card .quote-rooms > h4 { font-size: 1.1rem; color: #164b62; margin: 0 0 10px; }
.service-card .room-row { padding: 20px; border: 1px solid #d4e2e8; border-radius: 10px; background: #fff; margin: 16px 0; }
.service-card .room-title { margin: 0 0 16px; }
.room-paint { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e1e9ed; }
.remove-service { margin-top: 20px; }
@media(max-width:580px) { .service-card { padding: 16px; } .service-card .room-row { padding: 14px; } }
