/* Terrariophile : fiches espèces (préfixe tpf-). Chargé uniquement sous /especes/ par terrariophile-fiches.php */
.tpf{--tpf-accent:#2f6b3a;--tpf-accent-soft:#eef5ef;--tpf-accent-line:#cfe1d2;--tpf-alert:#b3361b;--tpf-alert-soft:#fdf0ec;--tpf-text:#2b2f2c;--tpf-muted:#5a625c;--tpf-radius:10px;
  font-size:17.5px;line-height:1.7;color:var(--tpf-text)}
.tpf *{box-sizing:border-box}
.tpf p,.tpf li,.tpf td,.tpf th,.tpf summary{color:var(--tpf-text)}
.tpf p{margin:0 0 1em}
.tpf a{color:var(--tpf-accent);text-decoration:underline;text-underline-offset:2px}
.tpf a:hover{color:#1d4a27}
.tpf h2{margin:2.2em 0 .6em;padding-bottom:.35em;border-bottom:3px solid var(--tpf-accent-line);color:var(--tpf-accent);font-size:1.55em;line-height:1.25;scroll-margin-top:90px}
.tpf h3{margin:0 0 .4em;color:var(--tpf-accent);font-size:1.12em;line-height:1.3}
.tpf figure{margin:0 0 1.2em}
.tpf figcaption{margin-top:.4em;font-size:.8em;line-height:1.45;color:var(--tpf-muted)}
.tpf img{max-width:100%;height:auto;border-radius:var(--tpf-radius)}

/* En-tête */
.tpf-hero{margin:0 0 1.4em}
.tpf-hero .tpf-latin{margin:0 0 .3em;font-size:1.25em;font-style:italic;color:var(--tpf-muted)}
.tpf-hero .tpf-lead{margin:0 0 .8em;font-size:1.08em;font-weight:600}
.tpf-badges{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 1.2em;padding:0;list-style:none}
.tpf-badges li{margin:0;padding:.25em .8em;border-radius:999px;font-size:.82em;font-weight:700;line-height:1.5;color:#fff;background:var(--tpf-accent)}
.tpf-badges .tpf-b-niveau{background:#7a4b00}
.tpf-badges .tpf-b-danger{background:var(--tpf-alert)}
.tpf-badges .tpf-b-nuit{background:#2d3a5a}
.tpf-badges .tpf-b-legal{background:var(--tpf-accent)}

/* Encadrés */
.tpf-alert,.tpf-tip,.tpf-legal{margin:1.4em 0;padding:1em 1.2em;border-left:6px solid;border-radius:var(--tpf-radius)}
.tpf-alert{background:var(--tpf-alert-soft);border-color:var(--tpf-alert)}
.tpf-alert h3,.tpf-alert .tpf-alert-title{color:var(--tpf-alert)}
.tpf-alert .tpf-alert-title{margin:0 0 .3em;font-weight:800}
.tpf-tip{background:#fff8e6;border-color:#d79a00}
.tpf-legal{background:var(--tpf-accent-soft);border-color:var(--tpf-accent)}
.tpf-alert p:last-child,.tpf-tip p:last-child,.tpf-legal p:last-child{margin-bottom:0}

/* Fiche express */
.tpf-express{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:1.2em 0}
.tpf-tile{margin:0;padding:.8em .9em;background:var(--tpf-accent-soft);border:1px solid var(--tpf-accent-line);border-radius:var(--tpf-radius)}
.tpf-tile .tpf-k{display:block;margin:0 0 .15em;font-size:.72em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--tpf-muted)}
.tpf-tile .tpf-v{display:block;margin:0;font-size:1.05em;font-weight:700;line-height:1.35;color:var(--tpf-accent)}
@media (min-width:782px){.tpf-express{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Sommaire */
.tpf-toc{margin:1.6em 0;padding:1em 1.2em;background:#f6f7f6;border:1px solid #e1e4e1;border-radius:var(--tpf-radius)}
.tpf-toc .tpf-toc-title{margin:0 0 .4em;font-weight:800;color:var(--tpf-accent)}
.tpf-toc ol{margin:0;padding-left:1.3em;columns:1}
.tpf-toc li{margin:.15em 0}
@media (min-width:782px){.tpf-toc ol{columns:2;column-gap:2em}}

/* Listes avec puces vertes et checklists */
.tpf ul{padding-left:1.2em}
.tpf ul li::marker{color:var(--tpf-accent)}
.tpf ul.tpf-check{list-style:none;padding-left:0}
.tpf ul.tpf-check li{position:relative;margin:.35em 0;padding-left:1.7em}
.tpf ul.tpf-check li::before{content:"\2713";position:absolute;left:0;top:0;font-weight:800;color:var(--tpf-accent)}
.tpf-alert ul.tpf-check li::before{color:var(--tpf-alert)}
.tpf ul.tpf-cross{list-style:none;padding-left:0}
.tpf ul.tpf-cross li{position:relative;margin:.35em 0;padding-left:1.7em}
.tpf ul.tpf-cross li::before{content:"\2715";position:absolute;left:0;top:0;font-weight:800;color:var(--tpf-alert)}

/* Tableaux */
.tpf .wp-block-table{margin:1em 0;overflow-x:auto}
.tpf table{width:100%;border-collapse:collapse;font-size:.95em}
.tpf th,.tpf td{padding:.6em .8em;border:1px solid var(--tpf-accent-line);text-align:left;vertical-align:top}
.tpf thead th{background:var(--tpf-accent);color:#fff}
.tpf thead th{color:#fff}
.tpf tbody tr:nth-child(even){background:#f7faf7}
.tpf td:first-child{font-weight:700;white-space:nowrap}
@media (max-width:600px){.tpf td:first-child{white-space:normal}.tpf th,.tpf td{padding:.5em .55em}}

/* Étapes (reproduction) */
.tpf-steps{display:grid;grid-template-columns:1fr;gap:12px;margin:1.2em 0;padding:0;list-style:none;counter-reset:tpf-step}
.tpf-steps li{position:relative;margin:0;padding:.9em 1em .9em 3.4em;background:#fff;border:1px solid var(--tpf-accent-line);border-radius:var(--tpf-radius);counter-increment:tpf-step}
.tpf-steps li::before{content:counter(tpf-step);position:absolute;left:.8em;top:.8em;width:1.7em;height:1.7em;border-radius:50%;background:var(--tpf-accent);color:#fff;font-weight:800;text-align:center;line-height:1.7em}
.tpf-steps strong{display:block;color:var(--tpf-accent)}
@media (min-width:782px){.tpf-steps{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Cartes (santé, espèces proches, alternatives) */
.tpf-cards{display:grid;grid-template-columns:1fr;gap:14px;margin:1.2em 0}
.tpf-card{margin:0;padding:1em 1.1em;background:#fff;border:1px solid var(--tpf-accent-line);border-top:4px solid var(--tpf-accent);border-radius:var(--tpf-radius)}
.tpf-card p{margin:0 0 .5em}
.tpf-card p:last-child{margin-bottom:0}
@media (min-width:782px){.tpf-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
.tpf-cards-4{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (min-width:782px){.tpf-cards-4{grid-template-columns:repeat(4,minmax(0,1fr))}}
.tpf-species{padding:0;overflow:hidden;border-top-width:1px;text-decoration:none}
.tpf-species a{display:block;height:100%;text-decoration:none;color:var(--tpf-text)}
.tpf-species img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:0}
.tpf-species .tpf-sp-body{padding:.6em .8em .8em}
.tpf-species .tpf-sp-name{display:block;font-weight:700;line-height:1.3;color:var(--tpf-accent)}
.tpf-species .tpf-sp-latin{display:block;font-size:.85em;font-style:italic;color:var(--tpf-muted)}
.tpf-species a:hover .tpf-sp-name{text-decoration:underline}

/* Pour vous / évitez */
.tpf-fit{display:grid;grid-template-columns:1fr;gap:14px;margin:1.2em 0}
.tpf-fit>div{padding:1em 1.2em;border-radius:var(--tpf-radius)}
.tpf-fit .tpf-yes{background:var(--tpf-accent-soft);border:1px solid var(--tpf-accent-line)}
.tpf-fit .tpf-no{background:var(--tpf-alert-soft);border:1px solid #f0cfc6}
.tpf-fit .tpf-no h3{color:var(--tpf-alert)}
.tpf-fit ul{margin:0}
@media (min-width:782px){.tpf-fit{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Images */
.tpf-fig-photo img{width:100%}
.tpf-fig-narrow{max-width:420px}

/* FAQ et repliables */
.tpf details{margin:.6em 0;padding:.2em 1em;border:1px solid var(--tpf-accent-line);border-radius:var(--tpf-radius);background:#fff}
.tpf details summary{padding:.6em 0;font-weight:700;cursor:pointer;color:var(--tpf-accent)}
.tpf details[open] summary{margin-bottom:.2em}
.tpf details table{margin-bottom:.8em}

/* Crédit */
.tpf-credit{margin-top:2em;font-size:.8em;color:var(--tpf-muted)}
.tpf-credit a{color:var(--tpf-muted)}
