/* =================================================================
   l'hexode. & altoris. — vitrine duale
   Identité issue de la planche de marque : Archivo, encre/papier,
   l'orange réservé à l'accent du logotype.
   ================================================================= */

:root {
  --ink: #141414;
  --paper: #faf9f6;
  --line: #e5e2dc;
  --muted: #8a867e;
  --muted-dark: #7a7a7a;
  --accent: #ff5a36;

  /* Couture oblique : abscisses du haut (--t) et du bas (--b).
     Tout le jeu d'états ne fait que déplacer ces deux points. */
  --t: 58%;
  --b: 42%;

  --ease: cubic-bezier(0.77, 0, 0.18, 1);
  --dur: 0.75s;
}

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

html, body { height: 100%; }

body {
  font-family: "Archivo", sans-serif;
  font-weight: 400;
  background: var(--ink);
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- États de la couture ---------- */
body[data-state="hexode"]  { --t: 100%; --b: 100%; }
body[data-state="altoris"] { --t: 0%;   --b: 0%; }

/* Survol en état neutre : la couture glisse vers le côté délaissé */
@media (hover: hover) and (min-width: 761px) {
  body[data-state="idle"] .split:has(.panel--hexode:hover)  { --t: 65%; --b: 49%; }
  body[data-state="idle"] .split:has(.panel--altoris:hover) { --t: 51%; --b: 35%; }
}

.split {
  position: fixed;
  inset: 0;
  --t: inherit;
}

/* ---------- Panneaux ---------- */
.panel {
  position: absolute;
  inset: 0;
  transition: clip-path var(--dur) var(--ease);
}

.panel--hexode {
  background: var(--paper);
  color: var(--ink);
  clip-path: polygon(0 0, var(--t) 0, var(--b) 100%, 0 100%);
}

.panel--altoris {
  background: var(--ink);
  color: var(--paper);
  clip-path: polygon(var(--t) 0, 100% 0, 100% 100%, var(--b) 100%);
}

body[data-state="idle"] .panel { cursor: pointer; }

/* ---------- Contenu neutre (logotypes) ---------- */
.panel__idle {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  place-content: center;
  gap: 1.4rem;
  text-align: center;
  padding: 24px;
  transition: opacity 0.45s var(--ease) 0.25s, transform var(--dur) var(--ease), visibility 0s;
}

.panel--hexode  .panel__idle { transform: translateX(-25%); }
.panel--altoris .panel__idle { transform: translateX(25%); }

body:not([data-state="idle"]) .panel__idle {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), transform var(--dur) var(--ease), visibility 0s 0.3s;
}

/* ---------- Logotypes ---------- */
.wm {
  font-weight: 500;
  font-size: clamp(42px, 6.4vw, 82px);
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.wm--small { font-size: clamp(34px, 4.6vw, 56px); }

.dot { color: var(--accent); }
.dot--ink { color: currentColor; } /* altoris : l'o étoile porte l'accent, le point reste encre */
.star { color: var(--accent); }

.suf {
  font-weight: 400;
  font-size: 0.24em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 0.9em;
  vertical-align: baseline;
}

.panel--altoris .suf { color: var(--muted-dark); }

.kicker {
  font-family: "Chivo Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel--altoris .kicker { color: var(--muted-dark); }

/* ---------- Bouton découvrir ---------- */
.discover {
  font-family: "Chivo Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  padding: 13px 26px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  margin-top: 0.4rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.discover__arrow { transition: transform 0.25s var(--ease); }

.panel--hexode  .discover:hover { background: var(--ink); color: var(--paper); }
.panel--altoris .discover:hover { background: var(--paper); color: var(--ink); }
.panel:hover .discover__arrow { transform: translateX(4px); }

/* ---------- Contenu déplié ---------- */
.panel__full {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s 0.3s;
}

body[data-state="hexode"]  .panel--hexode  .panel__full,
body[data-state="altoris"] .panel--altoris .panel__full {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s var(--ease) 0.35s, visibility 0s;
}

.panel__inner {
  max-width: 640px;
  display: grid;
  gap: 1.6rem;
}

body[data-state="hexode"] .panel__inner > *,
body[data-state="altoris"] .panel__inner > * {
  animation: rise 0.6s var(--ease) both;
}

.panel__inner > :nth-child(2) { animation-delay: 0.42s; }
.panel__inner > :nth-child(3) { animation-delay: 0.5s; }
.panel__inner > :nth-child(4) { animation-delay: 0.58s; }
.panel__inner > :nth-child(5) { animation-delay: 0.66s; }
.panel__inner > :nth-child(6) { animation-delay: 0.74s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.lead {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
  max-width: 34em;
}

.facts {
  list-style: none;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.panel--altoris .facts { border-top-color: #2a2a2a; }

.facts li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.panel--altoris .facts li { border-bottom-color: #2a2a2a; }

.facts__k {
  font-family: "Chivo Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel--altoris .facts__k { color: var(--muted-dark); }

.contact {
  font-family: "Chivo Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  justify-self: start;
  transition: color 0.2s;
}

.contact:hover { color: var(--accent); }

.legal {
  font-family: "Chivo Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.panel--altoris .legal { color: var(--muted-dark); }

/* ---------- Bouton retour ---------- */
.close {
  position: absolute;
  top: max(22px, env(safe-area-inset-top));
  left: 22px;
  width: 46px;
  height: 46px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.panel--hexode  .close:hover { background: var(--ink); color: var(--paper); }
.panel--altoris .close:hover { background: var(--paper); color: var(--ink); }

/* ---------- Signature sur la couture ---------- */
.seam-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  writing-mode: vertical-rl;
  font-family: "Chivo Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper);
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.3s var(--ease);
}

body:not([data-state="idle"]) .seam-mark { opacity: 0; }

/* =================================================================
   Mobile : la couture devient horizontale, toujours oblique
   ================================================================= */
@media (max-width: 760px) {
  :root { --t: 56%; --b: 44%; }

  body[data-state="hexode"]  { --t: 100%; --b: 100%; }
  body[data-state="altoris"] { --t: 0%;   --b: 0%; }

  .panel--hexode {
    clip-path: polygon(0 0, 100% 0, 100% var(--b), 0 var(--t));
  }

  .panel--altoris {
    clip-path: polygon(0 var(--t), 100% var(--b), 100% 100%, 0 100%);
  }

  .panel--hexode  .panel__idle { transform: translateY(-24%); }
  .panel--altoris .panel__idle { transform: translateY(24%); }

  .wm { font-size: clamp(34px, 10vw, 48px); }
  .wm--small { font-size: clamp(28px, 8vw, 40px); }

  .panel__idle { gap: 1rem; }

  .panel__full {
    place-items: start center;
    padding-top: max(84px, calc(env(safe-area-inset-top) + 64px));
    overflow-y: auto;
  }

  .panel__inner { gap: 1.2rem; }

  .facts li { grid-template-columns: 96px 1fr; gap: 12px; }

  .seam-mark {
    writing-mode: horizontal-tb;
    letter-spacing: 0.24em;
  }
}

/* ---------- Accessibilité ---------- */
@media (prefers-reduced-motion: reduce) {
  .panel, .panel__idle, .panel__full, .seam-mark { transition-duration: 0.01s; }
  .panel__inner > * { animation: none; }
  .discover__arrow { transition: none; }
}

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