/* =================================
   MED — PAGE SPECIFIC STYLES
================================= */

:root {
  --margin: 40px;
  --gap: 96px;
}


/* =================================
   INTRO — titre gauche / texte droite
================================= */

.med-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 120px var(--margin) 0 var(--margin);
  align-items: start;
}

.med-title {
  margin: 0;
  padding-right: 40px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 96px;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.med-body {
  margin: 0;
  padding-top: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}


/* =================================
   PAGE — image ou vidéo avec marges
================================= */

.med-page {
  margin-top: var(--gap);
  padding: 0 var(--margin);
}

.med-page-img {
  display: block;
  width: 100%;
  height: auto;
}

.med-video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}


/* =================================
   SECTION INSTAGRAM — centrée
================================= */

.med-insta-section {
  margin-top: var(--gap);
  padding: 0 var(--margin);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}


/* =================================
   CARTE INSTAGRAM
================================= */

.med-insta-card {
  display: flex;
  width: 100%;
  max-width: 1100px;
  border: 1px solid #dbdbdb;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}


/* COLONNE GAUCHE — carrousel */

.med-insta-left {
  flex: 1;
  min-width: 0;
  background: #fff;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.med-insta-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.med-insta-slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
}

.med-insta-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.med-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: #262626;
}

.med-carousel-btn--prev { left: 10px; }
.med-carousel-btn--next { right: 10px; }

.med-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 2;
}

.med-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
}

.med-carousel-dot--active {
  background: #262626;
}


/* COLONNE DROITE — UI Instagram */

.med-insta-right {
  width: 420px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #efefef;
  overflow: hidden;
}


/* HEADER */

.med-insta-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #efefef;
  flex-shrink: 0;
}

.med-insta-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.med-insta-header-text {
  flex: 1;
}

.med-insta-names {
  margin: 0;
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

.med-insta-sub {
  margin: 0;
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
  font-size: 11px;
  color: #888;
  line-height: 1.4;
}

.med-insta-dots {
  font-size: 18px;
  letter-spacing: 1px;
  color: #262626;
  cursor: default;
  line-height: 1;
  align-self: flex-start;
  padding-top: 2px;
}


/* CAPTION */

.med-insta-caption {
  display: flex;
  gap: 10px;
  padding: 16px 16px 0 16px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.med-insta-caption-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  align-self: flex-start;
}

.med-insta-caption-content {
  flex: 1;
}

.med-insta-caption-text {
  margin: 0 0 8px 0;
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #262626;
}

.med-insta-time {
  display: block;
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}


/* ACTIONS */

.med-insta-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 4px 16px;
  flex-shrink: 0;
}

.med-insta-actions-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.med-insta-action-icon {
  display: flex;
  align-items: center;
  cursor: default;
}


/* LIKES */

.med-insta-likes {
  margin: 0;
  padding: 0 16px 4px 16px;
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
  font-size: 13px;
  color: #262626;
  line-height: 1.4;
  flex-shrink: 0;
}


/* DATE */

.med-insta-date {
  margin: 0;
  padding: 4px 16px 12px 16px;
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
  font-size: 11px;
  color: #888;
  flex-shrink: 0;
}


/* BARRE COMMENTAIRE */

.med-insta-comment-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid #efefef;
  flex-shrink: 0;
}

.med-insta-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.med-insta-comment-placeholder {
  flex: 1;
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
  font-size: 13px;
  color: #888;
}

.med-insta-publish {
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #0095f6;
  cursor: default;
}


/* =================================
   META — Client / Outils
================================= */

.med-meta {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 88px var(--margin) 100px var(--margin);
}

.med-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.med-meta-label {
  font-family: 'Krub', sans-serif;
  font-weight: 700;
  font-size: 14px;
}

.med-meta-value {
  font-family: 'Krub', sans-serif;
  font-weight: 400;
  font-size: 14px;
}


/* =================================
   MOBILE — max 768px
================================= */

@media (max-width: 768px) {

  :root {
    --margin: 20px;
    --gap: 56px;
  }

  .med-intro {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 96px var(--margin) 0 var(--margin);
  }

  .med-title {
    padding-right: 0;
    font-size: clamp(42px, 11vw, 72px);
    line-height: 0.96;
  }

  .med-body {
    padding-top: 0;
    font-size: clamp(18px, 5vw, 24px);
    line-height: 1.3;
  }

  .med-insta-card {
    flex-direction: column;
    max-width: 100%;
    height: auto;
  }

  .med-insta-left {
    width: 100%;
    aspect-ratio: 4 / 5; /* portrait = ratio naturel de l'image, pas de bandes */
  }

  .med-insta-right {
    width: 100%;
    max-height: none;
  }

  .med-meta {
    gap: 20px;
    padding: 40px var(--margin) 120px var(--margin);
  }

  .med-meta-label,
  .med-meta-value {
    font-size: 11px;
  }

}