/* ==========================================
   LEMIRA - Care page (entretien.html / care-tips.html)
   Load AFTER styles.css: uses its variables
   (--navy, --burgundy, --cream...) and its classes
   (.container, .section-title, .btn, .article-title, .contact-cta).
   ========================================== */

/* ==========================================
   ENTRETIEN, hub des capsules
   ========================================== */
.entretien-intro {
  padding: 4.5rem 0 4rem;
  background-color: var(--cream-light);
}

.entretien-intro-inner {
  max-width: 820px;
}

.entretien-eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--burgundy);
  margin-bottom: 0.75rem;
}

.entretien-lede {
  font-size: var(--text-lg);
  color: #444;
  line-height: 1.7;
  margin-top: 1rem;
}

.entretien-rule {
  margin-top: 2.5rem;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  background-color: var(--burgundy);
  color: var(--cream);
}

.entretien-rule-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.entretien-rule p {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  line-height: 1.25;
}

.entretien-rule--image {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  padding: 0;
  overflow: hidden;
  background-color: #80342b;
}

.entretien-rule--image img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-mask-image: linear-gradient(to right, #000 95%, transparent);
  mask-image: linear-gradient(to right, #000 95%, transparent);
}

.entretien-rule-text {
  padding: 2rem 2.5rem 2rem 1rem;
}

.entretien-rule-text p {
  margin-bottom: 0.75rem;
}

.entretien-rule-text span {
  display: block;
  font-size: var(--text-base);
  line-height: 1.6;
  opacity: 0.85;
}

.entretien-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
  list-style: none;
  counter-reset: chap;
}

.entretien-toc a {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--navy);
  border-radius: 50px;
  font-size: var(--text-sm);
  color: var(--navy);
  text-decoration: none;
  transition: all 0.2s;
}

.entretien-toc a:hover {
  background-color: var(--navy);
  color: var(--white);
}

/* ---------- Chapters ---------- */
.hub-chapter {
  padding: 5rem 0;
  scroll-margin-top: 80px;
}

.hub-chapter--alt {
  background-color: var(--cream-light);
}

.hub-chapter-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 2rem;
  align-items: start;
  max-width: 820px;
  margin-bottom: 2.5rem;
}

.hub-chapter-num {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  line-height: 1;
  color: var(--burgundy);
}

.hub-chapter-head .section-title {
  margin-bottom: 0.75rem;
}

.hub-chapter-head p {
  color: #555;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.hub-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(10, 20, 68, 0.06);
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--white);
  font-family: var(--font-body);
  text-align: left;
  color: inherit;
  cursor: pointer;
  scroll-margin-top: 80px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.hub-card:hover,
.hub-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(10, 20, 68, 0.12);
}

.hub-card:focus-visible {
  outline: 3px solid var(--blue-medium);
  outline-offset: 3px;
}

.hub-card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--blue-light);
}

.hub-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s;
}

.hub-card:hover .hub-card-image img {
  transform: scale(1.04);
}

.hub-card-play {
  position: absolute;
  right: 1rem;
  top: 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  background-color: var(--navy);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 500;
}

.hub-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.hub-card-title {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.hub-card-tags {
  display: block;
  font-size: var(--text-sm);
  color: #777;
  line-height: 1.5;
}

.hub-steps {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Modal ---------- */
body.hub-locked {
  overflow: hidden;
}

.hub-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: rgba(37, 43, 80, 0.75);
  backdrop-filter: blur(4px);
}

.hub-modal[hidden] {
  display: none;
}

.hub-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  max-width: 1020px;
  max-height: calc(100vh - 4rem);
  border-radius: 16px;
  overflow: hidden;
  background-color: var(--white);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.hub-visual {
  position: relative;
  aspect-ratio: 1080 / 1140;
  max-height: calc(100vh - 4rem);
  background-color: var(--blue-light);
  overflow: hidden;
}

.hub-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  animation: hub-fade 0.35s ease;
}

@keyframes hub-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hub-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(10, 20, 68, 0.15);
  transition: background-color 0.2s;
}

.hub-arrow:hover {
  background-color: var(--white);
}

.hub-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.hub-arrow--prev { left: 1rem; }
.hub-arrow--next { right: 1rem; }

.hub-panel {
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2.5rem 2rem;
  overflow-y: auto;
}

.hub-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background-color: var(--cream-light);
  color: var(--navy);
  font-size: 1.1rem;
  cursor: pointer;
}

.hub-close:hover {
  background-color: var(--cream);
}

.hub-panel-chapter {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--burgundy);
  margin-bottom: 0.5rem;
  padding-right: 3rem;
}

.hub-panel-title {
  font-size: var(--text-3xl);
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.hub-progress {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.hub-progress button {
  flex: 1;
  height: 5px;
  padding: 0;
  border: none;
  border-radius: 3px;
  background-color: rgba(37, 43, 80, 0.12);
  cursor: pointer;
}

.hub-progress button.is-done {
  background-color: var(--navy);
}

.hub-progress button.is-current {
  background-color: var(--burgundy);
}

.hub-step-count {
  font-size: var(--text-xs);
  color: #888;
  margin-bottom: 1.25rem;
}

.hub-caption {
  font-size: var(--text-lg);
  color: #333;
  line-height: 1.65;
  flex: 1;
}

.hub-caption a {
  color: var(--burgundy);
}

.hub-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.hub-nav .btn {
  padding: 0.8rem 1.6rem;
}

.hub-nav .btn:disabled {
  visibility: hidden;
}

.hub-next-fiche {
  text-align: right;
}

/* ---------- Homepage teaser block ---------- */
.entretien-teaser {
  padding: var(--section-padding);
  background-color: var(--cream);
}

.entretien-teaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.entretien-teaser-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.entretien-teaser-mosaic img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  display: block;
}

.entretien-teaser-content p {
  color: #444;
  margin-bottom: 1.25rem;
}

.entretien-teaser-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.entretien-teaser-list li {
  padding: 0.35rem 1rem;
  border-radius: 50px;
  background-color: var(--white);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--navy);
}

.faq-item p a {
  color: var(--burgundy);
  font-weight: 500;
}

@media (max-width: 992px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hub-panel {
    padding: 2rem 1.75rem 1.5rem;
  }

  .hub-panel-title {
    font-size: var(--text-2xl);
  }
}

@media (max-width: 768px) {
  .entretien-teaser-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hub-chapter {
    padding: 3.5rem 0;
  }

  .hub-chapter-head {
    gap: 0 1.25rem;
  }

  .hub-chapter-num {
    font-size: var(--text-3xl);
  }

  .entretien-rule {
    padding: 1.5rem;
  }

  .entretien-rule p {
    font-size: var(--text-xl);
  }

  .entretien-rule--image {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .entretien-rule--image img {
    -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent);
    mask-image: linear-gradient(to bottom, #000 85%, transparent);
  }

  .entretien-rule-text {
    padding: 0 1.5rem 1.5rem;
  }

  .hub-modal {
    padding: 0;
  }

  .hub-dialog {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .hub-visual {
    aspect-ratio: auto;
    height: 45vh;
    max-height: none;
  }

  .hub-panel {
    padding: 1.25rem 1.25rem 1.25rem;
  }

  .hub-panel-title {
    font-size: var(--text-xl);
    margin-bottom: 1rem;
  }

  .hub-caption {
    font-size: var(--text-base);
  }

  .hub-nav {
    position: sticky;
    bottom: 0;
    margin-top: 1rem;
    padding: 0.75rem 0 0.25rem;
    background-color: var(--white);
  }

  .hub-nav .btn {
    padding: 0.7rem 1.25rem;
  }

  .hub-close {
    background-color: rgba(255, 255, 255, 0.9);
  }
}

@media (max-width: 560px) {
  .hub-grid {
    grid-template-columns: 1fr;
  }
}
