/* =========================================================
   LUM. Là où demain commence.
   Feuille de base : variables, typographie, composants communs
   ========================================================= */

/* ---------- Police Aptos ----------
   Aptos est une police propriétaire Microsoft. Dès que la licence web
   est réglée, déposer les fichiers dans assets/fonts/ et activer le bloc
   ci dessous. En attendant, la pile de secours prend le relais.

@font-face {
  font-family: "Aptos";
  src: url("../assets/fonts/Aptos.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aptos";
  src: url("../assets/fonts/Aptos-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
*/

:root {
  /* Palette */
  --ivoire: #F1ECE6;
  --sable: #D8CEC3;
  --taupe: #C5B8AB;
  --terre: #AC9A8B;
  --brun: #6C5D4D;
  --profondeur: #2B231B;

  /* Typographie */
  --font: Aptos, Calibri, "Segoe UI", system-ui, sans-serif;
  --tracking-title: 0.14em;
  --tracking-label: 0.22em;

  /* Rythme */
  --container: 1180px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section: clamp(4rem, 10vw, 7.5rem);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--profondeur);
  background: var(--ivoire);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

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

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

/* ---------- Titres ---------- */

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-title);
}

h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
h4 { font-size: 0.95rem; }

p {
  margin: 0 0 1.25rem;
}

.lead {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  color: var(--brun);
  max-width: 46ch;
}

.label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--terre);
  margin-bottom: 1rem;
}

.muted {
  color: var(--brun);
}

.note {
  font-size: 0.9rem;
  color: var(--brun);
  border-left: 2px solid var(--taupe);
  padding-left: 1rem;
  max-width: 70ch;
}

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

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

.section.is-sable {
  background: var(--sable);
}

.section.is-dark {
  background: var(--profondeur);
  color: var(--ivoire);
}

.section.is-dark .label {
  color: var(--taupe);
}

.section.is-dark .lead,
.section.is-dark .muted {
  color: var(--taupe);
}

.section-head {
  max-width: 60ch;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head.is-centered {
  margin-inline: auto;
  text-align: center;
}

.section-head.is-centered .lead {
  margin-inline: auto;
}

.grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.rule {
  border: 0;
  border-top: 1px solid var(--taupe);
  margin: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--profondeur);
  border-radius: var(--radius);
  background: var(--profondeur);
  color: var(--ivoire);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn:hover {
  background: var(--terre);
  border-color: var(--terre);
  color: var(--ivoire);
  transform: translateY(-1px);
}

.btn.is-ghost {
  background: transparent;
  color: var(--profondeur);
}

.btn.is-ghost:hover {
  background: var(--profondeur);
  color: var(--ivoire);
  border-color: var(--profondeur);
}

.btn.is-light {
  background: var(--ivoire);
  border-color: var(--ivoire);
  color: var(--profondeur);
}

.btn.is-light:hover {
  background: var(--taupe);
  border-color: var(--taupe);
  color: var(--profondeur);
}

.btn.is-light-ghost {
  background: transparent;
  border-color: var(--taupe);
  color: var(--ivoire);
}

.btn.is-light-ghost:hover {
  background: var(--ivoire);
  border-color: var(--ivoire);
  color: var(--profondeur);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--profondeur);
  border-bottom: 1px solid var(--taupe);
  padding-bottom: 0.3rem;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.link-arrow::after {
  content: "\2192";
  font-size: 1rem;
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover {
  color: var(--terre);
  border-color: var(--terre);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- Logo ----------
   Le logo est construit en HTML : le mot LUM suivi d'une marque
   graphique (avant toit + battant vertical). La même structure est
   réutilisée dans l'animation d'entrée, où le battant pivote.
*/

.logo {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.08em;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--profondeur);
}

.logo:hover {
  color: var(--profondeur);
}

.logo-word {
  display: block;
  line-height: 0.78;
}

.logo-mark {
  position: relative;
  display: block;
  width: 0.62em;
  height: 0.98em;
  flex: none;
}

.logo-eave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.logo-eave polygon,
.logo-eave rect {
  fill: currentColor;
}

.logo-door {
  position: absolute;
  left: 80%;
  top: 14%;
  width: 20%;
  height: 86%;
  background: currentColor;
}

.logo.is-light {
  color: var(--ivoire);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 236, 230, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(197, 184, 171, 0.5);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  margin-inline: auto;
  background: var(--profondeur);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

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

.site-nav a {
  display: inline-block;
  padding: 0.4rem 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brun);
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

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

@media (max-width: 899px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ivoire);
    border-bottom: 1px solid var(--taupe);
    padding: 1rem var(--gutter) 1.5rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }

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

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

  .site-nav a {
    display: block;
    padding: 0.75rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(197, 184, 171, 0.4);
  }

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

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }
}

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

.site-footer {
  background: var(--profondeur);
  color: var(--taupe);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(197, 184, 171, 0.25);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand .logo {
  margin-bottom: 1.25rem;
}

.footer-claim {
  font-size: 1.15rem;
  color: var(--ivoire);
  letter-spacing: 0.04em;
  margin: 0;
}

.footer-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--terre);
  margin: 0 0 1rem;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-list a:hover {
  color: var(--ivoire);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--terre);
}

.footer-bottom ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.footer-bottom a:hover {
  color: var(--ivoire);
}

/* ---------- Apparition au défilement (discrète) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Accessibilité ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
