/* ==========================================================================
   WILD Géomètres – feuille de style
   Palette et typographies reprises du thème WordPress d'origine
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --base: #f9f8f5;
  --base-2: #f6decd;
  --accent: #d73301;
  --accent-dark: #b02900;
  --contrast: #000;
  --muted: #4a4a4a;
  --line: rgba(0, 0, 0, 0.12);

  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 16px;
  --radius-img: 12px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(3rem, 8vw, 6rem);
  --content: 720px;
  --wide: 1200px;
}

/* --- Base ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--base);
  color: var(--contrast);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

h3 {
  font-size: 1.4rem;
}

p,
ul {
  margin: 0 0 1rem;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--contrast);
  color: var(--base);
  padding: 0.5rem 1rem;
}

/* --- Mise en page ---------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow {
  max-width: calc(var(--content) + 2 * var(--gutter));
}

.section {
  padding-top: var(--section);
  padding-bottom: var(--section);
}

.section--tint {
  background: var(--base-2);
}

.section--flush {
  padding-top: 0;
}

.section--spaced {
  margin-top: var(--section);
}

.center {
  text-align: center;
}

.lead {
  font-size: 1.25rem;
}

.eyebrow {
  font-family: var(--font-heading);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Astérisque décoratif du thème d'origine */
.asterisk::before {
  content: "";
  display: block;
  width: 1rem;
  height: 1rem;
  margin-bottom: 0.75rem;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 0h3v8.4l7.3-4.2 1.5 2.6L15 11l7.3 4.2-1.5 2.6-7.3-4.2V24h-3v-10.4l-7.3 4.2-1.5-2.6L9 11 1.7 6.8l1.5-2.6 7.3 4.2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 0h3v8.4l7.3-4.2 1.5 2.6L15 11l7.3 4.2-1.5 2.6-7.3-4.2V24h-3v-10.4l-7.3 4.2-1.5-2.6L9 11 1.7 6.8l1.5-2.6 7.3 4.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.center .asterisk::before,
.asterisk.center::before,
.section-head .asterisk::before {
  margin-left: auto;
  margin-right: auto;
}

/* --- Boutons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border: 2px solid var(--accent);
  border-radius: 100px;
  background: var(--accent);
  color: var(--base);
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--contrast);
  border-color: var(--contrast);
  color: var(--base);
}

.btn--outline {
  background: transparent;
  color: var(--contrast);
  border-color: var(--contrast);
}

.btn--outline:hover {
  background: var(--contrast);
  color: var(--base);
}

.btn svg {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn-row--start {
  justify-content: flex-start;
}

/* --- En-tête --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--base);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
  color: var(--contrast);
}

.brand img {
  width: clamp(150px, 22vw, 230px);
  mix-blend-mode: multiply;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.brand-tagline {
  font-size: 0.9rem;
  color: var(--muted);
}

.site-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 1.1rem;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--contrast);
  border-bottom-color: var(--accent);
}

@media (max-width: 1040px) {
  .brand-text {
    display: none;
  }
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--contrast);
  cursor: pointer;
}

.nav-toggle svg {
  width: 28px;
  height: 28px;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

@media (max-width: 860px) {
  .brand-text {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--base);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.5rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.25rem;
  }

  .site-nav a[aria-current="page"] {
    color: var(--accent);
    border-bottom-color: var(--line);
  }
}

/* --- Accueil --------------------------------------------------------------- */

.hero {
  padding: clamp(2rem, 6vw, 4rem) 0 var(--section);
}

.hero-text {
  max-width: 620px;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  text-align: center;
}

.hero-text h1 {
  font-weight: 500;
}

.rounded {
  border-radius: var(--radius-img);
}

.hero-img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.section-head {
  max-width: 620px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-head--tight {
  margin-bottom: 0;
}

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 3rem;
}

.service h3 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
}

.service ul {
  padding-left: 1.1rem;
}

.service li {
  margin-bottom: 0.4rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split--media-wide {
  grid-template-columns: 1.6fr 1fr;
}

.map {
  width: 100%;
  aspect-ratio: 16 / 7;
  border: 0;
  border-radius: var(--radius-img);
  background: var(--base-2);
}

.location {
  margin-top: 3rem;
}

.location img {
  max-height: 560px;
  width: auto;
  margin: 0 auto;
}

.address-block {
  font-style: normal;
}

.cta-box {
  background: var(--base-2);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
}

.cta-box p {
  font-size: 1.25rem;
  margin: 0;
}

.cta-box .btn-row {
  margin-top: 1.5rem;
}

.clients {
  background: var(--base-2);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.clients-title {
  font-family: var(--font-body);
  font-size: 1.25rem;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.logo-row li {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 112px;
  padding: 0.75rem;
  background: #fff;
  border-radius: 10px;
}

.logo-row img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

@media (max-width: 900px) {
  .services {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .services,
  .split,
  .split--media-wide {
    grid-template-columns: 1fr;
  }

  .hero-img {
    aspect-ratio: 4 / 3;
  }

  .map {
    aspect-ratio: 4 / 3;
  }

  .logo-row li {
    width: calc(50% - 0.75rem);
  }
}

/* --- Pages intérieures ----------------------------------------------------- */

.page-head {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.page-head h1 {
  margin-bottom: 0.75rem;
}

.page-head p {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 640px;
}

/* Prestations : alternance image / texte */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}

.feature:first-child {
  border-top: 0;
  padding-top: 0;
}

.feature--reverse .feature-media {
  order: 2;
}

.feature-media img {
  width: 100%;
}

.feature-media .contain {
  background: #fff;
  padding: 0.5rem;
}

.feature ul {
  padding-left: 1.1rem;
}

.feature li {
  margin-bottom: 0.75rem;
}

.note {
  border-left: 3px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--muted);
}

@media (max-width: 800px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature--reverse .feature-media {
    order: 0;
  }
}

/* Réalisations */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery figure {
  margin: 0;
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-img);
  background: #fff;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  transition: transform 0.3s;
}

.gallery a:hover img {
  transform: scale(1.03);
}

.gallery figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.gallery figcaption span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--muted);
}

@media (max-width: 700px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* Visionneuse */
.lightbox {
  width: min(96vw, 1400px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.lightbox img {
  max-width: 100%;
  max-height: 86vh;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
}

.lightbox p {
  color: #fff;
  text-align: center;
  margin: 0.75rem 0 0;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

/* Équipe */
.prose p {
  margin-bottom: 1.25rem;
}

.team {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 820px;
  margin: 2.5rem auto 0;
  padding: 0;
  list-style: none;
}

.member {
  text-align: center;
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--base);
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 500;
}

.member strong {
  display: block;
  font-size: 1.05rem;
}

.member span {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .team {
    grid-template-columns: 1fr;
  }
}

/* --- Contact --------------------------------------------------------------- */

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--base-2);
}

.contact-card .icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  padding: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--base);
}

.contact-card h2 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.contact-card .value {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  word-break: break-word;
  text-decoration: none;
}

.contact-card .value--address {
  font-style: normal;
  font-size: 1.2rem;
}

.contact-card .meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.contact-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1.25rem;
}

.contact-card .btn {
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .contact-cards {
    grid-template-columns: 1fr;
  }
}

.links-list {
  padding-left: 1.1rem;
}

/* Petite notification (copie de l'adresse e-mail) */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 200;
  transform: translate(-50%, 1rem);
  opacity: 0;
  pointer-events: none;
  padding: 0.75rem 1.25rem;
  border-radius: 100px;
  background: var(--contrast);
  color: var(--base);
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --- Pied de page ---------------------------------------------------------- */

.site-footer {
  background: var(--base-2);
  padding: 3rem 0 1.5rem;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand img {
  width: 200px;
  mix-blend-mode: multiply;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  margin: 0;
}

.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.35rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* --- 404 ------------------------------------------------------------------- */

.not-found {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
