/* CSS for atout-poil.ch - v 1.0                                        */
/* (c) Quant SE, AI Engineering & Solutions - https://svenericsson.net */
/* _________________________ atoutpoil.css ___________________________ */

:root {
  --header-bg: #f8d6a2;
  --header-text: #5082ff;
  --header-title: #565656;
  --nav-bg: #d8a165;
  --header-link: #5082ff;
  --main-bg: #f7f7f7;
  --main-text: #5082ff;
  --main-title: #565656;
  --main-link: #d8a165;
  --border-color: #d8a165;
  --footer-bg: #565656;
  --footer-text: #f7f7f7;
  --footer-link: #f8d6a2;
  --max-width: 1100px;
  --header-height: 100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; line-height: 1.6; }
a { text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.container { width: min(92%, var(--max-width)); margin-inline: auto; }

/* Header and Navigation using Flexbox */
.site-header { background: var(--header-bg); color: var(--header-text); border-bottom: 1px solid var(--border-color); }
.header-layout { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding-block: 1.2rem; }
.brand { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; color: var(--header-title); }
#ATOUT-POIL_logo { display: block; width: auto; height: 60px; max-width: 100%; object-fit: contain; }
.nav-list { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; padding: 0; margin: 0; list-style: none; }
.nav-list a { display: flex; align-items: center; justify-content: center; min-height: 60px; padding: .5rem 1rem; background: var(--nav-bg); color: var(--header-link); border-radius: 6px; font-weight: 700; text-decoration: none; }
.nav-list a:hover, .nav-list a:focus-visible { background: #c88f4e; text-decoration: underline; }
.nav-list a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; }

/* Main section Contenu */
/* Fixed decorative logo outside <main>, with content scrolling above it. */
body { background: var(--main-bg); }
body::before {
  content: "";
  position: fixed;
  top: var(--header-height);
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url("pix/atout-poil_header-logo_yorkshire-head.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: auto min(72vh, 780px);
  opacity: .20;
  pointer-events: none;
  z-index: 0;
}
.site-header, main, .site-footer { position: relative; z-index: 1; }
main { background: transparent; color: var(--main-text); }
/* Subtle translucent panels keep text legible over the fixed logo. */
main .card { background: rgba(247, 247, 247, .86); }
main .contact-map { background: rgba(247, 247, 247, .9); }
main a { color: var(--main-link); }
h1, h2, h3 { color: var(--main-title); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.hero { padding-block: 5rem 3rem; }
.hero p { max-width: 65ch; }
.section { padding-block: 2.5rem 3.5rem; border-top: 1px solid var(--border-color); }
.button-link { display: inline-block; padding: .7rem 1.1rem; border: 2px solid var(--border-color); border-radius: .5rem; font-weight: 700; }
.card-grid { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.card { flex: 1 1 230px; border: 1px solid var(--border-color); border-radius: .75rem; padding: 1.25rem; }

/* Services: pricing table keeping consistent proportions */
#prestations .tarif-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: .5rem 0 1rem;
  background-color: #f8d6a2;
  color: #5082ff;
  border: 1px solid #d8a165;
  box-shadow: none;
}
#prestations .tarif-table td {
  border: 1px solid #d8a165;
  padding: .25rem .5rem;
  overflow-wrap: anywhere;
}

/* Gallery: using 3 cards side-by-side on a single line with auto re-sizing up to max 420px */
#galerie .gallery-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(.25rem, 1.5vw, 1.25rem);
  align-items: stretch;
}
#galerie .gallery-grid > .card {
  flex: 1 1 0;
  min-width: 0;
  max-width: 460px;
  padding: clamp(2px, 1vw, 1.25rem);
  border: 1px solid #d8a165;
  box-shadow: none;
}
#galerie .gallery-grid img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-inline: auto;
}

/* Contact: telephone numbers */
a[href^="tel:"]:hover {
    color: #5082ff;
    font-weight: 600;
}

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); }
.site-footer a { color: var(--footer-link); }
.footer-layout { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: 1.8rem; }
.footer-layout nav { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Accessibility features with information for screen readers. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 10; background: white; color: #2857ce; padding: .6rem 1rem; }
.skip-link:focus { top: 1rem; }

@media (max-width: 600px) {
  .header-layout { flex-direction: column; align-items: center; }
  #ATOUT-POIL_logo { height: 50px; }
  .nav-list { justify-content: center; }
  .nav-list a { min-height: 45px; }
  .hero { padding-block: 3rem 2rem; }
}

/* Contact: responsive Google Maps embed */
#contact .contact-map {
  margin-top: 1.25rem;
  width: 100%;
  max-width: 760px;
}
#contact .contact-map iframe {
  display: block;
  width: 100%;
  height: clamp(260px, 45vw, 380px);
  border: 1px solid var(--border-color);
  border-radius: .75rem;
}
#contact .map-directions { margin: .65rem 0 0; }

/* Smaller decorative logo on phones. */
@media (max-width: 600px) {
  body::before { background-size: 85vw auto; opacity: .14; }
}
