/*
Theme Name: Twenty Twenty-Five · Académie Puchol
Theme URI: https://academiepuchol.fr
Description: Thème enfant de Twenty Twenty-Five. Charte graphique web v1 de l'Académie Puchol.
Template: twentytwentyfive
Version: 1.4.12
Author: VG Production
Text Domain: twentytwentyfive-child
Requires at least: 6.6
*/

/* Les couleurs, polices, tailles et espacements viennent de theme.json. Ce fichier ne contient que les composants. */

/* — Sections pleine largeur : aucun espace blanc entre deux sections (le « blockGap » racine de 16px ne doit pas s'appliquer) — */
:is(main, .wp-block-post-content) > .alignfull { margin-block-start: 0; margin-block-end: 0; }

/* — Défilement doux des liens d'ancre (sommaire…), désactivé si l'utilisateur réduit les animations — */
html { scroll-behavior: smooth; }
:target, [id] { scroll-margin-top: var(--wp--preset--spacing--l); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* — Liens : soulignement fin, 2px au survol (la couleur vient de theme.json) — */
a { text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color 150ms ease; }
a:hover { text-decoration-thickness: 2px; }
:where(a, button, summary, .wp-element-button):focus-visible { outline: 2px solid var(--wp--preset--color--noir); outline-offset: 2px; }
.is-style-section-noire :where(a, button, summary, .wp-element-button):focus-visible { outline-color: var(--wp--preset--color--or); }

.wp-block-image img, .wp-block-embed iframe { border-radius: 0; }

/* — Boutons — */
.wp-element-button, .wp-block-button__link { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; transition: background-color 150ms ease, color 150ms ease; }

/* — Petit titre + filet or (un seul par section) — */
p.is-style-eyebrow { font-size: var(--wp--preset--font-size--eyebrow); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; line-height: 1.2; color: var(--wp--preset--color--or-texte); }
p.is-style-eyebrow::after { content: ""; display: block; width: 40px; height: 2px; margin-top: 16px; background: var(--wp--preset--color--or); }
/* Le filet suit l'alignement du texte du paragraphe */
p.is-style-eyebrow.has-text-align-center::after { margin-inline: auto; }
p.is-style-eyebrow.has-text-align-right::after { margin-left: auto; }
.is-style-section-noire p.is-style-eyebrow { color: var(--wp--preset--color--or); }

/* — Niveau / étiquette de carte (comme le petit titre, sans filet) — */
p.niveau { font-size: var(--wp--preset--font-size--eyebrow); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; line-height: 1.2; color: var(--wp--preset--color--gris-texte); }
p.niveau.has-or-texte-color { color: var(--wp--preset--color--or-texte); }

/* — Chapô — */
p.is-style-chapo, .wp-block-term-description.is-style-chapo { font-size: var(--wp--preset--font-size--large); font-weight: 300; line-height: 1.55; max-width: 60ch; text-wrap: pretty; }
p.is-style-chapo strong, .is-style-chapo strong { font-weight: 700; }

/* — Filet haut (points numérotés, chiffres-clés, pieds de carte) — */
.is-style-filet-haut { border-top: 1px solid var(--wp--custom--filet); }

/* — Cartes : toute la carte est cliquable via le lien du titre — */
.is-style-carte, .is-style-carte-accent { position: relative; background: var(--wp--preset--color--blanc); border: 1px solid var(--wp--custom--filet); transition: background-color 150ms ease; }
.is-style-carte:hover { background: var(--wp--preset--color--creme); }
.has-creme-background-color .is-style-carte:hover { background: var(--wp--preset--color--creme-fonce); }
.is-style-carte > .wp-block-group { flex: 1; }
.wp-block-post-template > li > .is-style-carte { height: 100%; }
.is-style-carte :is(.wp-block-image, .wp-block-post-featured-image) { margin: 0; }
.is-style-carte :is(.wp-block-image, .wp-block-post-featured-image) img { display: block; width: 100%; }
.is-style-carte h3 a { text-decoration: none; color: inherit; }
.is-style-carte .wp-block-post-excerpt__excerpt { margin: 0; }
.is-style-carte .wp-block-post-terms { font-size: var(--wp--preset--font-size--eyebrow); }
.is-style-carte h3 a::after { content: ""; position: absolute; inset: 0; }
.is-style-carte h3 a:focus-visible { outline: none; }
.is-style-carte:has(h3 a:focus-visible) { outline: 2px solid var(--wp--preset--color--noir); outline-offset: 2px; }
.is-style-carte .is-style-filet-haut { margin-top: auto; }
.is-style-carte :is(p, .wp-block-post-excerpt) { font-size: var(--wp--preset--font-size--caption); line-height: 1.6; text-wrap: pretty; }
.is-style-carte .wp-block-columns .wp-block-image, .is-style-carte .wp-block-columns .wp-block-image img { height: 100%; object-fit: cover; }

/* Lien de carte (« Voir les leçons ») : un paragraphe souligné, pas un bouton */
p.is-style-lien-carte { margin-top: auto; padding-top: var(--wp--preset--spacing--xs); font-weight: 800; letter-spacing: .02em; color: var(--wp--preset--color--or-texte); }
p.is-style-lien-carte { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Carte accentuée : une seule par écran */
.is-style-carte-accent { background: var(--wp--preset--color--creme); border: 0; border-left: 3px solid var(--wp--preset--color--or); }
.has-blanc-background-color.is-style-carte-accent { background: var(--wp--preset--color--blanc); border: 1px solid var(--wp--custom--filet); border-left: 3px solid var(--wp--preset--color--or); }

/* — À propos : équipe, frise, presse — */
.membre-legende { border-top: 2px solid var(--wp--preset--color--or); padding-top: var(--wp--preset--spacing--s); }
.frise-fin { border-bottom: 1px solid var(--wp--custom--filet); }
.frise .wp-element-caption { font-size: var(--wp--preset--font-size--caption); line-height: 1.55; color: var(--wp--preset--color--gris-texte); margin-top: var(--wp--preset--spacing--xs); }
.carte-presse { background: var(--wp--preset--color--blanc); border: 1px solid var(--wp--custom--filet); }
.carte-presse > .wp-block-image img { width: auto; max-width: 200px; object-position: left center; }
.carte-presse p.lien-presse { margin-top: auto; font-weight: 800; letter-spacing: .02em; }
.carte-presse { display: flex; flex-direction: column; }
.carte-presse > .wp-block-image:not(:first-child) { margin: 0; }

/* — Encadré « Attention » — */
.is-style-attention { background: rgba(198, 188, 137, .14); border-left: 3px solid var(--wp--preset--color--or); padding: var(--wp--preset--spacing--m) var(--wp--preset--spacing--l); }
.is-style-attention::before { content: "Attention"; display: block; margin-bottom: 8px; font-size: var(--wp--preset--font-size--eyebrow); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--wp--preset--color--or-texte); }

/* — Citation (Instrument Serif, bordure gauche or) — */
p.is-style-citation { font-family: var(--wp--preset--font-family--instrument-serif); font-size: var(--wp--preset--font-size--quote); line-height: 1.3; color: var(--wp--preset--color--noir); border-left: 3px solid var(--wp--preset--color--or); padding-left: 28px; text-wrap: pretty; }
.wp-block-quote { font-style: normal; }
.wp-block-quote p { margin: 0; text-wrap: pretty; }
.wp-block-quote cite { display: block; margin-top: var(--wp--preset--spacing--xs); font-family: var(--wp--preset--font-family--mulish); font-size: var(--wp--preset--font-size--small); font-style: normal; font-weight: 700; letter-spacing: .04em; color: var(--wp--preset--color--gris-texte); }

/* — Listes avantages / limites — */
ul.is-style-liste-avantages, ul.is-style-liste-limites { list-style: none; padding-left: 0; }
ul.is-style-liste-avantages li, ul.is-style-liste-limites li { position: relative; padding-left: 32px; }
ul.is-style-liste-avantages li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--wp--preset--color--vert); }
ul.is-style-liste-limites li::before { content: "✕"; position: absolute; left: 0; font-weight: 800; color: var(--wp--preset--color--terracotta); }

/* — FAQ (core/details) — */
.wp-block-details { border-top: 1px solid var(--wp--custom--filet); }
.wp-block-details:last-of-type { border-bottom: 1px solid var(--wp--custom--filet); }
.wp-block-details summary { display: flex; justify-content: space-between; align-items: center; gap: var(--wp--preset--spacing--m); min-height: 44px; padding: var(--wp--preset--spacing--m) 0; cursor: pointer; list-style: none; font-size: var(--wp--preset--font-size--card-title); font-weight: 700; line-height: 1.35; color: var(--wp--preset--color--noir); }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; flex: none; width: 32px; text-align: center; font-size: var(--wp--preset--font-size--quote); font-weight: 300; color: var(--wp--preset--color--or-texte); }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > :not(summary) { max-width: 68ch; padding-right: 56px; }
.wp-block-details > summary + * { margin-block-start: 0; }
.wp-block-details > :last-child { margin-bottom: var(--wp--preset--spacing--l); }

/* — Témoignages : légende avec filet or — */
.temoin-legende { align-items: center; letter-spacing: .04em; }
.temoin-legende::before { content: ""; flex: none; width: 24px; height: 2px; background: var(--wp--preset--color--or); }
.temoin-legende p { margin: 0; }

/* — Blog : grille d'articles, pagination — */
.post-categorie, .post-categorie a { white-space: normal; font-size: var(--wp--preset--font-size--eyebrow); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; line-height: 1.2; text-decoration: none; color: var(--wp--preset--color--or-texte); }
.pagination-puchol { align-items: center; padding-top: var(--wp--preset--spacing--l); border-top: 1px solid var(--wp--custom--filet); margin-top: var(--wp--preset--spacing--xl); gap: var(--wp--preset--spacing--m); }
.pagination-puchol .wp-block-query-pagination-numbers { display: flex; gap: 8px; }
.pagination-puchol .page-numbers { display: flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; border: 1px solid var(--wp--custom--filet); font-weight: 700; text-decoration: none; color: var(--wp--preset--color--noir); transition: background-color 150ms ease; }
.pagination-puchol a.page-numbers:hover { background: var(--wp--preset--color--creme); }
.pagination-puchol .page-numbers.current { background: var(--wp--preset--color--noir); color: var(--wp--preset--color--blanc); border-color: var(--wp--preset--color--noir); }
.pagination-puchol .page-numbers.dots { border: 0; }
.pagination-puchol :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next) { display: flex; align-items: center; min-height: 44px; font-weight: 800; letter-spacing: .02em; }

/* — Fil d'Ariane Yoast (hero noir) — */
.yoast-breadcrumbs { font-size: var(--wp--preset--font-size--caption); line-height: 1.55; color: var(--wp--preset--color--ivoire-sourd); }
.yoast-breadcrumbs .breadcrumb_last { color: var(--wp--preset--color--ivoire); }

/* — Articles — */
.wp-element-caption { font-size: var(--wp--preset--font-size--caption); line-height: 1.55; color: var(--wp--preset--color--gris-texte); }
.wp-block-post-content :where(ol, ul) { padding-left: var(--wp--preset--spacing--m); }
.wp-block-post-content :where(li + li) { margin-top: var(--wp--preset--spacing--xs); }

/* — Divers — */
.has-ivoire-sourd-color strong { color: var(--wp--preset--color--ivoire); }
.is-style-photo-collante, .photo-collante { position: sticky; top: var(--wp--preset--spacing--l); }
.wp-block-embed iframe { display: block; }

/* — Mobile : tout s'empile, grilles à 1 colonne, boutons pleine largeur — */
@media (max-width: 781px) {
	.is-layout-grid { grid-template-columns: 1fr !important; }
	.is-layout-grid.grille-2-mobile { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.wp-block-buttons > .wp-block-button, .wp-block-buttons > .wp-block-button .wp-block-button__link { width: 100%; }
	.photo-collante { position: static; }
	.hero-visuel { justify-content: flex-start; }
	.hero-visuel .wp-block-image, .hero-visuel .wp-block-image img { width: 100% !important; }
	.is-style-carte .wp-block-columns .wp-block-image img { height: auto; aspect-ratio: 16 / 9; }
}

/* — Espace membre : en-tête et pied de page dédiés — */
.header-membre a, .footer-membre a { color: var(--wp--preset--color--blanc); text-decoration: none; }
.header-membre a:hover, .footer-membre a:hover { color: var(--wp--preset--color--or); }
.header-membre p { margin: 0; }
.header-membre .wp-block-loginout a { font-size: var(--wp--preset--font-size--medium); }

/* — Menu de l'en-tête : liens dorés au survol, sans soulignement (repris de l'ancien extrait WPCode) — */
.En-tete a:hover { text-decoration: none !important; color: var(--wp--preset--color--or) !important; transition: color .5s ease; }


/* — Page « Tes partitions offertes » : cartes de téléchargement cliquables — */
.dl-card { position: relative; transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.dl-card a { text-decoration: none; color: var(--wp--preset--color--encre); }
.dl-card a::after { content: ""; position: absolute; inset: 0; }
.dl-card:hover, .dl-card:focus-within { border-color: var(--wp--preset--color--or) !important; box-shadow: 0 6px 18px rgba(46, 46, 46, .08); transform: translateY(-2px); }
.dl-card .dl-action::after { content: " →"; transition: margin-left 150ms ease; }
.dl-card:hover .dl-action::after { margin-left: 4px; }
.dl-card a:focus-visible { outline: 2px solid var(--wp--preset--color--or); outline-offset: 6px; }

/* Le pied de page colle à la dernière section, sur toutes les pages (sinon une bande claire de 16 px apparaît) */
footer.wp-block-template-part { margin-block-start: 0; }

/* Grilles de 4 cartes (cursus, livres) : 2 colonnes sur tablette */
@media (min-width: 782px) and (max-width: 1100px) {
	.is-layout-grid.grille-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Page Élèves : toutes les vidéos au même format 16:9 (les vidéos verticales sont centrées avec des bandes) */
.page-id-31149 .wp-block-embed.is-type-video .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; height: auto; }
.page-id-31149 .wp-block-embed.is-type-video .wp-block-embed__wrapper::before { content: none; padding-top: 0; }
.page-id-31149 .wp-block-embed.is-type-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Vidéos bonus à regarder dans l'ordre : les suivantes sont grisées et non cliquables */
.carte-video-a-venir { filter: grayscale(1); opacity: .5; pointer-events: none; user-select: none; }
.carte-video-active { outline: 2px solid var(--wp--preset--color--or); outline-offset: -2px; }

/* Vidéos bonus : colonne de la série, cartes débloquées au fur et à mesure */
.ap-bonus-serie { display: flex; flex-direction: column; gap: 14px; }
.ap-bonus-serie__titre { margin: 0; font-family: var(--wp--preset--font-family--instrument-serif, serif); font-size: 1.6rem; text-align: center; }
.ap-bonus-carte { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 10px; background: var(--wp--preset--color--creme, #f7f4ec); color: inherit; text-decoration: none; text-align: center; border: 2px solid transparent; transition: border-color .15s; }
.ap-bonus-carte img { width: 100%; height: auto; border-radius: 6px; margin-bottom: 6px; }
.ap-bonus-carte__num { font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--wp--preset--color--or-texte, #756425); }
.ap-bonus-carte__titre { font-weight: 700; line-height: 1.3; }
.ap-bonus-carte__etat { font-size: .9rem; text-decoration: underline; }
.ap-bonus-carte.is-current { border-color: var(--wp--preset--color--or, #c6bc89); }
.ap-bonus-carte.is-current .ap-bonus-carte__etat { text-decoration: none; font-style: italic; }
.ap-bonus-carte.is-open:hover { border-color: var(--wp--preset--color--or, #c6bc89); }
.ap-bonus-carte.is-locked { filter: grayscale(1); opacity: .5; pointer-events: none; }
.ap-bonus-carte.is-locked .ap-bonus-carte__etat { text-decoration: none; }
.ap-bonus-suivante { margin-top: var(--wp--preset--spacing--m, 24px); padding: 20px; border-radius: 10px; background: var(--wp--preset--color--creme, #f7f4ec); text-align: center; }
.ap-bonus-suivante p { margin: 0 0 12px; font-weight: 700; }
.ap-bonus-suivante[hidden] { display: none; }
.ap-bandeau-serie { margin: 0; }

/* Vidéos bonus sur fond noir : ressources et commentaires dans la colonne de la vidéo */
.is-style-section-noire .ap-encadre-sombre { background: var(--wp--preset--color--encre, #2b2b2b); border-radius: 10px; }
.is-style-section-noire .ap-encadre-sombre a { color: var(--wp--preset--color--or, #c6bc89); }
.is-style-section-noire .ap-commentaires-sombres input:not([type=submit]):not([type=checkbox]), .is-style-section-noire .ap-commentaires-sombres textarea { background: var(--wp--preset--color--encre, #2b2b2b); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.is-style-section-noire .ap-commentaires-sombres .wp-block-comment-date a, .is-style-section-noire .ap-commentaires-sombres .comment-reply-link { color: var(--wp--preset--color--or, #c6bc89); }
.is-style-section-noire .ap-bonus-carte { background: var(--wp--preset--color--encre, #2b2b2b); color: #fff; }
.is-style-section-noire .ap-bonus-carte__num { color: var(--wp--preset--color--or, #c6bc89); }
.is-style-section-noire .ap-bonus-suivante { background: var(--wp--preset--color--encre, #2b2b2b); }

/* « Ton profil » : 5 cartes (3 colonnes sur tablette, 1 sur mobile) */
@media (min-width: 782px) and (max-width: 1100px) {
	.is-layout-grid.grille-5 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
.carte-profil { position: relative; transition: transform .2s, background-color .2s; }
.carte-profil:hover, .has-creme-background-color .is-style-carte.carte-profil:hover { transform: translateY(-3px); background: var(--wp--preset--color--noir, #1c1c1c); border-color: var(--wp--preset--color--noir, #1c1c1c); } /* prime sur le survol crème des cartes */
.carte-profil h3 a { color: inherit; text-decoration: none; }
.carte-profil h3 a::after { content: ""; position: absolute; inset: 0; } /* toute la carte est cliquable */
.carte-profil__icone { width: 56px; height: 56px; margin: 0 auto 4px; border-radius: 50%; background: var(--wp--preset--color--or, #c6bc89); color: var(--wp--preset--color--noir, #1c1c1c); display: flex; align-items: center; justify-content: center; transition: transform .2s; }
.carte-profil:hover .carte-profil__icone { transform: scale(1.08); }
.carte-profil:hover h3, .carte-profil:hover h3 a { color: #fff; }
.carte-profil:hover p { color: var(--wp--preset--color--ivoire, #e9e6de); }
.carte-profil:hover .is-style-lien-carte a { color: var(--wp--preset--color--or, #c6bc89); }
.carte-profil > .wp-block-group { padding-top: var(--wp--preset--spacing--m) !important; }
