/*
Theme Name: Agencement31
Description: Cuisines et agencements sur-mesure à Toulouse — Anne Favarcq & Sébastien Pagnacco, concepteurs certifiés Raison Home.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: agencement31
*/

:root {
  color-scheme: light;

  /* Fraunces (auto-hébergée) s'affiche tout de suite ; la police Adobe « fields » prend le relais une fois chargée. */
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: var(--font-sans);

  --container-width: 120rem;
  --container-pad: clamp(2.2rem, 4vw, 5.2rem);

  --bg: #f6f4f0;
  --bg-muted: #edeae3;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-2: rgba(255, 255, 255, 0.82);
  --ink: #141416;
  --muted: rgba(20, 20, 22, 0.72);
  --muted-2: rgba(20, 20, 22, 0.58);
  --line: rgba(20, 20, 22, 0.12);
  --line-strong: rgba(20, 20, 22, 0.18);

  --accent: #0f5b66;
  --accent-ink: #08343a;
  --accent-soft: rgba(15, 91, 102, 0.12);
  --accent-soft-2: rgba(15, 91, 102, 0.06);

  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 2px 4px rgba(17, 24, 39, 0.04), 0 12px 32px rgba(17, 24, 39, 0.08);

  --radius-sm: 0.8rem;
  --radius-md: 1.2rem;
  --radius-lg: 1.6rem;
  --radius-xl: 2rem;
  --radius-pill: 999rem;

  --space-4: 0.4rem;
  --space-8: 0.8rem;
  --space-10: 1rem;
  --space-12: 1.2rem;
  --space-16: 1.6rem;
  --space-20: 2rem;
  --space-24: 2.4rem;
  --space-32: 3.2rem;
  --space-40: 4rem;
  --space-48: 4.8rem;
  --space-64: 6.4rem;
  --space-80: 8rem;

  --header-height: 7.2rem;

  --ease: cubic-bezier(0.2, 0.9, 0.2, 1);
  --t: 180ms var(--ease);
  --t-slow: 520ms var(--ease);
}

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

html {
  font-size: 62.5%;
}

html,
body {
  max-width: 100vw;
  /* clip et non hidden : hidden transformerait body en conteneur de défilement et casserait l'en-tête collant. */
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.7rem;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding-left: 0;
}

::selection {
  background: rgba(15, 91, 102, 0.16);
}

:root.fonts-fields {
  --font-display: fields, "Fraunces", ui-serif, Georgia, serif;
}

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

.site-footer :focus-visible,
.section--accent :focus-visible {
  outline-color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font-family: inherit;
}

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

.image-full {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: clamp(5.6rem, 7vw, 10.4rem) 0;
}

.section--muted {
  background: var(--bg-muted);
}

.section--listing {
  padding-top: clamp(4.8rem, 6vw, 8.8rem);
}

.eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(20, 20, 22, 0.62);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 3.2rem;
  height: 1px;
  margin: -0.2rem var(--space-12) 0 0;
  background: var(--accent);
}

.heading-xl,
.heading-lg,
.heading-md {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}

.heading-xl {
  font-size: clamp(4.4rem, 5vw, 6.6rem);
  line-height: 1.04;
  letter-spacing: -0.06rem;
}

.heading-lg {
  font-size: clamp(3.2rem, 3.3vw, 4.4rem);
  line-height: 1.16;
  letter-spacing: -0.04rem;
}

.heading-md {
  font-size: clamp(2.1rem, 2.1vw, 2.8rem);
  line-height: 1.35;
  letter-spacing: -0.02rem;
}

.text-lead {
  margin-top: var(--space-20);
  font-size: 1.75rem;
  line-height: 1.85;
  color: var(--muted);
  max-width: 62ch;
}

.text-lead:first-child {
  margin-top: 0;
}

.text-muted {
  color: var(--muted-2);
}

.page main :where(p, li) a:not(.btn):not(.wp-element-button) {
  text-decoration: underline;
  text-decoration-color: rgba(15, 91, 102, 0.32);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color var(--t), color var(--t);
}

.page main :where(p, li) a:not(.btn):not(.wp-element-button):hover {
  color: var(--ink);
  text-decoration-color: rgba(15, 91, 102, 0.72);
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.1rem 1.8rem;
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  user-select: none;
  transition: background var(--t), border-color var(--t), color var(--t);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-ink);
}

.btn-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(20, 20, 22, 0.32);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(245, 244, 241, 0.82);
  border-bottom: 1px solid rgba(20, 20, 22, 0.1);
  backdrop-filter: blur(10px);
  transition: background var(--t), box-shadow var(--t), border-color var(--t);
}

.site-header.site-header--scrolled {
  background: rgba(245, 244, 241, 0.92);
  border-bottom-color: rgba(20, 20, 22, 0.14);
  box-shadow: 0 1px 0 rgba(20, 20, 22, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
  width: 100%;
}

.brand {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: var(--space-12);
  row-gap: 0.3rem;
  align-items: center;
  line-height: 1.1;
}

.brand-title {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: rgba(20, 20, 22, 0.92);
  text-align: center;
}

.brand-tag {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(20, 20, 22, 0.6);
  text-align: center;
}

.brand-partner {
  grid-column: 1;
  grid-row: 1 / 3;
  display: inline-flex;
  align-items: center;
  align-self: center;
}

.raisonhome-logo {
  width: auto;
  height: 2.2rem;
}

.raisonhome-logo--header {
  height: 4.4rem;
}

.raisonhome-logo--footer {
  height: 2.4rem;
}

.raisonhome-logo--footer-inline {
  height: 1.4rem;
  display: inline-block;
  vertical-align: -0.25em;
  margin: 0 0.4rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 4.2rem;
  height: 4.2rem;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(20, 20, 22, 0.1);
  border-radius: var(--radius-pill);
  color: rgba(20, 20, 22, 0.92);
  cursor: pointer;
  transition: background var(--t), border-color var(--t), transform var(--t);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(20, 20, 22, 0.16);
}

.nav-toggle svg {
  width: 2.4rem;
  height: 2.4rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-20);
  flex-wrap: wrap;
}

.nav > a.menu-link {
  position: relative;
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 650;
  line-height: 2rem;
  color: rgba(20, 20, 22, 0.72);
  transition: color var(--t);
}

.nav > a.menu-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.7rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--t);
}

.nav > a.menu-link:hover {
  color: rgba(20, 20, 22, 0.92);
}

.nav > a.menu-link:hover::after {
  transform: scaleX(1);
}

.nav > a.menu-link[aria-current="page"] {
  color: rgba(20, 20, 22, 0.92);
}

.nav > a.menu-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.hero {
  padding: clamp(6.4rem, 8vw, 12rem) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.4rem, 4.6vw, 7.6rem);
  align-items: center;
}

.hero-grid > :first-child {
  max-width: 62rem;
}

.hero-grid > :last-child {
  justify-self: end;
  width: 100%;
  max-width: 58rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
  margin-top: var(--space-32);
}

.media-panel,
.hero-image,
.card-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(20, 20, 22, 0.06);
}

.card-image {
  display: block;
}

.hero-image {
  height: clamp(36rem, 48vw, 64rem);
}

.media-panel {
  aspect-ratio: 16 / 11;
}

.card-image {
  aspect-ratio: 16 / 10;
}

.hero-image img,
.media-panel img,
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.card-image a:hover img {
  transform: scale(1.03);
}

.grid {
  display: grid;
  gap: clamp(1.8rem, 2.8vw, 3.4rem);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(36rem, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(20, 20, 22, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  min-width: 0;
}

/* Contact band cards (value line after eyebrow). */
.card .eyebrow + .heading-md {
  font-family: var(--font-sans);
  font-size: clamp(1.4rem, 1.15vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .card .eyebrow + .heading-md {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.card--muted {
  background: var(--surface-2);
}

.project-card {
  gap: var(--space-20);
}

.project-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-12);
  font-size: 1.2rem;
  font-family: var(--font-ui);
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(20, 20, 22, 0.58);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-10);
}

.tag {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(20, 20, 22, 0.1);
  font-family: var(--font-ui);
  font-weight: 650;
  font-size: 1.35rem;
  color: rgba(20, 20, 22, 0.84);
}

.list {
  list-style: none;
  display: grid;
  gap: var(--space-16);
  padding: 0;
  margin: var(--space-20) 0 0;
}

.list li {
  position: relative;
  padding-left: 2.2rem;
  color: var(--muted);
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 0.25rem;
  background: rgba(15, 91, 102, 0.9);
}

.site-footer {
  padding: clamp(5.6rem, 7vw, 9.6rem) 0;
  background: #121315;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.86);
}

.site-footer .text-muted {
  color: rgba(255, 255, 255, 0.74);
}

.site-footer .raisonhome-logo {
  filter: brightness(1.24) contrast(1.02);
}

.footer-grid {
  display: grid;
  gap: var(--space-32);
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
}

.footer-grid > * {
  min-width: 0;
}

.footer-label {
  margin: 0 0 var(--space-12);
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

.footer-partner {
  margin-bottom: var(--space-16);
}

.footer-title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 3.2rem;
  letter-spacing: -0.04rem;
  color: rgba(255, 255, 255, 0.94);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  font-size: 1.4rem;
  font-weight: 550;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  min-width: 0;
}

.footer-links :where(a, span) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-links a:hover,
.footer-meta a:hover {
  color: rgba(255, 255, 255, 0.96);
  text-decoration: underline;
  text-decoration-color: rgba(15, 91, 102, 0.8);
  text-underline-offset: 0.24em;
}

.footer-link {
  color: rgba(255, 255, 255, 0.78);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  transition: background var(--t), border-color var(--t), transform var(--t);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.social-icon {
  width: 1.8rem;
  height: 1.8rem;
  flex-shrink: 0;
}

.social-text {
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.footer-meta {
  margin-top: var(--space-32);
  font-size: 1.2rem;
  line-height: 1.8rem;
  color: rgba(255, 255, 255, 0.58);
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: minmax(30rem, 1.4fr) repeat(3, minmax(18rem, 1fr));
    align-items: start;
  }
}

.rt {
  max-width: 78rem;
  margin: 0 auto;
}

.rt :where(h2, h3) {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.02rem;
}

.rt :where(h2) {
  font-size: 3rem;
  line-height: 1.2;
  margin: 0 0 var(--space-16);
}

.rt :where(h3) {
  font-size: 2.4rem;
  line-height: 1.28;
  margin: var(--space-24) 0 var(--space-12);
}

.rt :where(p) {
  margin: 0 0 var(--space-16);
  color: var(--muted);
}

.rt :where(ul, ol) {
  margin: 0 0 var(--space-16);
  padding-left: 2rem;
  color: var(--muted);
}

.rt :where(li) {
  margin: 0.6rem 0;
}

.rt :where(blockquote) {
  margin: var(--space-24) 0;
  padding: var(--space-16) var(--space-20);
  border-left: 2px solid rgba(15, 91, 102, 0.6);
  background: rgba(15, 91, 102, 0.06);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  color: rgba(8, 52, 58, 0.92);
}

.rt :where(.wp-block-image) img {
  border-radius: var(--radius-lg);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .hero-image img,
  .media-panel img,
  .card-image img {
    transition: none;
  }
}

/* Menu « burger » jusqu'à 1180 px : en dessous, le menu complet ne tient pas sur une ligne. */
@media (max-width: 1180px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: calc(100dvh - var(--header-height));
    padding: var(--space-32) var(--container-pad);
    background: var(--bg);
    border-top: 1px solid rgba(20, 20, 22, 0.08);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-16);
    overflow-y: auto;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-slow), visibility var(--t-slow), transform var(--t-slow);
  }

  .nav.nav--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav > a.menu-link {
    font-size: 1.8rem;
    padding: 0.6rem 0;
  }

  .nav .btn {
    width: 100%;
  }
}

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

  .hero-grid > :last-child {
    justify-self: stretch;
    max-width: none;
  }

  .hero-image {
    height: auto;
    aspect-ratio: 16 / 11;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 9.6rem;
  }

  .brand {
    row-gap: 0.2rem;
    line-height: 1.2;
  }

  .brand-title {
    font-size: 1.9rem;
    line-height: 1.15;
    padding-top: 0.15rem;
  }

  .brand-tag {
    font-size: 1.05rem;
    line-height: 1.2;
    letter-spacing: 0.14em;
    padding-bottom: 0.15rem;
  }

  .raisonhome-logo--header {
    height: 4rem;
  }

  .section {
    padding: var(--space-64) 0;
  }

  .hero {
    padding: var(--space-64) 0;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* WordPress (Gutenberg) integration */
.wp-block-group__inner-container {
  display: contents;
}

.wp-block-image:not(.hero-image):not(.media-panel):not(.card-image) img {
  max-width: 100%;
  height: auto;
  display: block;
}

.hero-image img,
.media-panel img,
.card-image img {
  height: 100%;
}

/* Project lightbox (single project only) */
html.af-lightbox-open {
  overflow: hidden;
}

.af-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.af-lightbox.is-open {
  display: block;
}

.af-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(3px);
}

.af-lightbox__panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 18px;
}

.af-lightbox__figure {
  margin: 0;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.af-lightbox__img {
  max-width: min(1100px, calc(100vw - 120px));
  max-height: min(80vh, 900px);
  width: auto;
  height: auto;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
}

.af-lightbox__caption {
  max-width: min(1100px, calc(100vw - 120px));
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.af-lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 20, 24, 0.65);
  color: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.af-lightbox__nav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 20, 24, 0.65);
  color: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 720px) {
  .af-lightbox__panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
  }

  .af-lightbox__nav {
    display: none;
  }

  .af-lightbox__img,
  .af-lightbox__caption {
    max-width: calc(100vw - 36px);
  }
}

.wp-block-button__link.wp-element-button {
  align-items: center;
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 650;
  justify-content: center;
  letter-spacing: 0.01em;
  line-height: 2rem;
  padding: 1.1rem 1.8rem;
  transition: background var(--t), border-color var(--t), color var(--t);
  user-select: none;
}

/* Mêmes boutons plats que .btn : ni dégradé, ni halo, ni saut au survol. */
.wp-block-button .wp-block-button__link.wp-element-button {
  background: var(--accent);
  color: #fff;
}

.wp-block-button .wp-block-button__link.wp-element-button:hover {
  background: var(--accent-ink);
}

.wp-block-button.is-style-outline .wp-block-button__link.wp-element-button {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.wp-block-button.is-style-outline .wp-block-button__link.wp-element-button:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(20, 20, 22, 0.32);
}
