×
Découvrez l'ESTBB !
Explorez nos formations en biotechnologies, du post-bac au Bac +5, dans notre nouvelle brochure.
Télécharger la brochure
// ==========================
// CONFIGURATION ESTBB
// ==========================
const BRAND_PRIMARY = "#1AA4A6";
const BRAND_LIGHT = "#E8F7F7";
const BRAND_DARK = "#08787A";
const IMAGE_URL =
"https://www.ucly.fr/wp-content/uploads/2025/07/640x780-d.jpg";
const LYON_URL =
"https://www.ucly.fr/l-ucly/agenda/journee-portes-ouvertes-ucly-lyon-decembre/";
const ANNECY_URL =
"https://www.ucly.fr/l-ucly/agenda/journee-portes-ouvertes-annecy-decembre/";
const ALL_DATES_URL =
"https://www.ucly.fr/nos-portes-ouvertes-et-rendez-vous/inscription-jpo/";
const SESSION_KEY = "estbbJpoDec2026Shown";
// ==========================
// AFFICHAGE SUR L'ACCUEIL
// ==========================
function onEstbbHome() {
const isPreview =
location.search.includes("preview=true") ||
location.search.includes("preview_id");
const hostOk =
/(^|\.)estbb\.fr$/i.test(location.hostname);
const pathOk =
location.pathname === "/" ||
location.pathname === "/index.html";
return (hostOk && pathOk) || isPreview;
}
if (!onEstbbHome()) return;
// ==========================
// STYLES
// ==========================
const style = document.createElement("style");
style.textContent = `
:root {
--estbb-jpo-primary: ${BRAND_PRIMARY};
--estbb-jpo-light: ${BRAND_LIGHT};
--estbb-jpo-dark: ${BRAND_DARK};
}
/* OVERLAY */
.estbb-jpo-overlay {
position: fixed;
inset: 0;
display: none;
place-items: center;
box-sizing: border-box;
padding: 24px;
background: rgba(0,0,0,.60);
z-index: 99999;
}
.estbb-jpo-overlay[aria-hidden="false"] {
display: grid;
}
/* POP-UP */
.estbb-jpo-modal {
position: relative;
display: grid;
grid-template-columns: 285px 1fr;
width: min(92vw,780px);
background: #fff;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 25px 60px rgba(0,0,0,.30);
transform: translateY(15px) scale(.97);
opacity: 0;
transition: transform .3s ease, opacity .3s ease;
}
.estbb-jpo-overlay[aria-hidden="false"]
.estbb-jpo-modal {
transform: translateY(0) scale(1);
opacity: 1;
}
/* VISUEL GAUCHE */
.estbb-jpo-visual {
width: 100%;
height: 100%;
min-height: 100%;
align-self: stretch;
background-image: url("${IMAGE_URL}");
background-size: cover;
background-position: center 32%;
background-repeat: no-repeat;
}
/* CONTENU DROITE */
.estbb-jpo-content {
display: flex;
flex-direction: column;
justify-content: center;
box-sizing: border-box;
padding: 30px 34px 28px;
text-align: left;
}
/* SURTITRE */
.estbb-jpo-kicker {
margin: 0 0 6px;
color: var(--estbb-jpo-dark);
font-size: 10px;
font-weight: 800;
letter-spacing: .06em;
text-transform: uppercase;
}
/* TITRE */
.estbb-jpo-title {
margin: 0 0 10px;
color: var(--estbb-jpo-dark);
font-size: 27px;
line-height: 1.1;
font-weight: 800;
}
/* DESCRIPTION */
.estbb-jpo-desc {
margin: 0 0 17px;
color: #666;
font-size: 13px;
line-height: 1.5;
}
/* DATE */
.estbb-jpo-date {
display: flex;
align-items: center;
gap: 13px;
box-sizing: border-box;
margin-bottom: 15px;
padding: 11px 14px;
background: var(--estbb-jpo-light);
border-radius: 9px;
}
/* ICÔNE CALENDRIER */
.estbb-jpo-calendar {
position: relative;
flex: 0 0 auto;
width: 27px;
height: 25px;
box-sizing: border-box;
border: 2px solid var(--estbb-jpo-dark);
border-radius: 4px;
}
.estbb-jpo-calendar::before {
content: "";
position: absolute;
top: 5px;
left: 0;
width: 100%;
border-top: 2px solid var(--estbb-jpo-dark);
}
.estbb-jpo-calendar::after {
content: "•••";
position: absolute;
top: 4px;
left: 3px;
color: var(--estbb-jpo-dark);
font-size: 12px;
font-weight: 900;
letter-spacing: 1px;
}
/* TEXTE DATE */
.estbb-jpo-date-text {
display: flex;
flex-direction: column;
gap: 1px;
}
.estbb-jpo-date-main {
color: var(--estbb-jpo-dark);
font-size: 17px;
line-height: 1.1;
font-weight: 800;
}
.estbb-jpo-date-place {
color: #555;
font-size: 12px;
line-height: 1.2;
font-weight: 500;
}
/* ACTIONS */
.estbb-jpo-actions {
display: flex;
flex-direction: column;
gap: 8px;
}
/* BOUTONS */
.estbb-jpo-btn {
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
min-height: 42px;
padding: 0 14px;
border: 2px solid var(--estbb-jpo-primary);
border-radius: 8px;
font-size: 13px;
font-weight: 800;
line-height: 1.2;
text-decoration: none !important;
transition:
background .2s ease,
transform .2s ease,
filter .2s ease;
}
/* CTA PRINCIPAUX */
.estbb-jpo-btn-primary {
background: var(--estbb-jpo-primary);
color: #111 !important;
}
.estbb-jpo-btn-primary:hover {
filter: brightness(.94);
transform: translateY(-1px);
color: #111 !important;
}
/* CTA AUTRES DATES */
.estbb-jpo-btn-secondary {
background: #fff;
color: var(--estbb-jpo-dark) !important;
}
.estbb-jpo-btn-secondary:hover {
background: var(--estbb-jpo-light);
transform: translateY(-1px);
}
/* FLÈCHES */
.estbb-jpo-arrow {
flex: 0 0 auto;
margin-left: 14px;
font-size: 18px;
font-weight: 400;
line-height: 1;
}
/* CROIX */
.estbb-jpo-close {
position: absolute;
top: 10px;
right: 10px;
z-index: 20;
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
padding: 0;
border: 0;
border-radius: 50%;
background: rgba(0,0,0,.55);
color: #fff;
font-family: Arial, sans-serif;
font-size: 15px;
line-height: 1;
cursor: pointer;
transition:
background .2s ease,
transform .2s ease;
}
.estbb-jpo-close:hover {
background: rgba(0,0,0,.75);
transform: scale(1.05);
}
/* TABLETTE */
@media (max-width: 760px) {
.estbb-jpo-modal {
grid-template-columns: 240px 1fr;
width: min(94vw,680px);
}
.estbb-jpo-content {
padding: 25px 25px 23px;
}
.estbb-jpo-title {
font-size: 23px;
}
.estbb-jpo-desc {
font-size: 12px;
}
.estbb-jpo-date-main {
font-size: 15px;
}
}
/* MOBILE */
@media (max-width: 560px) {
.estbb-jpo-overlay {
padding: 12px;
}
.estbb-jpo-modal {
display: block;
width: 100%;
max-width: 390px;
max-height: 94vh;
overflow-y: auto;
}
.estbb-jpo-visual {
width: 100%;
height: 145px;
min-height: 145px;
background-position: center 35%;
}
.estbb-jpo-content {
padding: 19px 18px 18px;
text-align: center;
}
.estbb-jpo-kicker {
font-size: 9px;
}
.estbb-jpo-title {
margin-bottom: 7px;
font-size: 21px;
}
.estbb-jpo-desc {
margin-bottom: 13px;
font-size: 12px;
}
.estbb-jpo-date {
justify-content: center;
margin-bottom: 13px;
padding: 9px 12px;
text-align: left;
}
.estbb-jpo-calendar {
width: 24px;
height: 23px;
}
.estbb-jpo-date-main {
font-size: 15px;
}
.estbb-jpo-date-place {
font-size: 11px;
}
.estbb-jpo-btn {
min-height: 40px;
padding: 0 12px;
font-size: 12px;
text-align: left;
}
}
`;
document.head.appendChild(style);
// ==========================
// STRUCTURE HTML
// ==========================
const wrapper = document.createElement("div");
wrapper.innerHTML = `
✕
Découvrez votre future école
Journées Portes Ouvertes
Venez découvrir l’ESTBB, rencontrer nos équipes
et échanger avec nos étudiants sur les formations
en biotechnologies et sciences du vivant.
Samedi 05 décembre
Lyon & Annecy
`;
// ==========================
// FONCTIONNEMENT
// ==========================
function initPopup() {
if (document.getElementById("estbb-jpo-overlay")) {
return;
}
document.body.appendChild(wrapper);
const overlay =
document.getElementById("estbb-jpo-overlay");
function open() {
const isPreview =
location.search.includes("preview=true") ||
location.search.includes("preview_id");
if (
!isPreview &&
sessionStorage.getItem(SESSION_KEY)
) {
return;
}
overlay.setAttribute("aria-hidden", "false");
if (!isPreview) {
sessionStorage.setItem(SESSION_KEY, "true");
}
}
function close() {
overlay.setAttribute("aria-hidden", "true");
}
wrapper
.querySelectorAll("[data-close]")
.forEach(button => {
button.addEventListener("click", close);
});
overlay.addEventListener("click", event => {
if (event.target === overlay) {
close();
}
});
document.addEventListener("keydown", event => {
if (event.key === "Escape") {
close();
}
});
setTimeout(open, 700);
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", initPopup);
} else {
initPopup();
}
})();
Suivez-nous sur Instagram & LinkedIn
Découvrez nos photos et nos actualités. Retrouvez-nous aussi directement sur nos réseaux.