/* Page dédiée — guide des tailles Qamis adulte (pleine largeur) */
html.guide-tailles-page,
body.guide-tailles-page {
  background: #faf7f2;
  color: #3d2e22;
}

html.guide-tailles-page {
  --header-h: 5rem;
}

/* Logo header — classe dédiée */
html.guide-tailles-page .guide-tailles-header__logo {
  box-sizing: border-box;
  flex-shrink: 0;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  min-height: 44px;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
}

html.guide-tailles-page .header__brand {
  gap: 0.7rem;
  font-size: 0.84rem;
  letter-spacing: 0.3em;
}

html.guide-tailles-page .header__brand span {
  font-size: inherit;
  letter-spacing: inherit;
}

.guide-tailles-page .header {
  background: rgba(250, 247, 242, 0.92);
  border-bottom: 1px solid rgba(74, 55, 40, 0.08);
}

.guide-tailles {
  padding: calc(var(--header-h, 3.5rem) + 0.5rem) 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
}

.guide-tailles__wrap {
  width: min(100%, 68rem);
  margin: 0 auto;
  padding: 0 clamp(0.85rem, 3vw, 2rem) 1rem;
}

.guide-tailles__topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.guide-tailles__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0.5rem auto 1.15rem;
  text-align: center;
}

html.guide-tailles-page .guide-tailles-mark__logo {
  box-sizing: border-box;
  display: block;
  width: 72px !important;
  height: 72px !important;
  min-width: 72px;
  min-height: 72px;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid rgba(74, 55, 40, 0.1);
}

.guide-tailles__mark span {
  font-family: Cinzel, var(--font-display, Georgia), serif;
  font-size: clamp(0.82rem, 3.5vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: #3d2e22;
}

.guide-tailles__back {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(61, 46, 34, 0.75);
  text-decoration: none;
}

.guide-tailles__back:hover {
  color: #5c452f;
}

.guide-tailles__brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: Cinzel, Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(61, 46, 34, 0.85);
  flex-shrink: 0;
}

.guide-tailles__brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.guide-tailles__brand span {
  font-size: 0.82rem;
}

.guide-tailles__brand--haramein {
  gap: 0.65rem;
}

.guide-tailles__brand--haramein img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: contain;
  border: 1px solid rgba(74, 55, 40, 0.12);
  flex-shrink: 0;
}

.guide-tailles__brand--haramein span {
  font-family: Cinzel, var(--font-display, Georgia), serif;
  font-size: clamp(0.78rem, 3vw, 0.92rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  color: #3d2e22;
}

.guide-tailles__eyebrow {
  margin: 0 0 0.4rem;
  text-align: center;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(74, 55, 40, 0.55);
}

.guide-tailles__title {
  margin: 0 0 1.1rem;
  text-align: center;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 500;
  line-height: 1.35;
  color: #3d2e22;
}

.guide-tailles__tip {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  margin-bottom: 1.75rem;
  border-radius: 12px;
  background: rgba(196, 165, 116, 0.2);
  border: 1px solid rgba(139, 105, 20, 0.14);
  font-size: clamp(0.74rem, 2vw, 0.82rem);
  line-height: 1.55;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.guide-tailles__block {
  margin-bottom: 2rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(74, 55, 40, 0.06);
}

.guide-tailles__block--table {
  border-bottom: none;
}

.guide-tailles__step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(0.88rem, 2.5vw, 1.05rem);
  font-weight: 500;
}

.guide-tailles__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: #5c452f;
  color: #faf7f2;
  font-family: Jost, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* Image à côté du texte */
.guide-tailles__split {
  display: grid;
  grid-template-columns: minmax(108px, 38%) minmax(0, 1fr);
  gap: 0.85rem 1rem;
  align-items: start;
}

.guide-tailles__split--flip {
  grid-template-columns: minmax(0, 1fr) minmax(108px, 38%);
}

.guide-tailles__split--flip .guide-tailles__photo {
  order: 2;
}

.guide-tailles__split--flip .guide-tailles__copy {
  order: 1;
}

.guide-tailles__photo {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fffdfa;
  border: 1px solid rgba(74, 55, 40, 0.08);
  box-shadow: 0 8px 28px rgba(74, 55, 40, 0.07);
  min-height: 0;
}

.guide-tailles__photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(58vh, 500px);
  object-fit: cover;
  object-position: center top;
}

.guide-tailles__photo--wide img {
  object-position: center 35%;
  max-height: min(46vh, 340px);
}

.guide-tailles__copy {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  justify-content: center;
  min-height: 100%;
  padding: 0.15rem 0;
}

.guide-tailles__text {
  margin: 0;
  font-size: clamp(0.76rem, 2.1vw, 0.88rem);
  line-height: 1.65;
  color: rgba(61, 46, 34, 0.9);
}

.guide-tailles__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.55rem;
}

.guide-tailles__pills--length {
  gap: 0.65rem 0.75rem;
}

.guide-tailles__pill-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.guide-tailles__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.85rem;
  min-height: 2.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  background: var(--btn-active-bg, #5c452f);
  border: 1px solid var(--btn-muted-border, rgba(74, 55, 40, 0.35));
  color: var(--btn-muted-text, #faf7f2);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.guide-tailles__pill-sub {
  font-size: 0.65rem;
  color: rgba(61, 46, 34, 0.65);
}

.guide-tailles__note {
  margin: 0;
  font-size: 0.72rem;
  font-style: italic;
  text-align: left;
  color: rgba(61, 46, 34, 0.65);
}

.guide-tailles__sub {
  margin: 0 0 0.85rem;
  font-size: 0.76rem;
  color: rgba(61, 46, 34, 0.72);
}

.guide-tailles__table-hint {
  display: none;
  margin: 0 0 0.45rem;
  font-size: 0.62rem;
  text-align: center;
  color: rgba(61, 46, 34, 0.5);
  letter-spacing: 0.04em;
}

.guide-tailles__table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid rgba(74, 55, 40, 0.12);
  box-shadow: 0 6px 24px rgba(74, 55, 40, 0.08);
  background: #fffdfa;
}

.guide-tailles__table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.58rem, 1.8vw, 0.78rem);
  text-align: center;
  table-layout: fixed;
}

.guide-tailles__table thead {
  background: #5c452f;
  color: #faf7f2;
}

.guide-tailles__table th {
  padding: 0.55rem 0.25rem;
  font-weight: 600;
  line-height: 1.25;
  word-wrap: break-word;
  hyphens: auto;
}

.guide-tailles__table td {
  padding: 0.45rem 0.25rem;
  border-bottom: 1px solid rgba(74, 55, 40, 0.08);
  line-height: 1.3;
  color: rgba(61, 46, 34, 0.88);
}

/* Taille (M/L/XL) + longueur (54–60) — noir gras comme référence */
.guide-tailles__table td:first-child,
.guide-tailles__table td:nth-child(2) {
  color: #000;
  font-weight: 700;
}

.guide-tailles__table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.85);
}

.guide-tailles__table tbody tr:nth-child(odd) {
  background: rgba(250, 247, 242, 0.95);
}

.guide-tailles__footnote {
  margin: 0.65rem 0 0;
  font-size: 0.68rem;
  text-align: center;
  color: rgba(61, 46, 34, 0.6);
}

.guide-tailles__box {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(74, 55, 40, 0.08);
  font-size: 0.78rem;
  line-height: 1.55;
  max-width: 52rem;
}

.guide-tailles__help-link {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(92, 69, 47, 0.35);
  background: #fffdfa;
  color: #5c452f;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.guide-tailles__cta {
  display: block;
  width: 100%;
  max-width: 36rem;
  margin: 1.25rem auto 1.5rem;
  padding: 1rem 1.15rem;
  border: none;
  border-radius: 11px;
  background: #5c452f;
  color: #faf7f2;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.guide-tailles__cta:hover {
  background: #4a3728;
  color: #faf7f2;
}

.guide-tailles__values {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  margin: 0;
  padding: 0 0 1rem;
  list-style: none;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(61, 46, 34, 0.55);
  text-align: center;
}

.guide-tailles__values li span {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

@media (min-width: 720px) {
  .guide-tailles__split {
    grid-template-columns: minmax(200px, 42%) minmax(0, 1fr);
    gap: 1.25rem 2rem;
    align-items: center;
  }

  .guide-tailles__split--flip {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 42%);
  }

  .guide-tailles__photo img {
    max-height: 520px;
  }

  .guide-tailles__photo--wide img {
    max-height: 360px;
  }

  .guide-tailles__table th,
  .guide-tailles__table td {
    padding: 0.65rem 0.45rem;
  }
}

@media (min-width: 960px) {
  .guide-tailles__split {
    grid-template-columns: minmax(240px, 44%) minmax(0, 1fr);
    gap: 1.5rem 2.5rem;
  }

  .guide-tailles__split--flip {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 44%);
  }

  .guide-tailles__table {
    table-layout: auto;
  }

  .guide-tailles__table th {
    white-space: nowrap;
    padding: 0.7rem 0.55rem;
  }
}

/* Mobile — image en haut, texte + pills en dessous (lisible) */
@media (max-width: 719px) {
  .guide-tailles__wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .guide-tailles__topbar {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .guide-tailles__back {
    flex: 1 1 100%;
    font-size: 0.7rem;
    line-height: 1.45;
  }

  html.guide-tailles-page .guide-tailles-header__logo {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px;
    min-height: 42px;
  }

  html.guide-tailles-page .header__brand {
    font-size: 0.78rem;
    letter-spacing: 0.22em;
  }

  html.guide-tailles-page .guide-tailles-mark__logo {
    width: 68px !important;
    height: 68px !important;
    min-width: 68px;
    min-height: 68px;
  }

  .guide-tailles__split,
  .guide-tailles__split--flip {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .guide-tailles__split--flip .guide-tailles__photo,
  .guide-tailles__split--flip .guide-tailles__copy {
    order: unset;
  }

  .guide-tailles__photo img {
    max-height: none;
    width: 100%;
    max-width: min(94vw, 360px);
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
  }

  .guide-tailles__photo--wide img {
    max-width: 100%;
    max-height: min(52vw, 260px);
    object-fit: cover;
  }

  .guide-tailles__photo {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fffdfa;
  }

  .guide-tailles__copy {
    gap: 0.75rem;
  }

  .guide-tailles__text {
    font-size: 0.82rem;
    line-height: 1.6;
  }

  .guide-tailles__pills--length {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem 0.35rem;
    width: 100%;
  }

  .guide-tailles__pill-col {
    width: 100%;
    min-width: 0;
  }

  .guide-tailles__pill-col .guide-tailles__pill {
    width: 100%;
    min-width: 0;
    min-height: 2.65rem;
    padding: 0.45rem 0.25rem;
    font-size: 0.85rem;
  }

  .guide-tailles__pill-sub {
    font-size: 0.64rem;
  }

  .guide-tailles__pills:not(.guide-tailles__pills--length) {
    justify-content: center;
    gap: 0.65rem;
  }

  .guide-tailles__pills:not(.guide-tailles__pills--length) .guide-tailles__pill {
    min-width: 3rem;
    min-height: 3rem;
    font-size: 0.95rem;
  }

  .guide-tailles__table-hint {
    display: block;
  }

  .guide-tailles__table {
    min-width: 34rem;
    font-size: 0.7rem;
    table-layout: auto;
  }

  .guide-tailles__table th,
  .guide-tailles__table td {
    padding: 0.5rem 0.4rem;
    white-space: nowrap;
  }

  .guide-tailles__table-wrap {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 2px;
  }

  .guide-tailles__box {
    font-size: 0.8rem;
  }

  .guide-tailles__cta {
    font-size: 0.74rem;
    padding: 0.95rem 0.85rem;
    letter-spacing: 0.08em;
  }

  .guide-tailles__help-link {
    font-size: 0.74rem;
  }

  .guide-tailles__values {
    gap: 0.85rem 1.25rem;
  }

  .guide-tailles__values li {
    font-size: 0.68rem;
  }
}

@media (max-width: 380px) {
  .guide-tailles__title {
    font-size: 1.12rem;
  }

  .guide-tailles__pill-col .guide-tailles__pill {
    font-size: 0.78rem;
    min-height: 2.45rem;
  }

  .guide-tailles__pill-sub {
    font-size: 0.52rem;
  }
}
