/* /css3/dino-fiche.css */
/* CSS premium fiches dinosaures — scopé et défensif */

/* Variables disponibles même si le wrapper .dino-fiche saute */
:where(
  .dino-fiche,
  .dino-fiche-hero,
  .dino-fiche-section,
  .dino-fiche-faq,
  .dino-fiche-grid,
  .dino-fiche-card,
  .dino-fiche-note,
  .dino-fiche-links,
  .dino-fiche-stats
) {
  --df-bg: #0f1711;
  --df-bg-soft: #172319;
  --df-bg-card: #1c2b1f;
  --df-green: #7fbf4d;
  --df-green-soft: rgba(127, 191, 77, 0.18);
  --df-gold: #f4d06f;
  --df-gold-light: #ffe79c;
  --df-gold-soft: rgba(244, 208, 111, 0.18);
  --df-text: #edf5e9;
  --df-muted: #cdd8c7;
  --df-white: #ffffff;
  --df-border: rgba(255, 255, 255, 0.12);
  --df-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

/* Wrapper principal : aucune règle globale destructrice ici */
.dino-fiche {
  max-width: 1120px;
  margin: 30px auto 54px;
  padding: 0 14px;
}

/* Si le CMS retire le wrapper, les sections restent propres */
.dino-fiche-hero,
.dino-fiche-section,
.dino-fiche-faq {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  color: var(--df-text);
  font-size: 16px;
  line-height: 1.72;
  overflow-wrap: normal;
  word-break: normal;
}

/* Box-sizing uniquement sur les blocs éditoriaux maîtrisés */
.dino-fiche-hero,
.dino-fiche-hero::before,
.dino-fiche-hero::after,
.dino-fiche-section,
.dino-fiche-section::before,
.dino-fiche-section::after,
.dino-fiche-faq,
.dino-fiche-faq::before,
.dino-fiche-faq::after,
.dino-fiche-card,
.dino-fiche-card::before,
.dino-fiche-card::after,
.dino-fiche-note,
.dino-fiche-links,
.dino-fiche-links a,
.dino-fiche-stats,
.dino-fiche-stats article {
  box-sizing: border-box;
}

/* Textes éditoriaux directs uniquement */
.dino-fiche-hero > p,
.dino-fiche-section > p,
.dino-fiche-faq > p,
.dino-fiche-card > p,
.dino-fiche-note {
  margin: 0 0 15px;
  overflow-wrap: break-word;
  word-break: normal;
}

.dino-fiche-hero > p:last-child,
.dino-fiche-section > p:last-child,
.dino-fiche-faq > p:last-child,
.dino-fiche-card > p:last-child {
  margin-bottom: 0;
}

.dino-fiche-hero > p strong,
.dino-fiche-section > p strong,
.dino-fiche-faq > p strong,
.dino-fiche-card strong,
.dino-fiche-note strong {
  color: var(--df-white);
}

.dino-fiche-hero > p em,
.dino-fiche-section > p em,
.dino-fiche-faq > p em {
  color: #fff4cc;
}

/* Liens texte éditoriaux uniquement */
.dino-fiche-hero > p a,
.dino-fiche-section > p a,
.dino-fiche-faq > p a,
.dino-fiche-note a {
  color: var(--df-gold);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.dino-fiche-hero > p a:hover,
.dino-fiche-section > p a:hover,
.dino-fiche-faq > p a:hover,
.dino-fiche-note a:hover {
  color: var(--df-gold-light);
}

/* HERO */
.dino-fiche-hero {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 28px;
  padding: 34px 30px;
  border-radius: 26px;
  border: 1px solid rgba(244, 208, 111, 0.32);
  background:
    radial-gradient(circle at 8% 12%, rgba(244, 208, 111, 0.20), transparent 32%),
    radial-gradient(circle at 92% 86%, rgba(127, 191, 77, 0.24), transparent 36%),
    linear-gradient(135deg, #142018 0%, #243d2a 48%, #0f1711 100%);
  box-shadow: var(--df-shadow);
}

.dino-fiche-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.35) 1px, transparent 1px);
  background-size: 24px 24px;
}

.dino-fiche-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(244, 208, 111, 0.12);
  filter: blur(2px);
  pointer-events: none;
}

/* Z-index uniquement sur nos éléments directs, pas sur tous les modules injectés */
.dino-fiche-hero > :where(
  .dino-fiche-kicker,
  h2,
  p,
  img,
  a,
  .dino-fiche-grid,
  .dino-fiche-stats,
  .dino-fiche-note,
  .dino-fiche-links
) {
  position: relative;
  z-index: 1;
}

.dino-fiche-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(244, 208, 111, 0.42);
  background: rgba(244, 208, 111, 0.14);
  color: var(--df-gold);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.dino-fiche-hero > h2 {
  max-width: 860px;
  margin: 0 0 18px;
  color: var(--df-white);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.025em;
}

.dino-fiche-lead {
  max-width: 920px;
  color: #fff7de;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.65;
}

/* SECTIONS */
.dino-fiche-section,
.dino-fiche-faq {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--df-border);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035)),
    var(--df-bg-soft);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.20);
}

.dino-fiche-section > h2,
.dino-fiche-faq > h2 {
  margin: 0 0 18px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(244, 208, 111, 0.24);
  color: var(--df-white);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.16;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.dino-fiche-card > h3,
.dino-fiche-faq > h3 {
  margin: 0 0 10px;
  color: var(--df-white);
  font-size: 19px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* Images éditoriales directes uniquement */
.dino-fiche-hero > img,
.dino-fiche-hero > a > img,
.dino-fiche-section > img,
.dino-fiche-section > a > img,
.dino-fiche-faq > img,
.dino-fiche-faq > a > img,
.dino-fiche .insideimgposted {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 22px auto;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 16px 34px rgba(0,0,0,0.25);
}

/* GRILLES */
.dino-fiche-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 14px;
  margin: 22px 0 4px;
}
.dino-fiche-card {
  min-width: 0;
  min-height: 100%;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(244, 208, 111, 0.20);
  background:
    linear-gradient(180deg, rgba(244, 208, 111, 0.12), rgba(255,255,255,0.045));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  overflow-wrap: break-word;
  word-break: normal;
}

.dino-fiche-card > p {
  margin: 0;
  color: var(--df-muted);
  font-size: 15px;
  line-height: 1.55;
}

/* STATS */
.dino-fiche-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 12px;
  margin: 22px 0 2px;
}

.dino-fiche-stats article {
  min-width: 0;
  padding: 16px;
  border-radius: 17px;
  border: 1px solid rgba(127, 191, 77, 0.25);
  background:
    linear-gradient(180deg, rgba(127, 191, 77, 0.13), rgba(255,255,255,0.04));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
}

.dino-fiche-stats strong {
  display: block;
  margin: 0 0 7px;
  color: var(--df-gold);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dino-fiche-stats span {
  display: block;
  color: var(--df-white);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 750;
  overflow-wrap: break-word;
  word-break: normal;
}

/* NOTES */
.dino-fiche-note {
  position: relative;
  margin: 22px 0 4px;
  padding: 18px 20px 18px 22px;
  border-radius: 18px;
  border: 1px solid rgba(244, 208, 111, 0.26);
  border-left: 5px solid var(--df-gold);
  background:
    linear-gradient(90deg, rgba(244, 208, 111, 0.16), rgba(244, 208, 111, 0.06));
  color: #fff7de;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

/* LIENS INTERNES */
.dino-fiche-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 12px;
  margin: 22px 0 2px;
}

.dino-fiche-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, var(--df-gold-light), var(--df-gold));
  color: #1b2417;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
  overflow-wrap: break-word;
  word-break: normal;
}

.dino-fiche-links a:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  text-decoration: none;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

/* FAQ */
.dino-fiche-faq > h3 {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.11);
}

.dino-fiche-faq > h3:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* TABLEAUX éditoriaux directs uniquement */
.dino-fiche-section > table,
.dino-fiche-faq > table {
  width: 100%;
  max-width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  table-layout: auto;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.dino-fiche-section > table th,
.dino-fiche-section > table td,
.dino-fiche-faq > table th,
.dino-fiche-faq > table td {
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--df-text);
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
}

.dino-fiche-section > table th,
.dino-fiche-faq > table th {
  background: #00776d;
  color: var(--df-white);
  font-weight: 900;
}

/* GARDE-FOU MODULES INJECTÉS
   Ne reset pas leur design natif.
   Empêche surtout les mots cassés lettre par lettre. */
.dino-fiche :where(
  .youtube-video,
  .ultimate-container,
  .not-to-miss-content,
  .not-to-miss-content-wrapper,
  .not-to-miss,
  .ssjinstinct,
  .relative_ssj4slider,
  .smartstore,
  .smartstorelegal,
  .sscms_articles_carousel_wrapper,
  .sscms_articles_carousel_track,
  .sscms_articles_carousel_item,
  .sscms_reviewbox,
  .block-design,
  .ficheproduit,
  .kamesen,
  .ratak,
  .imgkra,
  .gothamrate,
  .gtz_amz,
  .newrules24,
  .loadmoreli,
  .gothmshbutton
),
.dino-fiche :where(
  .youtube-video,
  .ultimate-container,
  .not-to-miss-content,
  .not-to-miss-content-wrapper,
  .not-to-miss,
  .ssjinstinct,
  .relative_ssj4slider,
  .smartstore,
  .smartstorelegal,
  .sscms_articles_carousel_wrapper,
  .sscms_articles_carousel_track,
  .sscms_articles_carousel_item,
  .sscms_reviewbox,
  .block-design,
  .ficheproduit,
  .kamesen,
  .ratak,
  .imgkra,
  .gothamrate,
  .gtz_amz,
  .newrules24,
  .loadmoreli,
  .gothmshbutton
) * {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

/* Ne pas appliquer les effets image premium aux modules injectés */
.dino-fiche :where(
  .youtube-video,
  .ultimate-container,
  .not-to-miss-content,
  .not-to-miss-content-wrapper,
  .not-to-miss,
  .ssjinstinct,
  .relative_ssj4slider,
  .smartstore,
  .sscms_articles_carousel_wrapper,
  .sscms_reviewbox,
  .block-design,
  .ficheproduit
) img {
  border: 0;
  border-radius: revert;
  box-shadow: revert;
}

/* Vidéos YouTube injectées */
.dino-fiche :where(.youtube-video.ultimate-container, .ultimate-container.youtube-video) {
  width: 100%;
  max-width: 100%;
  margin: 24px 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.dino-fiche :where(.youtube-video.ultimate-container iframe, .ultimate-container.youtube-video iframe) {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  border: 0;
}

/* Blocs not-to-miss / ultimate */
.dino-fiche :where(.not-to-miss-content, .not-to-miss-content-wrapper, .not-to-miss, .ultimate-container) {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.dino-fiche :where(.not-to-miss-content a, .not-to-miss-content-wrapper a, .not-to-miss a, .ultimate-container a) {
  overflow-wrap: normal;
  word-break: normal;
}

/* Store / carrousels injectés */
.dino-fiche :where(.smartstore, .ssjinstinct, .relative_ssj4slider) {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.dino-fiche :where(.smartstore li, .smartstore li *, .ficheproduit, .ficheproduit *) {
  overflow-wrap: normal;
  word-break: normal;
}

.dino-fiche :where(.storeitemtitle, .ratak) {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

/* Responsive */
@media (max-width: 980px) {
  .dino-fiche-hero {
    padding: 30px 24px;
  }

  .dino-fiche-section,
  .dino-fiche-faq {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .dino-fiche {
    margin: 20px auto 38px;
    padding: 0 10px;
  }

  .dino-fiche-hero,
  .dino-fiche-section,
  .dino-fiche-faq {
    font-size: 15px;
    line-height: 1.68;
  }

  .dino-fiche-hero {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .dino-fiche-hero > h2 {
    font-size: 28px;
  }

  .dino-fiche-lead {
    font-size: 17px;
  }

  .dino-fiche-section,
  .dino-fiche-faq {
    margin-top: 18px;
    margin-bottom: 18px;
    padding: 20px 16px;
    border-radius: 19px;
  }

  .dino-fiche-section > h2,
  .dino-fiche-faq > h2 {
    font-size: 24px;
  }

  .dino-fiche-grid,
  .dino-fiche-stats,
  .dino-fiche-links {
    grid-template-columns: 1fr;
  }

  .dino-fiche-links a {
    min-height: 46px;
  }

  .dino-fiche-section > table,
  .dino-fiche-faq > table {
    font-size: 14px;
  }

  .dino-fiche-section > table th,
  .dino-fiche-section > table td,
  .dino-fiche-faq > table th,
  .dino-fiche-faq > table td {
    padding: 10px;
  }
}

/* =========================================================
   PATCH NOT-TO-MISS / ULTIMATE-CONTAINER DANS LES FICHES
   Objectif :
   - ne pas hériter des styles premium .dino-fiche
   - ne pas casser les textes lettre par lettre
   - conserver la vraie proportion des images
========================================================= */

.dino-fiche .not-to-miss-content.ultimate-container,
.dino-fiche .not-to-miss-content.ultimate-container *,
.dino-fiche .not-to-miss-article.ultimate-container,
.dino-fiche .not-to-miss-article.ultimate-container *,
.dino-fiche .not-to-miss-content-text.ultimate-container,
.dino-fiche .not-to-miss-content-text.ultimate-container * {
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: manual !important;
}

/* Conteneur global du bloc */
.dino-fiche .not-to-miss-content.ultimate-container {
  max-width: 100%;
  margin: 24px 0;
}

/* Titre du bloc */
.dino-fiche .not-to-miss-content.ultimate-container > h4 {
  margin: 0 0 12px;
  line-height: 1.25;
  white-space: normal;
}

/* Carte not-to-miss */
.dino-fiche .not-to-miss-article.ultimate-container {
  max-width: 100%;
}

/* Lien interne de la carte */
.dino-fiche .not-to-miss-article.ultimate-container > a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  text-decoration: none;
  overflow: visible;
}

/* Image réelle : vraie proportion, pas de crop forcé */
.dino-fiche .not-to-miss-article.ultimate-container > a > img {
  display: block !important;
  flex: 0 0 auto;
  width: min(180px, 38%) !important;
  max-width: 180px !important;
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border: 0 !important;
  border-radius: 8px;
  box-shadow: none !important;
}

/* Placeholder store sans image : on garde son ratio prévu */
.dino-fiche .not-to-miss-article.ultimate-container > a > span[style*="aspect-ratio"] {
  flex: 0 0 auto;
  width: min(180px, 38%) !important;
  max-width: 180px !important;
  min-width: 120px;
}

/* Zone texte */
.dino-fiche .not-to-miss-content-text.ultimate-container {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

/* Titre dans la carte */
.dino-fiche .not-to-miss-content-text.ultimate-container > span {
  display: block;
  white-space: normal;
  line-height: 1.25;
}

/* Description dans la carte */
.dino-fiche .not-to-miss-content-text.ultimate-container > p {
  margin: 6px 0 0;
  line-height: 1.45;
  white-space: normal;
}

/* Mobile / colonne étroite */
@media (max-width: 640px) {
  .dino-fiche .not-to-miss-article.ultimate-container > a {
    flex-direction: column;
  }

  .dino-fiche .not-to-miss-article.ultimate-container > a > img,
  .dino-fiche .not-to-miss-article.ultimate-container > a > span[style*="aspect-ratio"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* =========================================================
   PATCH H2 / H3 / H4 NATIFS
   Supprime les backgrounds CMS hérités sans toucher à la structure.
========================================================= */

.dino-fiche :where(h2, h3, h4) {
  background: transparent !important;
  background-color: transparent !important;
}

.dino-fiche :where(h2, h3, h4)::before,
.dino-fiche :where(h2, h3, h4)::after {
  background: transparent !important;
  background-color: transparent !important;
}

/* Exception : le titre des blocs not-to-miss doit garder son bandeau noir */
.dino-fiche .not-to-miss-content.ultimate-container > h4 {
  background: #000 !important;
  background-color: #000 !important;
  color: #fff;
}