/* Atelier Cryo Bourgogne — page d'attente */

@font-face {
  font-family: "Michroma";
  src: url("../fonts/michroma-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #45484d;
  --field-bg: #34373b;
  --field-border: #6a6e74;
  --line: #5c6066;
  --text: #ffffff;
  --text-soft: #e6e9ec;
  --text-muted: #b9bec4;
  --accent: #3aa8f0;
  --accent-hover: #62bbf4;
  --link: #7cc8f7;
  --link-hover: #b3e0fb;
  --ok: #8fe3b0;
  --error: #ffb3a8;
  --ease-soft: cubic-bezier(0.33, 0, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 24px 32px;
  background: radial-gradient(ellipse 90% 70% at 50% 25%, #585b61 0%, #46494e 55%, #3b3e43 100%);
}

.main {
  width: 100%;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

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

/* Logo seul ; au survol il s'efface en fondu et laisse place au formulaire */
.reveal {
  width: 100%;
  display: grid;
  place-items: center;
}
/* Logo et formulaire superposés dans la même cellule */
.reveal > * { grid-area: 1 / 1; }

.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-soft), filter 0.7s var(--ease-soft);
}
.hero picture { display: block; width: 100%; max-width: 680px; }
.hero:focus-visible picture { outline: 2px solid var(--accent); outline-offset: 12px; border-radius: 4px; }
.hero__logo { display: block; width: 100%; height: auto; }
.hero__title {
  margin: 0;
  max-width: 720px;
  font-family: Michroma, Inter, sans-serif;
  font-weight: 400;
  font-size: clamp(14px, 2vw, 20px);
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.reveal__panel {
  position: relative;
  z-index: 1; /* toujours au-dessus du logo (l'opacité du logo crée un contexte d'empilement) */
  width: 100%;
  display: flex;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-soft), transform 0.5s var(--ease-soft), visibility 0s linear 0.5s;
}
.reveal__panel > .contact { padding-top: 8px; padding-bottom: 8px; }

.hero:hover + .reveal__panel,
.reveal__panel:hover,
.reveal:focus-within .reveal__panel,
.reveal.is-open .reveal__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.6s var(--ease-soft) 0.2s, transform 0.6s var(--ease-soft) 0.2s, visibility 0s;
}
.reveal:has(.hero:hover, .reveal__panel:hover, :focus-within) .hero,
.reveal.is-open .hero {
  opacity: 0;
  transform: scale(0.96);
  filter: blur(6px);
  pointer-events: none;
}

/* Contact */
.contact {
  width: 100%;
  max-width: 560px;
  padding-left: 2px;
  padding-right: 2px; /* laisse respirer le contour de focus */
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form { display: flex; flex-direction: column; gap: 20px; }
.form__field { display: flex; flex-direction: column; gap: 8px; }
.form__field label { font-size: 14px; font-weight: 500; color: var(--text-soft); }

.form input,
.form textarea {
  width: 100%;
  padding: 0 14px;
  height: 48px;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.form textarea {
  height: auto;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 140px;
}
.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.form [aria-invalid="true"] { border-color: var(--error); }

/* Champ anti-spam masqué */
.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

.btn {
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #0e1a24;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
.btn:disabled { opacity: 0.7; cursor: wait; }

.form__status { margin: 0; font-size: 14px; color: var(--text-soft); }
.form__status.is-ok { color: var(--ok); }
.form__status.is-error { color: var(--error); }

/* Pied de page */
.footer {
  width: 100%;
  max-width: 1080px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .page { padding: 40px 20px 24px; }
  .hero { gap: 20px; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
