/* La Plateforme — compléments au theme.json : composants produits par le convertisseur ou l'extension de site
   (témoignages, onglets, agenda, popups, cartes d'archives) et polices. Le reste du rendu vient de la CSS reprise. */

/* ---------- Étiquette de catégorie du héros (pages de campagne 57339, 57376 : lien .label-categorie conservé par le
   convertisseur ; valeurs de la CSS de page de la prod, N°257) ---------- */
a.label-categorie { background-color: var(--wp--preset--color--marine); color: var(--wp--preset--color--base); padding: 5px 25px; margin: 5px 15px 5px 5px; text-decoration: none; }
@media (max-width: 450px) { a.label-categorie { padding: 5px; font-size: .8em; } }

/* ---------- Témoignages et onglets (modules convertis en blocs) ---------- */
.lp-testimonial { background: #fff; box-shadow: 0 2px 18px rgba(0, 0, 0, .08); padding: 1.5rem; color: var(--wp--preset--color--gris); }
.lp-testimonial .wp-block-quote { border: 0; padding: 0; margin: 0; font-style: italic; }
.lp-testimonial .wp-block-quote cite { display: block; margin-top: 1rem; font-style: normal; font-weight: 600; color: var(--wp--preset--color--black); }
.lp-testimonial__photo img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.lp-accordion { display: flex; flex-direction: column; gap: .75rem; }
.lp-accordion > .wp-block-details { margin: 0; }
.lp-accordion .wp-block-details summary { font-weight: 600; color: var(--wp--preset--color--black); cursor: pointer; list-style: none; position: relative; padding-right: 2rem; }
.lp-accordion .wp-block-details summary::-webkit-details-marker { display: none; }
.lp-accordion .wp-block-details summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--wp--preset--color--primary); }
.lp-accordion .wp-block-details[open] summary::after { content: "–"; }
.lp-accordion .wp-block-details[open] summary { margin-bottom: .75rem; }

/* ---------- Événements ([lp_events], carrousel de l'accueil, N°326) ----------
   Mesures de la prod (carrousel d'agenda de l'ancien site) : cartes sans image, 15 px de retrait, titre Cy ExtraBold
   24 px orange, date et prix 17 px, extrait 15 px. Sans préréglage : 17 px, l'interligne et le gris #555 de l'extrait.
   Espacements préfixés par .lp-events : la section grise (.is-style-site :where(p), 0-2-0) remet 16 px sous les paragraphes. */
.lp-events .lp-event { box-sizing: border-box; padding: 0 15px; font-family: var(--wp--preset--font-family--body); font-weight: 500; }
.lp-events .lp-event > :is(h3, p) { margin: 0; padding: 0; }
.lp-events .lp-event > .lp-event__title { padding-bottom: 10px; margin-bottom: 16px; }
.lp-events .lp-event > .lp-event__extrait { margin-top: 15px; }
.lp-event__title { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: var(--wp--preset--font-size--x-large); line-height: 1; }
.lp-event__title a { color: var(--wp--preset--color--orange-vif); text-decoration: none; }
.lp-event__date, .lp-event__prix { color: var(--wp--preset--color--ink); font-size: 17px; line-height: 1.3; }
.lp-event__prix::before { content: "\e07b"; font-family: "LP Icons"; color: var(--wp--preset--color--primary); margin-right: 5px; }
.lp-event__extrait { color: #555; font-size: var(--wp--preset--font-size--small); line-height: 1.8; }

/* ---------- Colonne de droite collée (à activer par la classe CSS additionnelle de la colonne, page par page) ----------
   `lp-collante` : bloc bleu des infos pratiques des pages de formation, collé sous la barre d'ancres (77 px, collée par le
   réglage « Position collante » de son groupe) et jusqu'à la fin de sa rangée. Le bloc Colonne n'a pas ce réglage.
   La prod collait la colonne sur environ 22 pages, pas sur toutes : opt-in (retour client sur Bachelor IT).
   Le bloc fait jusqu'à 656 px de haut : sur une fenêtre plus basse que 760 px (80 px de décalage + 656 + marge) son bas
   serait coupé tant qu'il est collé, on ne le colle alors pas. */
@media (min-width: 981px) and (min-height: 760px) { .wp-block-column.lp-collante { position: sticky; top: 80px; } }

/* ---------- Page protégée par mot de passe (page Candidatures internes TSIC) ----------
   Le formulaire de WordPress s'affichait collé au bord gauche, sans marge : colonne centrée de 1 080 px, marges latérales. */
.post-password-form { max-width: 1080px; margin: 80px auto; padding-inline: 20px; box-sizing: border-box; }
.post-password-form p { margin: 0 0 20px; }
.post-password-form input[type="password"] {
	box-sizing: border-box; width: min(100%, 420px); padding: 10px 14px; margin-inline: 8px 12px;
	border: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--light);
}
@media (max-width: 600px) {
	.post-password-form label { display: block; }
	.post-password-form input[type="password"] { display: block; width: 100%; margin: 8px 0 12px; }
}

/* ---------- Popups (formulaires) ---------- */
.lp-popup { display: none; }
.lp-popup.is-open {
	display: block; position: fixed; z-index: 1000; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
	width: min(680px, 92vw); max-height: 90vh; overflow: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.lp-popup-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 999; }
/* Pages « ancien système » : ce conteneur (z-index 1) enfermait la fenêtre ouverte sous le voile. */
.lp-builder-inner-content:has(.lp-popup.is-open) { z-index: auto; }
.lp-popup__close { position: absolute; top: .5rem; right: .75rem; background: none; border: 0; font-size: 2rem; line-height: 1; color: inherit; cursor: pointer; }
.lp-form-placeholder { border: 1px dashed currentColor; padding: 1.25rem; }
/* Logo en tête de fenêtre : 250 px de large, centré, à toutes les largeurs (demande du 19/11, N°301). Fenêtres converties :
   bloc Image en tête de la variation popup (sur le front, popup.js insère avant lui le bouton de fermeture) ; ancien
   système : modules image « sticky » (46 % de la rangée sinon). */
.is-style-popup > .wp-block-image:first-child,
.is-style-popup > .lp-popup__close:first-child + .wp-block-image { text-align: center; }
.is-style-popup > .wp-block-image:first-child img,
.is-style-popup > .lp-popup__close:first-child + .wp-block-image img,
.lp-popup .lp-image-sticky { width: 250px; max-width: 100%; height: auto; }
.lp-popup .lp-image-sticky { margin-inline: auto; }
/* Fenêtres à formulaire : contenu à 80 % de la fenêtre (544 px sur 680) comme la rangée de la prod, 90 % en
   mobile (323 px sur 359, comme l'ancien système). Marge intérieure fluide de 18 px (390 px d'écran) à 68 px (dès
   ~740 px, fenêtre à 680 px) ; les fenêtres sans formulaire (/lab-ia/) gardent les 30 px de la variation (N°301). */
.is-style-popup:has(.gform_wrapper, .lp-form-placeholder) { padding-inline: clamp(18px, 14.3vw - 38px, 68px); }
/* Formulaires sur le fond noir de la variation popup. Gravity Forms pose les couleurs de libellé par formulaire
   (sélecteur d'ID) : !important sur ces variables-là. La mention Bloctel a sa couleur en ligne. */
.is-style-popup .gform-theme--orbital {
	--gf-ctrl-label-color-primary: var(--wp--preset--color--base) !important;
	--gf-ctrl-label-color-secondary: var(--wp--preset--color--base) !important;
	--gf-ctrl-label-color-tertiary: var(--wp--preset--color--light);
	--gf-ctrl-label-color-quaternary: var(--wp--preset--color--light);
	--gf-ctrl-desc-color: var(--wp--preset--color--light);
	/* astérisques et erreurs : rouge lisible sur noir */
	--gf-color-danger: var(--wp--preset--color--rose-clair) !important;
	--gf-color-danger-rgb: 255, 107, 168 !important;
}
.is-style-popup .gfield--type-html [style*="color"] { color: inherit !important; }
.is-style-popup .gfield--type-html a { color: inherit; text-decoration: underline; }

/* ---------- Cartes d'articles des archives et de la recherche (composition post-cards) ---------- */
.lp-card { background: #fff; box-shadow: var(--wp--preset--shadow--card); padding-bottom: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.lp-card > * { margin: 0 !important; }
.lp-card > :not(.wp-block-image):not(.wp-block-post-featured-image) { padding-inline: 1.25rem; }
.lp-card .wp-block-image img, .lp-card .wp-block-post-featured-image img { width: 100%; height: auto; display: block; }
.lp-cards .wp-block-post-template { gap: 1.5rem; }
.wp-block-query .lp-card > * + * { margin-block-start: 1.25rem; }

/* Noms de polices utilisés par la CSS reprise de l'ancien site */
@font-face { font-family: "Cy-black"; font-weight: 400 900; font-display: swap; src: url("../fonts/cy-black.woff2") format("woff2"); }
@font-face { font-family: "Cy-extrabold"; font-weight: 400 900; font-display: swap; src: url("../fonts/cy-extrabold.woff2") format("woff2"); }
@font-face { font-family: "Cy-bold"; font-weight: 400 900; font-display: swap; src: url("../fonts/cy-bold.woff2") format("woff2"); }
@font-face { font-family: "Cy-Bold"; font-weight: 400 900; font-display: swap; src: url("../fonts/cy-bold.woff2") format("woff2"); }
@font-face { font-family: "Cy-ExtraBold"; font-weight: 400 900; font-display: swap; src: url("../fonts/cy-extrabold.woff2") format("woff2"); }
@font-face { font-family: "Cy-Black"; font-weight: 400 900; font-display: swap; src: url("../fonts/cy-black.woff2") format("woff2"); }

/* ---------- Gabarits hors contenu repris (archives, recherche, 404) ---------- */
:where(h1, h2, h3, h4, h5, h6) { font-family: var(--wp--preset--font-family--display); font-weight: 800; color: #000; line-height: 1.2; }

/* ---------- Modèles « Page en code » (pages construites en HTML qui comptaient sur les réglages de l'ancien site) ----------
   Titres en noir comme sur l'ancien site (le style « site » met les h2 en bleu), mais en Cy selon la charte : écart voulu
   avec la prod, qui les affichait en Poppins (décision du 27/10). Spécificité 0,1,0 (:root) : égale au style
   « site » (:root :where(.is-style-site--N h2)), chargé avant cette feuille, donc battu ; la CSS de la page, chargée
   après dans le contenu, garde la main à spécificité égale ou supérieure. */
:root :where(.lp-page-code) :where(h1, h2, h3, h4, h5, h6) { font-family: var(--wp--preset--font-family--display); color: #000; }
:where(a) { color: var(--wp--preset--color--primary); text-decoration: none; }
:where(.lp-accordion .wp-block-details) { border: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--light); padding: 1rem 1.25rem; }
.lp-main.is-layout-constrained > * + * { margin-block-start: 1.25rem; }
.lp-page-content > .wp-block-group.alignfull:first-child { margin-top: 0; }
.lp-page-content > .wp-block-group.alignfull { margin-block: 0; }

/* ---------- Éditeur : popups visibles et nommées (masquées sur le site) ---------- */
.editor-styles-wrapper .lp-popup { display: block; position: relative; outline: 2px dashed var(--wp--preset--color--primary); outline-offset: 4px; margin-block: 40px; }
.editor-styles-wrapper .lp-popup::before { content: "Popup — s'ouvre sur un lien vers #" attr(id); display: block; font: 600 12px/1.4 var(--wp--preset--font-family--body); color: var(--wp--preset--color--base); background: var(--wp--preset--color--primary); padding: 4px 8px; margin: -30px -30px 20px; }

/* Polices de repli aux métriques ajustées (Arial recalée sur Poppins et Cy) : pas de décalage quand la police arrive. */
@font-face { font-family: "Poppins Fallback"; src: local("Arial"); size-adjust: 112%; ascent-override: 93.8%; descent-override: 31.3%; line-gap-override: 8.9%; }
@font-face { font-family: "Cy Fallback"; src: local("Arial"); size-adjust: 106.2%; ascent-override: 100.8%; descent-override: 23.5%; line-gap-override: 0%; }

/* Encart provisoire des formulaires (Gravity Forms non installé) : lisible sur tous les fonds. */
.lp-form-placeholder { background: var(--wp--preset--color--base); color: var(--wp--preset--color--ink); }
.lp-form-placeholder a { color: var(--wp--preset--color--primary); }
