:root {
  --bg: #050505;
  --card: #111111;
  --gold: #f7c948;
  --gold-soft: #ffe08a;
  --cream: #fff7df;
  --muted: #c9c1a8;
  --line: rgba(247, 201, 72, 0.24);
  --line-soft: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: clamp(20px, 4vw, 28px);
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-space: clamp(64px, 10vw, 112px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--cream);
  background:
    radial-gradient(circle at top left, rgba(247, 201, 72, 0.14), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(120, 84, 26, 0.18), transparent 32rem),
    var(--bg);
}

body.lightbox-open {
  overflow: hidden;
}

main,
section,
article,
div,
nav,
form,
label {
  min-width: 0;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1,
h2,
h3 {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

p,
li,
a,
label,
input,
select,
textarea,
button {
  overflow-wrap: anywhere;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

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

section {
  padding-block: var(--section-space);
  scroll-margin-top: 150px;
}

/* En-tête : deux lignes sur mobile, une seule sur ordinateur */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 5, 5, 0.88);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  padding-block: 10px 12px;
}

.logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

.logo strong {
  color: var(--gold);
  font-size: clamp(0.88rem, 4vw, 1.08rem);
  letter-spacing: 0.075em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo span {
  margin-top: 6px;
  color: var(--muted);
  font-size: clamp(0.64rem, 2.8vw, 0.75rem);
  white-space: nowrap;
}

.nav-links {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  width: calc(100% + var(--gutter) + var(--gutter));
  margin-inline: calc(0px - var(--gutter));
  padding-inline: var(--gutter);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  color: var(--muted);
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.88rem;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--gold-soft);
  border-color: var(--line);
  background: rgba(247, 201, 72, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #f09d22);
  box-shadow: 0 14px 34px rgba(247, 201, 72, 0.22);
  color: #191307;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

nav > .btn {
  min-height: 42px;
  padding: 10px 13px;
  font-size: clamp(0.74rem, 3vw, 0.88rem);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(247, 201, 72, 0.3);
}

.btn.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: var(--cream);
}

:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 4px;
}

/* Hero */
.hero {
  display: grid;
  align-items: center;
  min-height: auto;
  padding-block: clamp(42px, 8vw, 88px) var(--section-space);
}

.hero-grid {
  display: grid;
  gap: clamp(30px, 6vw, 56px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-bottom: clamp(18px, 4vw, 24px);
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(247, 201, 72, 0.08);
  color: var(--gold-soft);
  font-size: clamp(0.78rem, 3vw, 0.88rem);
  line-height: 1.35;
}

h1 {
  max-width: 12ch;
  margin-bottom: clamp(20px, 4vw, 28px);
  font-size: clamp(2.55rem, 12vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

h1 span {
  color: var(--gold);
}

.hero p {
  max-width: 65ch;
  margin-bottom: clamp(24px, 5vw, 34px);
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.16rem);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-actions .btn {
  width: 100%;
}

/* Médias */
.media-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow);
}

.media-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.hero-media {
  display: grid;
  grid-template-rows: auto auto;
}

.hero-media > img {
  aspect-ratio: 3 / 2;
}

.floating-card {
  position: relative;
  padding: clamp(18px, 4vw, 24px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 12, 12, 0.96);
}

.floating-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: clamp(1.12rem, 4vw, 1.4rem);
  line-height: 1.3;
}

.floating-card p {
  margin: 0;
  color: var(--cream);
  font-size: clamp(0.9rem, 2.7vw, 0.98rem);
}

.image-signature {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  border: 1px solid rgba(247, 201, 72, 0.35);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: var(--gold-soft);
  font-size: clamp(0.68rem, 2.8vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-transform: lowercase;
}

/* Titres et cartes */
.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: clamp(30px, 6vw, 48px);
}

.section-head h2,
.about-card h2,
.contact-card h2 {
  margin-bottom: 0;
  font-size: clamp(2.15rem, 9vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.section-head p {
  max-width: 64ch;
  margin-bottom: 0;
  color: var(--muted);
}

.services-grid,
.price-wrap,
.portfolio-grid,
.contact-grid,
.about-grid {
  display: grid;
  gap: clamp(16px, 3vw, 24px);
}

.service-card,
.price-card,
.about-card,
.contact-card {
  min-width: 0;
  padding: clamp(20px, 5vw, 30px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.service-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: rgba(247, 201, 72, 0.12);
  color: var(--gold);
  font-size: 1.5rem;
}

.service-card h3,
.price-card h3 {
  margin-bottom: 10px;
  font-size: clamp(1.16rem, 4vw, 1.32rem);
  line-height: 1.3;
}

.service-card p,
.price-card p,
.about-card p,
.contact-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.price-card.featured {
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(247, 201, 72, 0.18), rgba(247, 201, 72, 0.06));
}

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 18px 0 14px;
  color: var(--gold);
  font-size: clamp(3rem, 14vw, 4.25rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.price small {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--cream);
}

.check-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.check-list li::before {
  content: "✓";
  color: var(--gold);
  font-weight: 900;
}

.about-grid {
  align-items: stretch;
}

.about-media {
  aspect-ratio: 4 / 3;
}

.about-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-card h2 {
  margin-bottom: 22px;
}

.about-card p + p {
  margin-top: 16px;
}

/* Portfolio */
.portfolio-item .media-card {
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.protected-image,
.protected-image img,
#portfolio img,
.lightbox img {
  -webkit-user-drag: none;
  user-select: none;
}

/* Contact et formulaire */
.contact-card h2 {
  margin-bottom: 20px;
}

.contact-info {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.contact-info a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-soft);
}

form,
.form-row {
  display: grid;
  gap: 14px;
}

label {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  margin-top: 7px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  outline: none;
  background: rgba(0, 0, 0, 0.32);
  color: var(--cream);
  font-size: 16px;
}

select {
  appearance: auto;
}

input::placeholder,
textarea::placeholder {
  color: #9f9988;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(247, 201, 72, 0.62);
  box-shadow: 0 0 0 4px rgba(247, 201, 72, 0.1);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

form .btn {
  width: 100%;
}


.hidden-field {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.form-status {
  min-height: 1.5em;
  margin: 4px 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.form-status.sending {
  color: var(--muted);
}

.form-status.success {
  color: var(--gold-soft);
}

.form-status.error {
  color: #ffb4b4;
}

form .btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* Pied de page */
footer {
  padding-block: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.footer-inner {
  display: grid;
  gap: 8px;
  text-align: center;
}

.footer-inner p {
  margin-bottom: 0;
}

.footer-signature {
  color: var(--gold-soft);
  font-weight: 700;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 4vw, 32px);
  padding-top: max(72px, env(safe-area-inset-top));
  background: rgba(0, 0, 0, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  border: 1px solid rgba(247, 201, 72, 0.22);
  border-radius: clamp(14px, 3vw, 22px);
  object-fit: contain;
  background: #000;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.75);
}

.lightbox-close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 1001;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(247, 201, 72, 0.35);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.74);
  color: var(--gold-soft);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(247, 201, 72, 0.16);
}

/* Petit mobile */
@media (max-width: 379px) {
  nav > .btn {
    max-width: 128px;
    white-space: normal;
  }

  .logo strong {
    font-size: 0.82rem;
  }

  .logo span {
    font-size: 0.61rem;
  }

  h1 {
    font-size: clamp(2.25rem, 12.5vw, 2.8rem);
  }
}

/* Mobile large et tablette portrait */
@media (min-width: 560px) {
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hero-actions .btn {
    width: auto;
  }

  .services-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  form .btn {
    width: fit-content;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    text-align: left;
  }
}

/* Tablette paysage / petit ordinateur */
@media (min-width: 800px) {
  html {
    scroll-padding-top: 128px;
  }

  section {
    scroll-margin-top: 128px;
  }

  nav {
    gap: 12px 20px;
  }

  .nav-links {
    justify-content: center;
    width: auto;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }

  .nav-links a {
    border-color: transparent;
    background: transparent;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  }

  .hero-media {
    min-height: 520px;
    grid-template-rows: 1fr;
  }

  .hero-media > img {
    aspect-ratio: auto;
    min-height: 520px;
  }

  .floating-card {
    position: absolute;
    right: 22px;
    bottom: 22px;
    left: 22px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background: rgba(5, 5, 5, 0.8);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  .section-head {
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
    align-items: end;
  }

  .section-head p {
    justify-self: end;
  }

  .price-wrap,
  .contact-grid,
  .about-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .about-media {
    aspect-ratio: auto;
    min-height: 560px;
  }
}

/* Ordinateur */
@media (min-width: 1080px) {
  html {
    scroll-padding-top: 92px;
  }

  section {
    scroll-margin-top: 92px;
  }

  nav {
    display: flex;
    min-height: 78px;
    padding-block: 0;
  }

  nav > .btn {
    min-height: 46px;
    padding: 12px 20px;
    font-size: 0.92rem;
  }

  .nav-links {
    flex: 1 1 auto;
    gap: clamp(8px, 1.2vw, 22px);
  }

  .nav-links a {
    min-height: 44px;
    padding-inline: 8px;
    font-size: 0.94rem;
  }

  .hero {
    min-height: calc(100vh - 78px);
    min-height: calc(100svh - 78px);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(440px, 0.98fr);
  }

  .services-grid,
  .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}

/* Très grands écrans */
@media (min-width: 1500px) {
  :root {
    --max: 1320px;
  }

  .hero-media,
  .hero-media > img {
    min-height: 640px;
  }
}

/* Interactions uniquement sur les appareils qui ont un pointeur précis */
@media (hover: hover) and (pointer: fine) {
  .portfolio-item .media-card:hover {
    transform: translateY(-4px);
    border-color: rgba(247, 201, 72, 0.45);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
  }
}

/* Confort d'utilisation pour les personnes sensibles aux animations */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Ajustements de composition pour la navigation et la titraille intermédiaire */
nav > .logo {
  grid-column: 1;
  grid-row: 1;
}

nav > .btn {
  grid-column: 2;
  grid-row: 1;
}

nav > .nav-links {
  grid-row: 2;
}

@media (min-width: 560px) and (max-width: 799px) {
  h1 {
    max-width: 11ch;
    font-size: clamp(3.4rem, 9vw, 4.5rem);
  }
}

@media (min-width: 800px) and (max-width: 1079px) {
  h1 {
    max-width: 10ch;
    font-size: clamp(3.45rem, 6.5vw, 4.4rem);
  }
}

@media (min-width: 1080px) {
  h1 {
    font-size: clamp(4.2rem, 6vw, 5.8rem);
  }
}
