
/* ==========================================================
   JDT — SINGLE JEU V10

   Mise en page des fiches jeux et composants métier.
   Typographie, liens, boutons et couleurs :
   design system itsizi.

   Les règles sont regroupées par composant,
   adaptations responsive comprises.
   ========================================================== */


/* ==========================================================
   1. RÉGLAGES GÉNÉRAUX
   ========================================================== */

/* Surfaces */

.single-jeu .itz-section--surface {
    background: var(--itz-color-secondary);
}

/* Espacement des sections */

.single-jeu .itz-section {
    padding-block: var(--itz-section-space-compact);
}

/* Anciennes tailles de titres — désactivées */

/*
.single-jeu h1 {
    font-size: var(--itz-font-size-h2);
}

.single-jeu h2 {
    font-size: var(--itz-font-size-h3);
}

.single-jeu h3 {
    font-size: var(--itz-font-size-h4);
}
*/


/* ==========================================================
   2. ÉLÉMENTS VISUELS COMMUNS
   ========================================================== */

/* Pastille éditoriale */

.jdt-eyebrow {
    display: inline-block;
    padding: 2px 10px;
    background: var(--itz-color-surface-light);
    border: 1px solid var(--color-border);
    border-radius: 30px;
    font-weight: bolder;
    margin-bottom: 10px;
    font-size: 15px;
}

/* Pictogrammes */

.jdt-icon {
    display: block;
    flex: none;
}


/* ==========================================================
   3. BANDEAU PRINCIPAL DU JEU
   ========================================================== */

/* Grille et contenu */

.jdt-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.8fr);
    align-items: center;
    gap: clamp(var(--itz-space-5), 5vw, var(--itz-space-8));
}

.jdt-hero__copy,
.jdt-hero__media {
    min-width: 0;
}

.jdt-hero__copy > :first-child {
    margin-top: 0;
}

/* Visuel principal */

.jdt-hero__media {
    aspect-ratio: 1 / 1;
}

/* Caractéristiques du bandeau */

.jdt-hero__facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--itz-space-4);
    margin-block: var(--itz-space-6);
}

.jdt-hero__fact {
    display: flex;
    align-items: flex-start;
    gap: var(--itz-space-2);
    min-width: 0;
}

.jdt-hero__fact > div {
    min-width: 0;
}

.jdt-hero__fact dd {
    margin: 0;
    font-weight: bolder;
}

/* Actions */

.jdt-hero__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--itz-space-3) var(--itz-space-5);
}

/* Responsive du bandeau */

@media (max-width: 1050px) {
    .jdt-hero__facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .jdt-hero__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .jdt-hero__media {
        order: -1;
        width: min(100%, 380px);
        justify-self: center;
    }
}

@media (max-width: 520px) {
    .jdt-hero__facts {
        gap: var(--itz-space-3);
    }
}


/* ==========================================================
   4. VISUELS PRODUIT
   ========================================================== */

/* Cadre réutilisable des images */

.jdt-image-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--itz-color-border, var(--color-border, #ddd));
    border-radius: var(--itz-radius-image, 12px);
    overflow: hidden;
}

.jdt-image-frame img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    object-fit: contain;
}


/* ==========================================================
   5. CORPS DE LA FICHE
   ========================================================== */

/* Structure principale */

.jdt-fiche {
    display: grid;
    gap: var(--itz-space-8);
}

.jdt-fiche__section {
    min-width: 0;
    scroll-margin-top: 7rem;
}

/* Marges des éléments de section */

.jdt-fiche__section > :first-child {
    margin-top: 0;
}

.jdt-fiche__section > :last-child {
    margin-bottom: 0;
}

/* Disposition en deux colonnes */

.jdt-fiche__two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--itz-space-4);
    margin-top: var(--itz-space-7);
}

/* Responsive du corps de fiche */

@media (max-width: 760px) {
    .jdt-fiche__two-col {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Ancienne largeur des sections de lecture — désactivée */

/*
.jdt-comment-jouer,
.jdt-faq {
    width: 100%;
    max-width: var(--itz-container-narrow);
    margin-inline: auto;
}
*/


/* ==========================================================
   6. POINTS FORTS ET POINTS À CONNAÎTRE
   ========================================================== */

/* Cartes */

.jdt-fiche__point-card {
    min-width: 0;
}

.jdt-fiche__point-card > :first-child {
    margin-top: 0;
}

.jdt-fiche__point-card > :last-child {
    margin-bottom: 0;
}

/* Listes */

.jdt-fiche__point-card ul {
    padding-left: 0;
    list-style: none;
}

.jdt-fiche__point-card ul li {
    margin-top: 10px;
}

/* Variantes de cartes */

.jdt-fiche__point-card__pourquoi {
    background: var(--itz-color-tertiary);
}

.jdt-fiche__point-card__savoir {
    background: var(--itz-color-surface);
}


/* ==========================================================
   7. CARACTÉRISTIQUES DÉTAILLÉES
   ========================================================== */

/* Grille */

.jdt-fiche__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--itz-space-4) var(--itz-space-5);
}

/* Élément de caractéristique */

.jdt-fiche__fact {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: var(--itz-space-3);
}

/* Libellé et pictogramme */

.jdt-fiche__fact-label {
    display: flex;
    align-items: center;
    gap: var(--itz-space-2);
    font-weight: bolder;
}

.jdt-fiche__fact-label .jdt-icon {
    width: 20px;
    height: 20px;
}

/* Valeur */

.jdt-fiche__fact dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* Responsive des caractéristiques */

@media (max-width: 760px) {
    .jdt-fiche__facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ==========================================================
   8. OFFRES MARCHANDS ET AFFILIATION
   ========================================================== */

/* Carte principale */

.jdt-fiche__offer-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--itz-space-5);
    align-items: center;
    background: var(--itz-color-secondary);
}

.jdt-fiche__offer-card--with-image {
    grid-template-columns: 164px minmax(0, 1fr);
}

/* Visuel et contenu */

.jdt-fiche__offer-media {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.jdt-fiche__offer-copy {
    min-width: 0;
}

/* Liste des offres */

.jdt-fiche__offer-list {
    display: grid;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Ligne de marchand */

.jdt-fiche__offer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--itz-space-3);
    padding-block: var(--itz-space-3);
}

.jdt-fiche__offer-row:first-child {
    padding-top: 0;
}

.jdt-fiche__offer-row + .jdt-fiche__offer-row {
    border-top: 1px solid var(--itz-color-border);
}

/* Nom du marchand */

.jdt-fiche__merchant-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Note d'affiliation */

.jdt-fiche__affiliate-note {
    display: block;
    margin-top: var(--itz-space-4);
    font-size: var(--itz-font-size-small);
}

/* Responsive des offres */

@media (max-width: 520px) {
    .jdt-fiche__offer-card--with-image {
        grid-template-columns: minmax(0, 1fr);
    }

    .jdt-fiche__offer-media {
        max-width: 164px;
    }

    .jdt-fiche__offer-row {
        align-items: flex-start;
    }
}

/* Ancienne largeur du bloc offres — désactivée */

/*
.jdt-offres {
    width: 100%;
    max-width: 920px;
    margin-inline: auto;
}
*/


/* ==========================================================
   9. RÈGLES DU JEU — LIEN PDF
   ========================================================== */

.jdt-fiche__pdf-link {
    margin-top: var(--itz-space-4);
}


/* ==========================================================
   10. FAQ — ACCORDÉON
   ========================================================== */

/* Conteneur et éléments */

.jdt-fiche__faq-items {
    border-top: 1px solid var(--itz-color-border);
}

.jdt-fiche__faq-item {
    border-bottom: 1px solid var(--itz-color-border);
}

/* En-tête de question */

.jdt-fiche__faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--itz-space-4);
    padding: var(--itz-space-5) 0 var(--itz-space-5) 0;
    cursor: pointer;
    list-style: none;
}

.jdt-fiche__faq-question {
    margin: 0;
    min-width: 0;
}

/* Masquage des marqueurs natifs */

.jdt-fiche__faq-item summary::-webkit-details-marker {
    display: none;
}

.jdt-fiche__faq-item summary::marker {
    content: '';
}

/* Réponse */

.jdt-fiche__faq-answer {
    padding: 0 var(--itz-space-4) var(--itz-space-7) 0;
}

/* Indicateur d'ouverture */

.jdt-fiche__faq-icon {
    flex: none;
    position: relative;
    display: block;
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.jdt-fiche__faq-icon::before,
.jdt-fiche__faq-icon::after {
    content: '';
    position: absolute;
    inset: 50% auto auto 50%;
    background: currentColor;
    border-radius: 1px;
    transform: translate(-50%, -50%);
}

.jdt-fiche__faq-icon::before {
    width: 15px;
    height: 2px;
}

.jdt-fiche__faq-icon::after {
    width: 2px;
    height: 15px;
}

.jdt-fiche__faq-item[open] > summary .jdt-fiche__faq-icon {
    transform: rotate(45deg);
}

/* Accessibilité : réduction des animations */

@media (prefers-reduced-motion: reduce) {
    .jdt-fiche__faq-icon {
        transition: none;
    }
}


/* ==========================================================
   11. JEUX SIMILAIRES
   ========================================================== */

/* Taille des titres */

.single-jeu .jdt-catalogue__card-body .itz-heading--compact {
    font-size: var(--itz-font-size-h4);
}

/* Fond des cartes */

.jdt-similaires .jdt-catalogue__card {
    background: var(--itz-color-secondary);
}

/* Présentation des caractéristiques */

.jdt-similaires .jdt-catalogue__specs > li {
    display: inline-block;
}



/* Conserver trois colonnes pour les jeux similaires
   lorsque la largeur du conteneur le permet. */

@container itz-archive-primary (min-width: 921px) and (max-width: 1000px) {
    .single-jeu .jdt-similaires .itz-post-grid.itz-grid--3 {
        --itz-grid-columns: 3;
    }
}



/* ==========================================================
   12. APPEL À L'ACTION ÉDITORIAL
   ========================================================== */

.jdt-article-cta {
    margin-top: var(--itz-space-8);
    background: var(--itz-color-surface);
    text-align: center;
}


/* ==========================================================
   13. SOMMAIRE
   ========================================================== */

/* Liste */

.up-sommaire-widget ul {
    list-style: none;
    padding-left: 0;
    font-size: 15px;
}

.up-sommaire-widget ul li {
    margin-top: 10px;
}

/* Liens */

.up-sommaire-widget ul li a {
    text-decoration: none;
    color: var(--itz-color-text);
}

.up-sommaire-widget ul li a:hover {
    color: var(--itz-color-link);
}

/* Élément actif */

.up-sommaire-widget ul li.active a {
    text-decoration: underline;
    color: var(--itz-color-link);
}
