:root {
  --bg: #342620;
  --fg: #fde9c8;
  --muted: #9cc3fb;
  --accent: #e25e86;
  --beige: #fff;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;
}

/* ===== Fond + frise ===== */
.page-bref {
  min-height: 100dvh;
  position: relative;
}

/* ===== Barre haute ===== */
.topbar {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 2;
}
.back {
  display: inline-block;
  text-decoration: none;
  color: var(--fg);
  border: 1px solid var(--fg);
  border-radius: 28px;
  padding: 8px 18px;
  transition: all 0.25s ease;
}

.back:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== Conteneur principal ===== */
.bref-wrap {
  position: relative;
  z-index: 1;
  height: 100dvh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12vh 4vw 6vh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 2vh;
}
h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* ===== 2 colonnes ===== */
.two-col {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 2vw;
  align-items: stretch; /* IMPORTANT : les deux colonnes prennent la même hauteur */
}

.article p {
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
  text-align: justify;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 1.6vh;
}

/* ===== Cartes ===== */
.card {
  backdrop-filter: blur(2px);
  border-radius: 14px;
  padding: 16px 18px;
}
.card h2 {
  margin: 0.1em 0 0.3em;
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--muted);
}
.card p {
  margin: 0.25em 0;
  color: var(--fg);
  font-size: clamp(14px, 1.2vw, 18px);
}

/* Structure de la grille */

/* Colonne image alignée au bas */
.col-img {
  display: flex;
  flex-direction: column;
  justify-content: center; /* pousse l’image en bas */
}

/* Carte image supprimée, mais structure conservée */
.col-img .card {
  background: none;
  padding: 0;
  box-shadow: none;
  height: auto;
}

/* Image plus haute */
.bref-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* ===== Image ajustée ===== */
.bref-img {
  width: 100%;
  height: auto;
  max-width: 480px; /* augmente la hauteur visuelle */
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Desktop ===== */
@media (min-width: 901px) {
  .bref-wrap {
    padding-top: 10vh;
    padding-bottom: 4vh;
  }
  .card {
    padding: 14px 16px;
  }
}

/* ===== Mobile ===== */
@media (max-width: 900px) {
  .bref-wrap {
    height: auto;
    padding: 16vh 20px 10vh;
    grid-template-rows: auto auto;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .row {
    grid-template-columns: 1fr;
  }
}

/* ========================= */
/* Animations - Page Contact */
/* ========================= */

/* ===== Apparition du titre ===== */
.page-bref h1 {
  opacity: 0;
  transform: translateY(-12px);
  animation: contactTitleIn 600ms ease forwards 100ms;
}
@keyframes contactTitleIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Apparition des cartes (stagger progressif) ===== */
.page-bref .card {
  opacity: 0;
  transform: translateY(10px);
  animation: contactCardIn 420ms ease forwards;
}
.page-bref .col:first-child .card:nth-child(1) {
  animation-delay: 80ms;
}
.page-bref .col:first-child .card:nth-child(2) {
  animation-delay: 160ms;
}
.page-bref .col:first-child .card:nth-child(3) {
  animation-delay: 240ms;
}
.page-bref .col:last-child .card-form {
  animation-delay: 180ms;
}

@keyframes contactCardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Hover cartes ===== */
@media (hover: hover) and (pointer: fine) {
  .page-bref .card {
    transition: transform 220ms ease, box-shadow 220ms ease,
      background 220ms ease;
  }
  .page-bref .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    background: color-mix(in srgb, #000 22%, transparent);
  }
}

/* ===== Bouton animé ===== */
.page-bref .submit-btn {
  transition: transform 140ms ease, box-shadow 200ms ease, background 200ms ease;
  box-shadow: 0 6px 14px rgba(226, 94, 134, 0.25);
}
@media (hover: hover) and (pointer: fine) {
  .page-bref .submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(226, 94, 134, 0.3);
  }
}
.page-bref .submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(226, 94, 134, 0.25);
}

/* ===== Focus doux sur les champs ===== */
.page-bref input,
.page-bref textarea {
  transition: border-color 160ms ease, box-shadow 160ms ease,
    background 160ms ease;
}
.page-bref input:focus,
.page-bref textarea:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

/* ===== Accessibilité ===== */
@media (prefers-reduced-motion: reduce) {
  .page-bref * {
    animation: none !important;
    transition: none !important;
  }
}
