/* ============================================================
   STUDIO ALBATEST — version essentielle
   Démonstration — DEVALEX
   ============================================================
   Sommaire
   01. Variables & reset
   02. Base & utilitaires
   03. Boutons
   04. Header
   05. Hero
   06. À propos
   07. Services & processus (cartes)
   08. Projets
   09. Témoignage
   10. Contact & formulaire
   11. Footer
   12. Animations d'apparition
   13. Responsive
   14. prefers-reduced-motion
   ============================================================ */

/* ============ 01. VARIABLES & RESET ============ */
:root {
  --ivory: #f1eee7;
  --sand: #ded5c6;
  --ink: #1c1b19;
  --black: #11110f;
  --brown: #65584c;
  --champagne: #b7a184;
  --white-warm: #faf8f3;
  --line-dark: rgba(28, 27, 25, 0.18);
  --line-light: rgba(255, 255, 255, 0.18);

  --font-title: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(1.25rem, 4vw, 3rem);
  --section-gap: clamp(4rem, 9vh, 7rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  overflow-x: hidden;
}

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

ul,
ol {
  list-style: none;
}

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

button,
select {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

section[id] {
  scroll-margin-top: 5.5rem;
}

::selection {
  background: var(--champagne);
  color: var(--black);
}

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

/* ============ 02. BASE & UTILITAIRES ============ */
h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 500;
  line-height: 1.12;
}

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

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

.section--tinted {
  background: var(--sand);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.2rem, 5vh, 3.5rem);
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--champagne);
  margin-bottom: 0.9rem;
}

.section-label::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--champagne);
  vertical-align: middle;
  margin-right: 0.8rem;
}

.section-lead {
  margin-top: 1rem;
  color: var(--brown);
}

/* Conteneurs d'images : dégradé de secours si l'image ne charge pas */
figure {
  background: linear-gradient(150deg, #e3dccd 0%, #cdbfa8 60%, #a99478 100%);
}

/* ============ 03. BOUTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.9rem;
  min-height: 48px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border: 1px solid var(--ink);
  border-radius: 2px;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.btn--primary {
  background: var(--ink);
  color: var(--ivory);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--champagne);
  border-color: var(--champagne);
  color: var(--black);
}

.btn--ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ivory);
}

.btn--small {
  padding: 0.55rem 1.2rem;
  min-height: 40px;
  font-size: 0.7rem;
}

/* ============ 04. HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(241, 238, 231, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.header.is-scrolled {
  border-bottom-color: var(--line-dark);
  box-shadow: 0 6px 24px rgba(28, 27, 25, 0.06);
}

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

.header__logo {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  white-space: nowrap;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.header__nav a:not(.btn) {
  position: relative;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.35rem 0;
}

.header__nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.header__nav a:not(.btn):hover::after,
.header__nav a:not(.btn):focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  background: none;
  border: 0;
  cursor: pointer;
}

.header__burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  margin-inline: auto;
  background: currentColor;
  transition: transform 0.35s var(--ease), opacity 0.25s;
}

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

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

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

/* ============ 05. HERO ============ */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  color: var(--white-warm);
  overflow: hidden;
  background: linear-gradient(150deg, #4a4137 0%, #1c1b19 100%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(17, 17, 15, 0.72) 0%, rgba(17, 17, 15, 0.35) 65%, rgba(17, 17, 15, 0.25) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-top: 6rem;
  padding-bottom: 6rem;
  max-width: 760px;
}

.hero__kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--champagne);
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.8rem);
  margin-bottom: 1.4rem;
}

.hero__subtitle {
  max-width: 46ch;
  color: rgba(250, 248, 243, 0.88);
  margin-bottom: 2.2rem;
}

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

.hero .btn--primary {
  background: var(--champagne);
  border-color: var(--champagne);
  color: var(--black);
}

.hero .btn--primary:hover,
.hero .btn--primary:focus-visible {
  background: var(--white-warm);
  border-color: var(--white-warm);
}

.hero .btn--ghost {
  color: var(--white-warm);
  border-color: rgba(250, 248, 243, 0.6);
}

.hero .btn--ghost:hover,
.hero .btn--ghost:focus-visible {
  background: var(--white-warm);
  border-color: var(--white-warm);
  color: var(--black);
}

/* ============ 06. À PROPOS ============ */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.about__text h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-bottom: 1.2rem;
}

.about__text > p:not(.section-label) {
  color: var(--brown);
  max-width: 54ch;
}

.about__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem 2rem;
  margin-top: 2.2rem;
}

.about__facts li {
  font-family: var(--font-title);
  font-size: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-dark);
}

.about__facts li span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--champagne);
  margin-bottom: 0.3rem;
}

.about__media {
  overflow: hidden;
  border-radius: 2px;
}

.about__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ============ 07. SERVICES & PROCESSUS (CARTES) ============ */
.services__grid,
.process__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.card,
.step {
  background: var(--white-warm);
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  padding: 1.8rem 1.6rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.card:hover,
.step:hover {
  transform: translateY(-4px);
  border-color: var(--champagne);
  box-shadow: 0 14px 34px rgba(28, 27, 25, 0.08);
}

.card__num {
  display: block;
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--champagne);
  margin-bottom: 0.9rem;
}

.card h3,
.step h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}

.card p,
.step p {
  font-size: 0.92rem;
  color: var(--brown);
}

/* ============ 08. PROJETS ============ */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.2rem, 3vw, 2.2rem);
}

.project__media {
  overflow: hidden;
  border-radius: 2px;
  margin-bottom: 1.1rem;
}

.project__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.project:hover .project__media img {
  transform: scale(1.05);
}

.project h3 {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.project__meta {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brown);
}

/* ============ 09. TÉMOIGNAGE ============ */
.quote {
  background: var(--black);
  color: var(--white-warm);
}

.quote__block {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.quote__block p {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.4;
}

.quote__block cite {
  display: block;
  margin-top: 1.8rem;
  font-style: normal;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--champagne);
}

/* ============ 10. CONTACT & FORMULAIRE ============ */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.contact__list li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1.2rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--font-title);
  font-size: 1.15rem;
}

.contact__list li span {
  font-family: var(--font-body);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--champagne);
}

.contact__list a:hover,
.contact__list a:focus-visible {
  color: var(--brown);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact__list .contact__demo {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--brown);
  border-bottom: 0;
  padding-top: 1.4rem;
}

.form {
  position: relative;
  background: var(--white-warm);
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  padding: clamp(1.4rem, 3vw, 2.4rem);
}

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

.field {
  margin-bottom: 1.2rem;
}

.field label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brown);
  margin-bottom: 0.5rem;
}

.field label em {
  font-style: normal;
  color: var(--champagne);
}

.field label small {
  text-transform: none;
  letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  font: inherit;
  color: inherit;
  background: var(--ivory);
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  transition: border-color 0.3s;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2365584c' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brown);
  outline: none;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--champagne);
  outline-offset: 2px;
}

.ferror {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: #9c3b2e;
}

.form__submit {
  width: 100%;
  cursor: pointer;
}

.form__submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.form__note {
  margin-top: 0.9rem;
  font-size: 0.74rem;
  color: var(--brown);
  text-align: center;
  opacity: 0.8;
}

.form__success {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.form__success h3 {
  font-size: 1.7rem;
  margin-bottom: 0.8rem;
}

.form__success p {
  color: var(--brown);
  max-width: 44ch;
  margin-inline: auto;
}

/* ============ 11. FOOTER ============ */
.footer {
  background: var(--black);
  color: var(--white-warm);
  padding: clamp(2.8rem, 6vh, 4.5rem) 0 1.8rem;
}

.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--line-light);
}

.footer__logo {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  margin-bottom: 0.9rem;
}

.footer__tagline {
  font-size: 0.84rem;
  line-height: 1.85;
  color: rgba(250, 248, 243, 0.6);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  align-items: start;
}

.footer__nav a {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.3rem 0;
  transition: color 0.3s;
}

.footer__nav a:hover,
.footer__nav a:focus-visible {
  color: var(--champagne);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  padding-top: 1.6rem;
  font-size: 0.74rem;
  color: rgba(250, 248, 243, 0.55);
}

.footer__bottom a {
  color: var(--champagne);
}

.footer__bottom a:hover,
.footer__bottom a:focus-visible {
  color: var(--white-warm);
}

/* ============ 12. ANIMATIONS D'APPARITION ============ */
/* Les éléments ne sont masqués que si JavaScript est présent */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ 13. RESPONSIVE ============ */
@media (max-width: 900px) {
  .about__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .about__media {
    order: -1;
  }

  .about__media img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 767px) {
  .header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem var(--pad) 1.4rem;
    background: var(--ivory);
    border-bottom: 1px solid var(--line-dark);
    box-shadow: 0 18px 34px rgba(28, 27, 25, 0.1);
    display: none;
  }

  .header__nav.is-open {
    display: flex;
  }

  .header__nav a:not(.btn) {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .header__nav .btn {
    margin-top: 1rem;
  }

  .header__burger {
    display: flex;
  }

  .hero {
    min-height: 72vh;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }

  .form__row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 479px) {
  :root {
    --pad: 1.1rem;
  }

  .about__facts {
    grid-template-columns: 1fr;
  }

  .contact__list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .footer__grid {
    flex-direction: column;
  }
}

/* ============ 14. PREFERS-REDUCED-MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  html.js .reveal {
    opacity: 1;
    transform: none;
  }
}
