@import url("variable.css");

/* ===============  ANIM GRADIENT  =============== */
@keyframes realGradientShift{
  0%,100%{ background-position: 0% 50% }
  50%   { background-position: 100% 50% }
}

/* ===============  WRAPPER FICHE  =============== */
main.rd-wrap{
  /* largeur bornée et centrée → air sur grands écrans */
  width: min(1200px, 94vw);
  max-width: 100%;
  margin: clamp(40px, 6vw, 72px) auto;
  padding: clamp(24px, 3.5vw, 48px) clamp(16px, 5vw, 48px);
  box-sizing: border-box;

  color: var(--text-light);
  background: linear-gradient(45deg, var(--dark-blue), var(--light-blue), var(--dark-blue));
  background-size: 200% 200%;
  animation: realGradientShift 10s ease infinite;

  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
  min-width: 0; /* anti overflow */
}

/* ===============  RETOUR  =============== */
.rd-back{
  display: inline-block;
  margin: 0 0 1.5rem;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  text-decoration: none;
  color: var(--text-light);
  transition: background .3s, border-color .3s;
}
.rd-back:hover{ background: rgba(255,255,255,.05); border-color: var(--text-light); }

/* ===============  TITRES / METAS  =============== */
.rd-title{ font-size: 2rem; font-weight: 700; margin: .5rem 0; }
.rd-meta{ color: #bbb; margin-bottom: 1rem; overflow-wrap: anywhere; }

/* ===============  GRID  =============== */
.rd-grid{
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
  min-width: 0;
}

/* ===============  CARTES  =============== */
.rd-card,
.rd-credits{
  border-radius: 14px;
  padding: clamp(16px, 2.5vw, 24px);
  background: linear-gradient(135deg, var(--dark-blue), var(--light-blue));
  background-size: 200% 200%;
  animation: realGradientShift 10s ease infinite;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  min-width: 0;
  overflow: hidden;
}

/* Affiche : s’adapte, sans rognage, centrée */
.rd-hero{
  display: block;
  width: 100%;                         /* suit la largeur interne de la carte */
  max-width: min(480px, 100%);         /* borne haute desktop */
  height: auto;
  max-height: 65vh;
  margin: 0 auto 1rem;
  border-radius: 14px;
  object-fit: contain;                  /* respecte le cadre blanc */
}

/* Texte sections */
.rd-h2{ margin: 1rem 0 .5rem; font-size: 1.3rem; font-weight: 700; }
.rd-text{ margin-bottom: 1rem; line-height: 1.5; overflow-wrap: anywhere; }

/* ===============  CRÉDITS  =============== */
.rd-credits-title{ font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; }
.rd-credit-block{ margin-bottom: .75rem; }
.rd-credit-role{ font-weight: 600; margin-bottom: .25rem; }
.rd-credit-list a{ color: var(--yellow); text-decoration: none; }
.rd-credit-list a:hover{ color: var(--cta-hover); }

/* ===============  BANDE-ANNONCE  =============== */
.btn-ghost{
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 10px 14px; border-radius: 6px; border: 1px solid #ccc;
  text-decoration: none; color: var(--text-light);
  transition: background .3s, border-color .3s;
}
.btn-ghost:hover{ background: rgba(255,255,255,.05); border-color: var(--text-light); }
.btn-ghost:visited{ color: var(--text-light); }
.rd-trailer{ margin-top: 1.5rem; }

/* ===============  PAGINATION PRÉC/SUIV  =============== */
.rd-nav{
  display: flex; justify-content: center; gap: 1.5rem;
  margin: 2rem 0;
}
.rd-nav-card{
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; border: 1px solid #ccc; border-radius: 6px;
  text-decoration: none; background: rgba(0,0,0,.2);
  transition: background .3s, border-color .3s; color: var(--text-light);
}
.rd-nav-card:hover{ background: rgba(255,255,255,.05); border-color: var(--text-light); }

.rd-nav-thumb{
  width: 70px; flex-shrink: 0; border-radius: 0; overflow: hidden; background: #000;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s, box-shadow .25s;
}
.rd-nav-thumb img{ width: 100%; height: auto; display: block; object-fit: cover; border-radius: 0; }
.rd-nav-card:hover .rd-nav-thumb{ transform: scale(1.02); box-shadow: 0 2px 6px rgba(0,0,0,.35); }

.rd-nav-meta{ display: flex; flex-direction: column; }
.rd-nav-kicker{ font-size: .8rem; opacity: .7; }
.rd-nav-title{ font-weight: 700; }


.rd-return {
  text-align: center;
  margin-top: 2rem;
}

/* =========================
   Partage (réalisation) — miroir d'article.css
========================= */
.share-wrapper{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  margin-bottom: 4rem;
}
.share-wrapper p{
  margin: 0;
  font-size: 1.2rem;
  color: var(--white);
}

/* Même hook que l’article */
.share-btn{}
.share-btn i{
  font-size: 1rem;
  line-height: 1;
}

/* Modale */
.share-modal{
  display: none;
  position: absolute;
  bottom: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background-color: var(--dark-blue);
  padding: 1.5rem;
  border-radius: 10px;
  width: 320px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
}
.share-modal.show{
  display: block;
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.close{
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  color: var(--white);
  cursor: pointer;
}
.share-icons{
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.share-icons a,
.share-icons button{
  font-size: 2rem; /* même taille que l’article */
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
}
.share-icons a:hover,
.share-icons button:hover{
  transform: scale(1.3);
  color: var(--yellow);
}

/* ===============  RESPONSIVE  =============== */
@media (max-width: 900px){
  .rd-grid{ grid-template-columns: 1fr; }
  .rd-nav-thumb{ width: 60px; }
}
@media (max-width: 640px){
  .rd-hero{ max-width: 92vw; }          /* reprend de la largeur en mobile */
}
@media (max-width: 480px){
  main.rd-wrap{ padding-inline: 16px; }
  .rd-card, .rd-credits{ padding: 12px; }
}
