/* =========================================================
   TiraMaison — Structure : container, en-tête, pied de page
   ========================================================= */

.tm-container {
  width: min(100% - (var(--tm-gutter) * 2), var(--tm-container));
  margin-inline: auto;
}

.tm-section { padding-block: var(--tm-section-y); }
.tm-section--tight { padding-block: clamp(32px, 3.4vw, 48px); }
.tm-section--cream { background: var(--tm-cream); }
.tm-section--white { background: var(--tm-white); }
.tm-section--soft { background: var(--tm-yellow-soft); }
.tm-section--dark { background: var(--tm-ink); color: var(--tm-on-dark); }

.tm-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.tm-section__head p { color: var(--tm-muted); margin-top: 8px; max-width: 62ch; }

/* =========================================================
   Bandeau d'annonce
   ========================================================= */
.tm-topbar {
  background: var(--tm-yellow);
  color: var(--tm-ink);
  min-height: var(--tm-topbar-h);
  display: grid;
  place-items: center;
  font-size: var(--tm-fs-topbar);
  font-weight: 600;
  letter-spacing: -0.005em;
  padding-inline: 16px;
}
.tm-topbar__inner {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: center;
}
.tm-topbar svg { width: 18px; height: 18px; flex: none; }

/* =========================================================
   En-tête
   ========================================================= */
.tm-header {
  position: sticky;
  top: 0;
  z-index: var(--tm-z-header);
  background: var(--tm-ink);
  color: var(--tm-white);
}
.tm-header__inner {
  height: var(--tm-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tm-logo { display: inline-flex; align-items: center; flex: none; }
.tm-logo img { height: 48px; width: auto; }

.tm-nav__list {
  display: flex;
  align-items: center;
  gap: 32px;
}
.tm-nav__list a {
  font-size: var(--tm-fs-nav);
  font-weight: 500;
  color: #ebe9e5;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
  transition: color var(--tm-t), border-color var(--tm-t);
}
.tm-nav__list a:hover { color: var(--tm-white); }
.tm-nav__list a[aria-current="page"] {
  color: var(--tm-yellow);
  border-bottom-color: var(--tm-yellow);
}

.tm-header__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.tm-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--tm-r-sm);
  font-size: var(--tm-fs-nav);
  font-weight: 500;
  color: var(--tm-white);
  cursor: pointer;
  transition: background var(--tm-t);
}
.tm-cart-btn:hover { background: rgba(255, 255, 255, 0.09); }
.tm-cart-btn svg { width: 22px; height: 22px; }
.tm-cart-btn__count { font-variant-numeric: tabular-nums; }
.tm-cart-btn.is-bump { animation: tm-bump 420ms ease; }

@keyframes tm-bump {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.14); }
}

.tm-burger {
  display: none;
  /* 44 px : taille de cible tactile confortable au pouce. */
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: var(--tm-r-sm);
  cursor: pointer;
  color: var(--tm-white);
  margin-left: -8px;
}
.tm-burger:hover { background: rgba(255, 255, 255, 0.09); }
.tm-burger svg { width: 26px; height: 26px; }

/* ---- Tiroir mobile ---- */
.tm-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--tm-z-drawer);
  display: grid;
  grid-template-columns: minmax(0, 340px) 1fr;
  visibility: hidden;
}
.tm-drawer.is-open { visibility: visible; }
.tm-drawer__scrim {
  grid-column: 1 / -1;
  grid-row: 1;
  background: rgba(10, 10, 10, 0.55);
  opacity: 0;
  transition: opacity var(--tm-t);
}
.tm-drawer.is-open .tm-drawer__scrim { opacity: 1; }
.tm-drawer__panel {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  background: var(--tm-ink);
  color: var(--tm-white);
  padding: 18px 22px 32px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tm-drawer.is-open .tm-drawer__panel { transform: none; }
.tm-drawer__top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.tm-drawer__close {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--tm-r-sm);
  cursor: pointer;
}
.tm-drawer__close:hover { background: rgba(255, 255, 255, 0.1); }
.tm-drawer__close svg { width: 24px; height: 24px; }
.tm-drawer nav a {
  display: block;
  padding: 14px 4px;
  font-size: 19px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.tm-drawer nav a[aria-current="page"] { color: var(--tm-yellow); }
.tm-drawer__cta { margin-top: 22px; }
.tm-drawer__meta {
  margin-top: auto;
  padding-top: 26px;
  font-size: var(--tm-fs-sm);
  color: var(--tm-muted-dark);
  display: grid;
  gap: 6px;
}

/* =========================================================
   Pied de page
   ========================================================= */
.tm-footer { background: var(--tm-ink); color: var(--tm-on-dark); }

.tm-footer__pro {
  border-bottom: 1px solid var(--tm-line-dark);
  padding-block: 22px;
}
.tm-footer__pro-inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 38px);
}
.tm-footer__pro-title {
  font-size: clamp(21px, 1.95vw, 25px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
  flex: none;
  max-width: 15ch;
}
.tm-perks {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
}
.tm-perk {
  flex: 1;
  min-width: 0;
  padding-inline: clamp(10px, 1.4vw, 20px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: var(--tm-fs-sm);
  line-height: 1.3;
  color: var(--tm-on-dark);
}
.tm-perk + .tm-perk { border-left: 1px solid var(--tm-line-dark); }
.tm-perk svg { width: 26px; height: 26px; color: var(--tm-yellow); }
.tm-perk b { display: block; font-size: 16px; font-weight: 800; }
.tm-footer__pro-cta { flex: none; display: grid; justify-items: center; gap: 8px; }
.tm-footer__pro-cta small { font-size: 11.5px; color: var(--tm-muted-dark); }

.tm-footer__main {
  padding-block: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.tm-footer__brand { display: flex; align-items: center; gap: 16px; }
.tm-footer__brand img { height: 42px; width: auto; }
.tm-footer__tag {
  font-style: italic;
  font-size: var(--tm-fs-sm);
  color: var(--tm-muted-dark);
  letter-spacing: 0.01em;
}
.tm-footer__right { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.tm-socials { display: flex; align-items: center; gap: 14px; }
.tm-socials a {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: var(--tm-r-xs);
  color: var(--tm-on-dark);
  transition: color var(--tm-t), background var(--tm-t);
}
.tm-socials a:hover { color: var(--tm-yellow); background: rgba(255, 255, 255, 0.08); }
.tm-socials svg { width: 19px; height: 19px; }

.tm-legal {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #d9d5cd;
}
.tm-legal a:hover { color: var(--tm-yellow); }
.tm-legal .tm-legal__sep { color: #56534e; }
.tm-legal a[data-admin] { text-decoration: underline; text-underline-offset: 3px; }

.tm-footer__nav {
  border-top: 1px solid var(--tm-line-dark);
  padding-block: 30px 34px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 26px 22px;
}
.tm-footer__col h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--tm-yellow);
  margin-bottom: 12px;
  font-weight: 700;
}
.tm-footer__col ul { display: grid; gap: 9px; }
.tm-footer__col a { font-size: var(--tm-fs-sm); color: #d9d5cd; }
.tm-footer__col a:hover { color: var(--tm-white); }

/* ---- Responsive structure ---- */
@media (max-width: 1080px) {
  .tm-nav__list { gap: 22px; }
  .tm-footer__pro-inner { flex-wrap: wrap; }
  .tm-footer__pro-title { max-width: none; flex: 1 1 100%; }
}

@media (max-width: 900px) {
  .tm-burger { display: inline-flex; }
  .tm-header__nav { display: none; }
  .tm-header__inner { justify-content: space-between; }
  .tm-logo { position: absolute; left: 50%; transform: translateX(-50%); }
  .tm-logo img { height: 42px; }
  .tm-header__inner { position: relative; }
  .tm-cart-btn { padding: 8px; gap: 6px; }
  .tm-cart-btn__label { display: none; }

  .tm-perks { flex-wrap: wrap; gap: 18px 0; }
  .tm-perk { flex: 1 1 45%; }
  .tm-perk:nth-child(odd) { border-left: 0; }
  .tm-footer__pro-cta { flex: 1 1 100%; justify-items: stretch; }
  .tm-footer__main { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .tm-topbar { font-size: 12.5px; }
  .tm-topbar__inner { gap: 7px; }
  .tm-footer__right { flex-direction: column; align-items: flex-start; gap: 16px; }
}
