/*  Theme Name:   Hueman-Child-LeMondeDesArthropodes 
Theme URI:    https://lesarthropodes.gdex.fr
Description:  A theme for species sheets
Author:       Alonso Florian
Author URI:   https://lesarthropodes.gdex.fr
Template:     hueman
Version:      0.1.0 */

/* ==================================================
   FICHES ESPECES — HUEMAN CHILD + ACF
   ================================================== */

/* Conteneur principal */

.fiche-espece-page {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
}

.fiche-espece {
    width: 100%;
    min-width: 0;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.fiche-espece img {
    max-width: 100%;
    height: auto;
}

/* Titre principal */

.fiche-espece .fiche-entete {
    margin: 0 0 30px;
    padding: 0 0 18px;
    border-bottom: 3px solid #52775b;
}

.fiche-espece .fiche-entete h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.25;
    font-weight: 700;
    color: #4169E1; /* bleu royal */
}

/* Introduction : photo et classification */

.fiche-espece .fiche-introduction {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
    margin-bottom: 36px;
}

.fiche-espece .fiche-intro-photo,
.fiche-espece .fiche-classification {
    min-width: 0;
}

.fiche-espece .fiche-image-principale {
    margin: 0;
}

.fiche-espece .fiche-image-principale img {
    display: block;
    width: 100%;
    max-height: 620px;
    object-fit: contain;
    border-radius: 8px;
    background: #f3f3f0;
}

.fiche-espece .fiche-classification {
    padding: 20px;
    background: #f3f5f1;
    border: 1px solid #e0e5dc;
    border-radius: 8px;
}

.fiche-espece .fiche-classification h2 {
    margin: 0 0 16px;
    font-size: 1.35rem;
    line-height: 1.35;
    color: #D07B84;
}

.fiche-espece .fiche-classification dl {
    margin: 0;
}

.fiche-espece .fiche-classification-ligne {
    display: grid;
    grid-template-columns: minmax(90px, 0.85fr) minmax(0, 1.4fr);
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #dce2d8;
}

.fiche-espece .fiche-classification-ligne:last-child {
    border-bottom: 0;
}

.fiche-espece .fiche-classification dt {
    font-weight: 700;
    color: #425547;
}

.fiche-espece .fiche-classification dd {
    margin: 0;
}

/* Catégories principales */

.fiche-espece .fiche-section {
    margin: 0 0 36px;
    padding: 24px;
    background: #fff;
    border: 1px solid #e5e7e2;
    border-radius: 8px;
}

.fiche-espece .fiche-section > h2 {
    margin: 0 0 22px;
    padding: 0 0 12px;
    font-size: 1.65rem;
    line-height: 1.35;
    color: #304b36;
    border-bottom: 2px solid #dce5d8;
}

.fiche-espece .fiche-champ {
    margin: 0 0 22px;
}

.fiche-espece .fiche-champ:last-child {
    margin-bottom: 0;
}

.fiche-espece .fiche-champ h3 {
    margin: 0 0 7px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #405b46;
}

.fiche-espece .fiche-champ-contenu > :first-child {
    margin-top: 0;
}

.fiche-espece .fiche-champ-contenu > :last-child {
    margin-bottom: 0;
}

/* Figures et légendes */

.fiche-espece figure {
    min-width: 0;
}

.fiche-espece figure figcaption {
    margin-top: 8px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #666;
    font-style: italic;
}

/* Images de description */

.fiche-espece .fiche-image-secondaire {
    margin: 16px 0 26px;
}

.fiche-espece .fiche-image-secondaire img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 650px;
    object-fit: contain;
    border-radius: 6px;
}

/* Galeries */

.fiche-espece .fiche-grille-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.fiche-espece .fiche-image-galerie {
    margin: 0;
}

.fiche-espece .fiche-image-galerie img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    border-radius: 6px;
    background: #f3f3f0;
}

/* Ressources externes */

.fiche-espece .fiche-ressources {
    margin: 0;
    padding-left: 22px;
}

.fiche-espece .fiche-ressources li {
    margin: 0 0 12px;
}

.fiche-espece .fiche-ressources a {
    color: #356c49;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fiche-espece .fiche-ressources a:hover {
    color: #23452e;
}

/* Sources */

.fiche-espece .fiche-section:last-child {
    margin-bottom: 20px;
}

/* Tablettes */

@media (max-width: 900px) {
    .fiche-espece .fiche-introduction {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 18px;
    }

    .fiche-espece .fiche-classification {
        padding: 15px;
    }

    .fiche-espece .fiche-classification-ligne {
        grid-template-columns: minmax(75px, 0.8fr) minmax(0, 1.2fr);
        gap: 8px;
    }

    .fiche-espece .fiche-section {
        padding: 20px;
    }
}

/* Mobiles */

@media (max-width: 650px) {
    .fiche-espece .fiche-introduction {
        grid-template-columns: minmax(0, 1fr);
    }

    .fiche-espece .fiche-classification {
        padding: 16px;
    }

    .fiche-espece .fiche-section {
        padding: 16px;
        margin-bottom: 24px;
    }

    .fiche-espece .fiche-section > h2 {
        font-size: 1.4rem;
    }

    .fiche-espece .fiche-grille-images {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .fiche-espece .fiche-classification-ligne {
        grid-template-columns: minmax(95px, 0.8fr) minmax(0, 1.2fr);
    }
}