/* ==========================================================
   Malys — page « Site web en construction »
   ========================================================== */

@font-face {
  font-family: "Clash Grotesk";
  src: url("../fonts/clash-grotesk-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #091734;
  --red: #c4161e;
  --red-dark: #a8121a;
  --gray: #686c6e;
  --cream: #fbf9f5;
  --mist: #f6f9fd;
  --line: rgba(170, 170, 170, 0.3);
  --white: #ffffff;

  --font-title: "Clash Grotesk", system-ui, sans-serif;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--white);
  color: var(--gray);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px 30px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Light strip that sits behind the bottom of the contact card */
.hero-shape {
  position: absolute;
  left: 0;
  bottom: -5px;
  z-index: -1;
  width: 100%;
  height: 235px;
  background: var(--mist);
}

.container {
  width: 100%;
  max-width: 1350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 53px;
  animation: rise 0.9s var(--ease) both;
}

/* ---------- Title ---------- */
.title {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.logo { width: 417px; height: auto; }

.title h1 {
  margin: 0;
  color: var(--cream);
  font-family: var(--font-title);
  font-size: 80px;
  font-weight: 600;
  letter-spacing: -2px;
  line-height: 1.15;
}

.title p {
  margin: 0;
  color: var(--white);
}

/* ---------- Contact card ---------- */
.card {
  width: 100%;
  max-width: 1140px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 100px;
  padding: 64px;
  background: var(--white);
  border-radius: 32px;
}

.details {
  flex: 1 1 0;
  max-width: 405px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.detail {
  display: flex;
  align-items: center;
  gap: 24px;
}

.detail-icon { flex: none; color: var(--red); }
.detail-icon--pin { width: 29px; height: 37px; }
.detail-icon--phone { width: 29px; height: 29px; }

.detail-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: rise-sm 0.8s var(--ease) 0.35s both;
}

.detail h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.4;
}

.detail p { margin: 0; }

.detail a {
  color: var(--gray);
  text-decoration: none;
}
.detail a:hover { text-decoration: underline; text-underline-offset: 3px; }

.divider { display: none; }

/* ---------- Form ---------- */
.form {
  flex: 1 1 0;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 44px;
  animation: rise-sm 0.8s var(--ease) 0.45s both;
}

.field { display: block; }

.field input,
.field textarea {
  width: 100%;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  transition: border-color 0.2s;
}
.field textarea {
  min-height: 100px;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--gray); opacity: 1; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--navy);
}
.field.has-error input,
.field.has-error textarea { border-bottom-color: var(--red); }

.field-error {
  display: block;
  margin-top: 6px;
  color: var(--red);
  font-size: 14px;
  line-height: 1.4;
}
.field-error:empty { display: none; }

.btn {
  width: 100%;
  padding: 12px 30px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.7;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.form-status {
  margin: -24px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--navy);
}
.form-status:empty { display: none; }
.form-status.is-error { color: var(--red); }

.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;
}

/* Hidden honeypot field against spam bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------- Entrance ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise-sm {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Tablet (810px – 1199px) ---------- */
@media (max-width: 1199.98px) {
  .hero { padding: 80px 30px; }
  .container { gap: 50px; }
  .title h1 { font-size: 56px; }
  .card { gap: 64px; padding: 48px; }
}

/* ---------- Phone (< 810px) ---------- */
@media (max-width: 809.98px) {
  .hero { padding: 48px 20px; }
  .hero-bg { object-position: center bottom; }
  .container { gap: 40px; }
  .logo { width: 211px; }
  .title h1 { font-size: 36px; }

  .card {
    flex-direction: column;
    align-items: stretch;
    gap: 48px;
    padding: 32px;
    border-radius: 16px;
  }
  .details,
  .form { flex: none; width: 100%; max-width: none; }

  .detail { align-items: flex-start; }
  .detail-icon { display: none; }
  .detail h2 { font-size: 24px; }

  .divider {
    display: block;
    width: 100%;
    height: 1px;
    margin: 0;
    border: 0;
    background: rgba(196, 22, 30, 0.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .container,
  .detail-text,
  .form { animation: none; }
  .btn { transition: none; }
}
