/* Page d'un coloriage */
.fiche-coloriage {
    /* place prise au-dessus du dessin : en-tête fixe + titre + marges.
       Le dessin occupe toute la hauteur restante de l'écran : à ajuster si besoin. */
    --reservePage: 260px;
    width: 100%;            /* corps de page en colonne flex : voir style.css */
    max-width: 900px;
    margin: 15px auto 20px;
    padding: 0 15px;
    text-align: center;
}
.fiche-coloriage h1 {
    font-size: 1.7rem;
    color: var(--colorTextP);
    margin-bottom: 12px;
}
/* Le dessin tient en entier dans l'écran (jamais plus haut que la fenêtre moins la réserve),
   sans déformation. Le bouton Télécharger est posé sur le dessin : toujours visible avec lui. */
.fiche-image {
    position: relative;
}
.fiche-coloriage img {
    display: block;
    margin: 0 auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: max(300px, calc(100vh - var(--reservePage)));
    background: #fff;
    border: thick double var(--colorBorder);
    border-radius: 10px;
}
.fiche-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--colorTextP);
    max-width: 700px;
    margin: 20px auto;
}
/* On neutralise le style global des liens (majuscules, ombres, taille réduite en responsive) */
.fiche-coloriage a {
    text-transform: none;
    letter-spacing: normal;
    text-shadow: none;
    font-size: 16px;
    font-weight: 400;
    color: var(--colorTextP);
    text-decoration: underline;
}
/* « Télécharger (PDF) » et « Colorier » posés en bas du dessin, côte à côte et centrés
   (le dessin est lui-même centré dans .fiche-image) */
.fiche-actions {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 96%;
}
.fiche-coloriage a.btnTelecharger {
    font-size: 18px;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 40px;
    text-decoration: none;
    white-space: nowrap;
    background-color: var(--colorBackButton);
    color: var(--colorTextSelectTheme);
    border: 2px solid var(--colorTextSelectTheme);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.fiche-coloriage a.btnTelecharger:hover {
    filter: brightness(0.92);
}
@media screen and (max-width: 600px) {
    .fiche-actions { bottom: 12px; gap: 8px; }
    .fiche-coloriage a.btnTelecharger { font-size: 14px; padding: 8px 12px; }
}
@media screen and (max-width: 400px) {
    .fiche-actions { bottom: 8px; gap: 5px; }
    .fiche-coloriage a.btnTelecharger { font-size: 12px; padding: 7px 9px; border-width: 1px; }
}
.fiche-liens {
    margin-top: 25px;
}

/* Grille de index.php : l'image est maintenant dans un lien */
.grid-wrapper > div > a.lienDessin {
    display: block;
    width: 100%;
    height: 100%;
}
.grid-wrapper > div > a.lienDessin > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
/* Tuile d'un créateur (icône carrée dans le style des jeux, phrase écrite dans l'icône) : icône entière */
.grid-wrapper > div.tuile-createur {
    overflow: hidden;
    background: linear-gradient(180deg, #86EDE6 0%, #31D5CA 100%);
}
.grid-wrapper > div.tuile-createur > a.lienDessin > img {
    object-fit: contain;
    transition: transform 0.3s, filter 0.3s;
}
.grid-wrapper > div.tuile-createur > a.lienDessin:hover > img,
.grid-wrapper > div.tuile-createur > a.lienDessin:focus-visible > img {
    transform: scale(1.04);
    filter: brightness(1.08);
}
