/* ==========================================================================
   HT EXPERIENCE — site vitrine une page
   Panneaux coulissants (inspiration CodyHouse "Sliding Panels")
   ========================================================================== */

:root {
  --ink: #252525;
  --ink-soft: #5b5b5b;
  --paper: #ffffff;
  --header-bg: #252525;
  --ease: cubic-bezier(0.7, 0, 0.3, 1);
  --dur: 0.7s;
  --font: "Avenir Next", "Segoe UI", Inter, system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html, body { margin: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--header-bg);
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
}

/* Bureau : la page tient exactement dans l'écran (panneaux pleine hauteur).
   Mobile : la page s'allonge librement pour que le footer reste visible. */
@media (min-width: 801px) {
  body { height: 100vh; height: 100svh; }
}

img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

/* ---------- Header ---------- */

.site-header {
  background: var(--header-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(14px, 2.5vh, 28px) 16px;
}

.site-header__logo { margin: 0; line-height: 0; }
.site-header__logo img { width: clamp(220px, 26vw, 360px); }

/* ---------- Panels (desktop) ---------- */

.panels {
  display: flex;
  min-height: 0;
  height: 100%;
  background: var(--header-bg);
  gap: 0;
}

.panel {
  --bg: #f4f4f4;
  --accent: #252525;
  --accent-ink: #ffffff;
  --strip: var(--accent);

  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  background: var(--bg);
  display: grid;
  /* minmax(0, …) : la colonne de contenu fermée ne réserve aucune largeur,
     le logo reste parfaitement centré */
  grid-template-columns: minmax(0, 1fr) minmax(0, 0fr);
  transition: flex-grow var(--dur) var(--ease), grid-template-columns var(--dur) var(--ease);
}

/* Bandeau de couleur de marque en bas de chaque panneau */
.panel::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: var(--strip);
  transform-origin: left;
  transition: height 0.35s ease;
}

.panel + .panel { border-left: 1px solid rgba(0, 0, 0, 0.08); }

/* Survol : le panneau s'élargit légèrement */
@media (hover: hover) and (min-width: 801px) {
  .panels:not(.has-open) .panel:hover { flex-grow: 1.35; }
  .panels:not(.has-open) .panel:hover::after { height: 10px; }
  .panels:not(.has-open) .panel:hover .panel__logo { transform: scale(1.04); }
  .panels:not(.has-open) .panel:hover .panel__more { opacity: 1; transform: none; }
}

/* Ouverture : le panneau actif prend toute la largeur */
.panels.has-open .panel { flex-grow: 0; border-left: 0; }
.panels.has-open .panel.is-open { flex-grow: 1; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }

/* ---------- Trigger (face visible du panneau) ---------- */

.panel__trigger {
  position: relative;
  min-width: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 48px clamp(20px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
}

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

.panel__index {
  position: absolute;
  top: 24px;
  left: 28px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
  opacity: 0.7;
}

.panel__logo {
  width: min(78%, 300px);
  transition: transform 0.5s var(--ease);
}
.panel__logo--tall { width: min(52%, 190px); }

.panel__tagline {
  font-size: clamp(0.95rem, 1.15vw, 1.1rem);
  font-weight: 500;
  color: var(--accent);
  max-width: 24ch;
  line-height: 1.4;
}

.panel__more {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.55;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.panel.is-open .panel__more { opacity: 0; }

/* ---------- Contenu détaillé ---------- */

.panel__content {
  min-width: 0;
  overflow-y: auto;
  padding: clamp(40px, 6vh, 72px) clamp(24px, 5vw, 80px) 56px clamp(8px, 2vw, 32px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
  align-self: center;
  max-height: 100%;
}

.panel.is-open .panel__content {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.5s ease 0.45s, transform 0.5s ease 0.45s, visibility 0s;
}

.panel__eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.panel__title {
  margin: 0 0 20px;
  font-size: clamp(1.6rem, 2.6vw, 2.5rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: 22ch;
  text-wrap: balance;
}

.panel__text {
  margin: 0 0 28px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 62ch;
}

.panel__features {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.panel__features li {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.panel__features strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
  color: var(--ink);
}

.panel__chips {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel__chips li {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

.panel__note {
  margin: 0 0 28px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}

.panel__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------- Bouton fermer ---------- */

.panel__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.6) rotate(-90deg);
  transition: opacity 0.25s ease, transform 0.4s var(--ease), visibility 0s linear 0.25s;
}
.panel__close svg { width: 22px; height: 22px; stroke: var(--accent-ink); stroke-width: 2.2; stroke-linecap: round; fill: none; }
.panel__close:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.panel.is-open .panel__close {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s ease 0.5s, transform 0.5s var(--ease) 0.5s, visibility 0s;
}

/* ---------- Couleurs de chaque marque ---------- */

.panel--nolime {
  --bg: #f4f1fd;
  --accent: #5b3fc4;
  --strip: linear-gradient(90deg, #366efb 0 33.3%, #8d67e4 33.3% 66.6%, #25a382 66.6%);
}

.panel--6angles {
  --bg: #eaf3f9;
  --accent: #242e7c;
  --strip: linear-gradient(180deg, #242e7c 0 50%, #e30613 50%);
}

.panel--acry {
  --bg: #fff5ee;
  --accent: #29235c;
  --strip: linear-gradient(90deg, #fbb816 4%, #eb5b3a 25%, #e71e72 50%, #46aee3 75%, #64bead 100%);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--header-bg);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding: 12px 16px;
}
.site-footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ==========================================================================
   Mobile & tablette : panneaux empilés
   ========================================================================== */

@media (max-width: 800px) {
  .panels { flex-direction: column; height: auto; }

  .panel {
    flex: none;
    grid-template-columns: 1fr;
    min-height: 34vh;
  }
  .panel + .panel { border-left: 0; border-top: 1px solid rgba(0, 0, 0, 0.08); }

  .panel__trigger { padding: 40px 20px; gap: 16px; }
  .panel__logo { width: min(64%, 240px); }
  .panel__logo--tall { width: min(40%, 150px); }
  .panel__more { opacity: 0.8; transform: none; }

  /* Ouvert : seul le panneau actif reste, le contenu se déroule dessous */
  .panels.has-open .panel:not(.is-open) { display: none; }
  .panels.has-open .panel.is-open { grid-template-columns: 1fr; min-height: 100%; }

  .panel.is-open .panel__trigger { padding: 64px 20px 8px; cursor: default; }
  .panel.is-open .panel__logo { width: min(48%, 180px); }
  .panel.is-open .panel__logo--tall { width: min(30%, 110px); }
  .panel.is-open .panel__tagline { display: none; }
  .panel.is-open .panel__more { display: none; }

  .panel__content {
    display: none;
    padding: 16px 20px 48px;
    transform: none;
    max-height: none;
    overflow: visible;
  }
  .panel.is-open .panel__content { display: block; transition: opacity 0.4s ease 0.05s; }

  .panel.is-open .panel__close { transition-delay: 0.05s; }
}

/* Accessibilité : pas d'animation si l'utilisateur la refuse */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}

/* Footer mobile : copyright sur une ligne, liens dessous */
@media (max-width: 520px) {
  .site-footer > span { flex-basis: 100%; text-align: center; }
}
