/**
 * prolabohomeo — template de site sur mesure (from scratch)
 * Charte Labohomeo.swiss : bleu #0F61B4 / vert #8FBE22
 *
 * (C) 2026 i-FormaSite — info@i-formasite.ch — GPL-2.0-or-later
 */

/* ==========================================================================
   1. Variables & base
   ========================================================================== */

:root {
    --labo-blue: #0f61b4;
    --labo-blue-deep: #0a4a8c;
    --labo-blue-darker: #083a6e;
    --labo-blue-light: #eaf2fb;
    --labo-green: #8fbe22;
    --labo-green-dark: #74a012;
    --labo-green-ink: #1f2c06;
    --labo-bg: #f4f8fc;
    --labo-surface: #ffffff;
    --labo-ink: #1c2f45;
    --labo-muted: #5a6e84;
    --labo-line: #dce6f0;
    --labo-radius: 1rem;
    --labo-radius-sm: .6rem;
    --labo-shadow: 0 1px 2px rgba(12, 55, 100, .06), 0 8px 24px -12px rgba(12, 55, 100, .18);
    --labo-shadow-lift: 0 2px 4px rgba(12, 55, 100, .08), 0 18px 38px -16px rgba(12, 55, 100, .28);
    --labo-font: "Segoe UI", Roboto, "Helvetica Neue", system-ui, -apple-system, sans-serif;

    /* Compatibilité : variable reprise par com_medicaments */
    --cassiopeia-color-primary: var(--labo-blue);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.site {
    margin: 0;
    font-family: var(--labo-font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--labo-ink);
    background: var(--labo-bg);
    -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5 {
    color: var(--labo-ink);
    font-weight: 650;
    letter-spacing: -.015em;
    line-height: 1.25;
    margin: 0 0 .6em;
}

h1, .h1 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
h2, .h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
h3, .h3 { font-size: 1.2rem; }
h4, .h4 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }

/* Aucun soulignement de lien sur tout le site (exigence utilisateur),
   y compris contre les CSS de composants et d'extensions tierces */
a, a:hover, a:focus, a:active { text-decoration: none !important; }
a { color: var(--labo-blue); transition: color .15s ease; }
a:hover, a:focus { color: var(--labo-blue-deep); }

hr { border: 0; border-top: 1px solid var(--labo-line); margin: 1.5rem 0; }

::selection { background: rgba(143, 190, 34, .35); }

:focus-visible { outline: 3px solid rgba(143, 190, 34, .55); outline-offset: 2px; border-radius: .25rem; }

/* Conteneurs */
.labo-container { max-width: 1320px; margin-inline: auto; padding-inline: clamp(1rem, 3vw, 1.5rem); }
.labo-container-fluid { max-width: none; margin-inline: auto; padding-inline: clamp(1rem, 3vw, 2rem); }

/* Lien d'évitement */
.labo-skip {
    position: absolute; left: -9999px; top: 0; z-index: 2000;
    background: var(--labo-green); color: var(--labo-green-ink);
    padding: .6rem 1.2rem; border-radius: 0 0 .6rem 0; font-weight: 600; text-decoration: none;
}
.labo-skip:focus { left: 0; }

/* ==========================================================================
   2. En-tête
   ========================================================================== */

.labo-header {
    position: sticky; top: 0; z-index: 1030;
    background: linear-gradient(120deg, var(--labo-blue-darker) 0%, var(--labo-blue) 55%, #1470cd 100%);
    box-shadow: 0 2px 18px rgba(8, 46, 88, .35);
}

.labo-topbar {
    background: rgba(0, 0, 0, .18);
    font-size: .85rem;
}

.labo-topbar > div {
    display: flex; justify-content: flex-end; align-items: center; gap: 1rem;
    padding-block: .3rem;
}

.labo-topbar, .labo-topbar a { color: rgba(255, 255, 255, .85); }
.labo-topbar a:hover { color: #fff; }

/* Sélecteur de langue (drapeaux) */
.labo-topbar .mod-languages ul { display: flex; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.labo-topbar .mod-languages img {
    border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
    opacity: .7; transition: opacity .15s ease, transform .15s ease;
    display: block;
}
.labo-topbar .mod-languages li:hover img,
.labo-topbar .mod-languages li.lang-active img { opacity: 1; transform: translateY(-1px); }

.labo-topbar .mod-languages li.lang-active,
.labo-topbar .mod-languages li { background: transparent !important; padding: 0 !important; border: 0 !important; }

.labo-topbar .mod-languages li.lang-active img { box-shadow: 0 0 0 2px var(--labo-green); }

.labo-header-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    padding-block: .6rem;
}

.labo-brand { display: inline-flex; align-items: center; text-decoration: none; }
.labo-brand img { height: 52px; width: auto; display: block; }
.labo-brand-title { color: #fff; font-size: 1.4rem; font-weight: 700; }

/* Navigation */
.labo-nav { display: flex; align-items: center; gap: 1rem; }

.labo-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem; margin: 0; padding: 0; list-style: none; }

.labo-nav a, .labo-nav .nav-header {
    display: block; position: relative;
    color: rgba(255, 255, 255, .92); text-decoration: none; font-weight: 500;
    padding: .55rem .9rem; border-radius: .55rem;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}

.labo-nav > ul > li > a::after {
    content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .28rem;
    height: 2px; border-radius: 2px; background: var(--labo-green);
    transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}

.labo-nav a:hover, .labo-nav a:focus { color: #fff; background: rgba(255, 255, 255, .1); }
.labo-nav > ul > li > a:hover::after,
.labo-nav > ul > li.active > a::after { transform: scaleX(1); }
/* Item actif de premier niveau : texte blanc sur la barre bleue (PAS dans les sous-menus) */
.labo-nav > ul > li.active > a { color: #fff; font-weight: 600; }

/* Sous-menus (déroulants CSS) */
.labo-nav li { position: relative; }

.labo-nav li ul {
    position: absolute; top: calc(100% + .35rem); left: 0; z-index: 100;
    width: max-content; min-width: 9rem; max-width: 20rem;
    flex-direction: column; align-items: stretch;
    background: #fff; border-radius: .75rem; padding: .4rem;
    box-shadow: var(--labo-shadow-lift);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.labo-nav li:hover > ul,
.labo-nav li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }

.labo-nav li ul a {
    color: var(--labo-ink); padding: .5rem .75rem; border-radius: .5rem; white-space: nowrap;
    flex: 1 1 auto; /* fond du survol/actif sur toute la largeur du menu déroulant */
}
.labo-nav li ul a:hover { background: var(--labo-blue-light); color: var(--labo-blue-deep); }
/* Item actif dans un sous-menu : lisible sur fond blanc (pas de texte blanc) */
.labo-nav li ul li.active > a,
.labo-nav li ul li.current > a {
    color: var(--labo-blue-deep); font-weight: 600; background: var(--labo-blue-light);
}

/* Bouton d'ouverture des sous-menus (généré par mod_menu) */
.labo-nav li { display: flex; align-items: center; }

.labo-nav .mod-menu__toggle-sub {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 0; cursor: pointer;
    font: inherit; color: rgba(255, 255, 255, .75); border-radius: .55rem;
    padding: .55rem .45rem .55rem 0; margin-left: -.5rem;
    transition: color .15s ease;
}
.labo-nav .mod-menu__toggle-sub:hover,
.labo-nav .mod-menu__toggle-sub:focus { color: #fff; }

/* Chevron d'un parent-lien (ex. Médicaments) : collé au libellé */
.labo-nav .mod-menu__toggle-sub { margin-left: 0; }
.labo-nav a + .mod-menu__toggle-sub { margin-left: -.5rem; padding-left: 0; }

/* Entrée « titre » de premier niveau (ex. Ressources) : rendu IDENTIQUE à un lien
   (padding, fond au survol, soulignement vert) — cible le bouton contenant le libellé. */
.labo-nav > ul > li > .mod-menu__toggle-sub:has(.nav-header) {
    position: relative;
    padding: .55rem .9rem;
    margin: 0;
    gap: .3rem;
    border-radius: .55rem;
    color: rgba(255, 255, 255, .92);
}
.labo-nav > ul > li > .mod-menu__toggle-sub:has(.nav-header):hover,
.labo-nav > ul > li > .mod-menu__toggle-sub:has(.nav-header):focus {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}
.labo-nav > ul > li > .mod-menu__toggle-sub:has(.nav-header) .nav-header {
    padding: 0;
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: normal;
    color: inherit;
}
.labo-nav > ul > li > .mod-menu__toggle-sub:has(.nav-header)::after {
    content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .28rem;
    height: 2px; border-radius: 2px; background: var(--labo-green);
    transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.labo-nav > ul > li > .mod-menu__toggle-sub:has(.nav-header):hover::after,
.labo-nav > ul > li.active > .mod-menu__toggle-sub:has(.nav-header)::after { transform: scaleX(1); }

/* Chevron en CSS pur (la police d'icônes Joomla n'est pas chargée) */
.labo-nav .icon-chevron-down::before {
    content: ""; display: block; width: .42em; height: .42em;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-25%);
    transition: transform .15s ease;
}
.labo-nav .mod-menu__toggle-sub[aria-expanded="true"] .icon-chevron-down::before {
    transform: rotate(225deg) translateY(-25%);
}

/* Sous-menu ouvert au clic/clavier (en plus du survol) */
.labo-nav li ul.is-open-sub { opacity: 1; visibility: visible; transform: translateY(0); }

/* Déconnexion (bouton rond, icône seule, utilisateur connecté) */
.labo-nav a.labo-nav-logout {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; flex: 0 0 auto; box-sizing: border-box;
    padding: 0; color: #fff; text-decoration: none;
    background: rgba(255, 255, 255, .16);
    border-radius: 50%;
    transition: background .15s ease, transform .15s ease;
}
.labo-nav a.labo-nav-logout:hover, .labo-nav a.labo-nav-logout:focus {
    background: var(--labo-green, #8fbe22);
    color: #fff;
    transform: translateY(-1px);
}
.labo-nav a.labo-nav-logout svg { display: block; width: 16px; height: 16px; }

/* Bouton « Installer l'application » (PWA, utilisateur connecté) */
.labo-nav-install {
    display: inline-flex; align-items: center; gap: .4rem; flex: 0 0 auto;
    padding: .34rem .7rem; margin-right: .1rem;
    font: inherit; font-size: .82rem; font-weight: 600; line-height: 1;
    color: #fff; cursor: pointer;
    background: linear-gradient(135deg, var(--labo-green, #8fbe22), #35953F);
    border: 0; border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.labo-nav-install:hover, .labo-nav-install:focus {
    transform: translateY(-1px); filter: brightness(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .24);
}
.labo-nav-install svg { display: block; flex: 0 0 auto; }
.labo-nav-install[hidden] { display: none; }
@media (max-width: 640px) {
    .labo-nav-install span { display: none; }   /* icône seule sur mobile */
    .labo-nav-install { padding: .34rem; border-radius: 50%; }
}

/* Burger (mobile) */
.labo-burger {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px;
    background: rgba(255, 255, 255, .12); border: 0; border-radius: .55rem; cursor: pointer;
}
.labo-burger span { display: block; height: 2px; border-radius: 2px; background: #fff; transition: transform .2s ease, opacity .2s ease; }
.labo-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.labo-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.labo-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   3. Bannière / hero
   ========================================================================== */

.labo-banner { position: relative; }

.labo-hero {
    position: relative; overflow: hidden;
    background: url("../images/hero-nature.jpg") center 40% / cover no-repeat;
}

.labo-hero::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(8, 58, 110, .9) 0%, rgba(15, 97, 180, .72) 45%, rgba(15, 97, 180, .22) 100%);
}

.labo-hero-inner {
    position: relative; max-width: 1320px; margin-inline: auto;
    padding: clamp(3rem, 8vw, 5.5rem) clamp(1rem, 3vw, 1.5rem);
    color: #fff;
}

.labo-hero-kicker {
    display: inline-block;
    background: rgba(143, 190, 34, .2); border: 1px solid rgba(143, 190, 34, .55);
    color: #dcf2a6; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    border-radius: 100px; padding: .35rem 1rem; margin-bottom: 1.25rem;
}

.labo-hero h1, .labo-hero .h1 {
    color: #fff; font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 700; max-width: 24ch;
}

.labo-hero p { font-size: clamp(1rem, 2vw, 1.15rem); color: rgba(255, 255, 255, .9); max-width: 55ch; }

.labo-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* Variante compacte (accueil connecté) : bandeau réduit, actions à droite du texte */
.labo-hero--compact .labo-hero-inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem 2rem;
    padding: clamp(1.4rem, 3vw, 2.2rem) clamp(1rem, 3vw, 1.5rem);
}
.labo-hero--compact .labo-hero-kicker { margin-bottom: .5rem; font-size: .7rem; padding: .25rem .8rem; }
.labo-hero--compact h1 { font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
.labo-hero--compact p { font-size: clamp(.9rem, 1.5vw, 1rem); }
.labo-hero--compact .labo-hero-actions { margin-top: 0; }

/* Carte « vous êtes connecté » (accueil) : version compacte en ligne.
   Cible le mode salutation UNIQUEMENT : le formulaire de connexion contient
   des conteneurs .otp-step (dont un bloc succès caché — ne pas se baser sur
   .auth-icon-wrap--success qui y figure aussi). */
.labo-top .mod-emailotp-login:not(:has(.otp-step)) {
    /* !important : le module injecte un <style> inline avec max-width issu de son paramètre form_width */
    max-width: none !important;
    display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem;
}
.labo-top .mod-emailotp-login:not(:has(.otp-step)) .auth-header {
    display: flex; align-items: center; gap: .9rem;
    margin-bottom: 0; text-align: left; flex: 1 1 auto;
}
.labo-top .mod-emailotp-login:not(:has(.otp-step)) .auth-icon-wrap {
    width: 40px; height: 40px; border-radius: 12px; margin-bottom: 0; flex: none;
}
.labo-top .mod-emailotp-login:not(:has(.otp-step)) .auth-title { font-size: 1.1rem; margin: 0; }
.labo-top .mod-emailotp-login:not(:has(.otp-step)) .auth-subtitle { margin: 0; font-size: .85rem; }
.labo-top .mod-emailotp-login:not(:has(.otp-step)) .auth-btn { width: auto; }
.labo-top .mod-emailotp-login:not(:has(.otp-step)) .auth-links { margin-top: 0 !important; }

/* ==========================================================================
   4. Boutons, formulaires, composants UI
   ========================================================================== */

/* Boutons — traitement unique sur tout le site (aligné sur la carte de connexion) :
   dégradé, coins 12 px, ombre portée, élévation au survol. */
.labo-btn, .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    cursor: pointer; text-decoration: none; text-align: center;
    font-family: inherit; font-size: .9375rem; font-weight: 600; letter-spacing: .01em;
    padding: 14px 24px; border-radius: 12px; border: 0;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .15s ease;
}
.labo-btn:active, .btn:active { transform: translateY(0) !important; }

.labo-btn-green, .btn-primary, .btn-success {
    background: linear-gradient(135deg, var(--labo-green), var(--labo-green-dark));
    color: #fff;
    box-shadow: 0 4px 16px rgba(143, 190, 34, .3);
}
.labo-btn-green:hover, .btn-primary:hover, .btn-success:hover,
.labo-btn-green:focus, .btn-primary:focus, .btn-success:focus {
    background: linear-gradient(135deg, #a3d244, var(--labo-green));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(143, 190, 34, .4);
}

.labo-btn-blue, .btn-secondary, .btn-info {
    background: linear-gradient(135deg, var(--labo-blue), var(--labo-blue-deep));
    color: #fff;
    box-shadow: 0 4px 16px rgba(15, 97, 180, .3);
}
.labo-btn-blue:hover, .btn-secondary:hover, .btn-info:hover {
    background: linear-gradient(135deg, #1a76d2, var(--labo-blue));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(15, 97, 180, .4);
}

.labo-btn-outline, .btn-outline-primary, .btn-outline-secondary {
    background: transparent; border-color: currentColor; color: var(--labo-blue);
}
.labo-btn-outline:hover, .btn-outline-primary:hover, .btn-outline-secondary:hover { background: var(--labo-blue-light); color: var(--labo-blue-deep); }

.labo-btn-light, .btn-light {
    background: #fff; border-color: #fff; color: var(--labo-blue-deep);
}
.labo-btn-light:hover, .btn-light:hover { background: var(--labo-blue-light); }

.btn-sm { font-size: .85rem; padding: .35rem 1rem; }

/* Champs */
.labo-input, .form-control, .form-select,
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="url"], input[type="tel"],
select, textarea {
    font-family: inherit; font-size: 1rem; color: var(--labo-ink);
    width: 100%;
    background: #fff; border: 1px solid var(--labo-line); border-radius: var(--labo-radius-sm);
    padding: .5rem .85rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--labo-green-dark); }

.labo-input:focus, .form-control:focus, .form-select:focus,
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--labo-green);
    box-shadow: 0 0 0 .2rem rgba(143, 190, 34, .18);
}

label, .form-label { font-weight: 600; font-size: .92rem; }

/* Cartes */
.labo-card, .card {
    background: var(--labo-surface);
    border: 1px solid var(--labo-line);
    border-radius: var(--labo-radius);
    box-shadow: var(--labo-shadow);
    padding: 1.25rem;
}

.labo-card-title {
    font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--labo-muted);
    padding-bottom: .6rem; margin-bottom: 1rem;
    border-bottom: 2px solid var(--labo-green);
}

.labo-sidebar .labo-card + .labo-card { margin-top: 1.5rem; }
.labo-main .labo-card + .labo-card { margin-top: 1.5rem; }

/* Liste « derniers médicaments » compacte, en grille */
.mod-medicaments { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; margin: 0 0 1.25rem; }
.mod-medicaments:last-child { margin-bottom: 0; }
.mod-medicaments-group {
    display: flex; align-items: center; gap: .45rem;
    font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--theme-c, var(--labo-blue)); margin: 0 0 .5rem;
}
.mod-medicaments-group-dot {
    width: 11px; height: 11px; border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-c, var(--labo-blue)), var(--theme-c2, var(--theme-c, var(--labo-blue))));
    flex: none;
}

/* ==========================================================================
   Actualités — page (blog de catégorie) et module d'accueil
   ========================================================================== */

/* Titres de page harmonisés (modèle : page Actualités) — bleu foncé,
   soulignement vert, sur toutes les pages de la colonne principale */
.labo-main h1 {
    font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.25;
    color: var(--labo-blue-deep);
    padding-bottom: .5rem; border-bottom: 3px solid var(--labo-green);
    display: inline-block;
    margin: 0 0 1.25rem;
}

/* Titre de l'article mis en avant sur l'accueil (même style harmonisé) */
.blog-featured .item-title {
    font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.25; font-weight: 700;
    color: var(--labo-blue-deep);
    padding-bottom: .5rem; border-bottom: 3px solid var(--labo-green);
    display: inline-block;
    margin: 0 0 1.25rem;
}
.blog-featured .item-title a { color: inherit; text-decoration: none; }

/* En-tête de la page Actualités */
.labo-news-head { margin-bottom: 1.5rem; }
.labo-news-head h1 { margin-bottom: 0; }
.labo-news-desc { color: var(--labo-muted); max-width: 65ch; margin-top: .75rem; }

/* Liste des cartes d'actualité */
.labo-news-list { display: flex; flex-direction: column; gap: 1.5rem; }

.labo-news-card {
    display: flex; overflow: hidden;
    background: var(--labo-surface); border: 1px solid var(--labo-line);
    border-radius: 16px; box-shadow: var(--labo-shadow);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.labo-news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--labo-shadow-lift);
    border-color: rgba(143, 190, 34, .55);
}

.labo-news-media { flex: 0 0 280px; min-height: 190px; }
.labo-news-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.labo-news-media--ph {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--labo-blue-light), rgba(143, 190, 34, .22));
    color: var(--labo-green);
}

.labo-news-body { flex: 1 1 auto; padding: 1.5rem 1.75rem; min-width: 0; align-self: center; }

.labo-news-intro {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}

.labo-news-date {
    display: inline-block;
    background: rgba(143, 190, 34, .14); color: #5c7d12;
    font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
    border-radius: 100px; padding: .2rem .75rem; margin-bottom: .6rem;
}

.labo-news-title { font-size: 1.25rem; margin: 0 0 .5rem; }
.labo-news-title a { color: var(--labo-blue-deep); }
.labo-news-title a:hover { color: var(--labo-blue); }

.labo-news-intro { color: var(--labo-ink); }
.labo-news-intro p:last-child { margin-bottom: 0; }

.labo-news-more {
    display: inline-block; margin-top: .75rem;
    font-weight: 600; color: var(--labo-green);
}
.labo-news-more:hover { color: #5c7d12; }

.labo-news-pagination { margin-top: 1.5rem; }

/* Page article d'actualité (layout alternatif « actualite ») —
   composition centrée type magazine */
.labo-newsart { max-width: 50rem; margin-inline: auto; }
.labo-newsart-back { margin: 0 0 1.75rem; }
.labo-newsart-back a { font-weight: 600; color: var(--labo-muted); }
.labo-newsart-back a:hover { color: var(--labo-blue-deep); }
.labo-newsart-head {
    margin-bottom: 1.75rem; display: flex; flex-direction: column;
    align-items: center; text-align: center; gap: .6rem;
}
.labo-newsart-title { margin: 0; }
.labo-newsart-banner { margin: 0 0 2rem; }
.labo-newsart-banner img {
    width: 100%; max-height: 400px; object-fit: cover; display: block;
    border-radius: 18px; box-shadow: 0 22px 55px -22px rgba(18, 58, 92, .32);
}
.labo-newsart-body {
    font-size: 1.03rem; line-height: 1.75;
    max-width: 44rem; margin-inline: auto;
}
.labo-newsart-body > p:first-child {
    font-size: 1.16rem; line-height: 1.65; color: var(--labo-blue-deep);
}
.labo-newsart-body p { margin-bottom: 1.15rem; }
.labo-newsart-foot {
    margin-top: 2.25rem; padding-top: 1.75rem;
    border-top: 1px solid var(--labo-line);
    text-align: center;
}

@media (max-width: 640px) {
    .labo-news-card { flex-direction: column; }
    .labo-news-media { flex-basis: auto; max-height: 180px; }
}

/* Module Actualités (accueil) : mini-cartes en grille */
.labo-newsmod {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .75rem;
}
.labo-newsmod-item {
    display: flex; flex-direction: column; gap: .3rem;
    padding: .9rem 1rem;
    border: 1px solid var(--labo-line); border-radius: var(--labo-radius-sm);
    background: var(--labo-surface);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.labo-newsmod-item:hover {
    border-color: var(--labo-green); box-shadow: var(--labo-shadow); transform: translateY(-2px);
}
.labo-newsmod-date { font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #5c7d12; }
.labo-newsmod-title { font-weight: 600; color: var(--labo-blue-deep); }
.labo-newsmod-intro { font-size: .88rem; color: var(--labo-muted); }

/* Module « Newsletters de votre groupe » (colonne latérale) */
.labo-nlmod { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.labo-nlmod-link {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem .7rem;
    border: 1px solid var(--labo-line); border-radius: var(--labo-radius-sm);
    background: var(--labo-surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.labo-nlmod-link:hover { border-color: var(--labo-green); box-shadow: var(--labo-shadow); }
.labo-nlmod-icon { color: var(--labo-green); flex: none; display: inline-flex; }
.labo-nlmod-subject {
    flex: 1 1 auto; min-width: 0; font-size: .88rem; font-weight: 600; color: var(--labo-blue-deep);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.labo-nlmod-date { flex: none; font-size: .75rem; color: var(--labo-muted); }
.labo-nlmod-empty { margin: 0; color: var(--labo-muted); font-size: .9rem; }
.labo-nlmod-all { display: inline-block; margin-top: .6rem; font-weight: 600; color: var(--labo-green); }
.labo-nlmod-all:hover { color: #5c7d12; }

/* Formulaire d'abonnement AcyMailing : champs sur toute la largeur de la carte,
   boutons en flex bord à bord — tout est aligné sur les mêmes marges */
.labo-card .acym_module_form .onefield input {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}
.labo-card .acysubbuttons { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.labo-card .acysubbuttons .button { flex: 1 1 auto; }

/* État « déjà abonné » : formulaire masqué, pastille verte + lien discret */
.labo-acym--subscribed .acym_form { display: none; }
.labo-acym--subscribed .acysubbuttons { flex-direction: column; align-items: flex-start; gap: .7rem; margin: 0; }
.labo-acym-subscribed {
    width: 100%; box-sizing: border-box;
    display: flex; align-items: center; gap: .5rem;
    background: rgba(143, 190, 34, .12);
    border: 1px solid rgba(143, 190, 34, .45);
    border-radius: 10px; padding: .7rem .9rem;
    color: #5c7d12; font-weight: 600; font-size: .92rem;
}
.labo-acym--subscribed .unsubbutton {
    flex: 1 1 100%; width: 100%;
    background: var(--labo-surface);
    border: 1px solid var(--labo-line);
    color: var(--labo-ink); font-size: .9rem;
    padding: 11px 20px;
    box-shadow: none;
}
.labo-acym--subscribed .unsubbutton:hover,
.labo-acym--subscribed .unsubbutton:focus {
    background: var(--labo-blue-light);
    border-color: var(--labo-blue);
    color: var(--labo-blue-deep);
    transform: none; box-shadow: none;
}
.mod-medicaments-link {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem .75rem; border: 1px solid var(--labo-line); border-radius: var(--labo-radius-sm);
    background: var(--labo-surface); text-decoration: none; font-size: .92rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.mod-medicaments-link:hover { border-color: var(--labo-green); box-shadow: var(--labo-shadow); }

/* Variante « riche » : nom + indication (accueil, sans image) */
.mod-medicaments-link--rich {
    display: flex; flex-direction: column; align-items: flex-start; gap: .25rem;
    padding: .8rem .95rem;
}
.mod-medicaments-link--rich .mod-medicaments-title { font-weight: 600; color: var(--labo-blue-deep); }
.mod-medicaments-indication {
    font-size: .85rem; line-height: 1.45; color: var(--labo-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Alertes */
.alert {
    border-radius: var(--labo-radius-sm); border: 1px solid transparent;
    padding: .8rem 1.1rem; margin-bottom: 1.25rem;
}

/* Messages système en fenêtre centrée */
.labo-msg-dialog {
    border: 0;
    border-radius: 1.25rem;
    padding: 0;
    max-width: min(92vw, 520px);
    box-shadow: 0 30px 60px -20px rgba(8, 46, 88, .5);
}

.labo-msg-dialog::backdrop {
    background: rgba(8, 46, 88, .55);
    backdrop-filter: blur(3px);
}

.labo-msg-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 2.25rem;
    text-align: center;
}

.labo-msg-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .9rem;
}

.labo-msg-item p {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.55;
    color: var(--labo-ink, #16324c);
}

.labo-msg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 2rem;
    font-weight: 700;
}

.labo-msg-item.is-success .labo-msg-icon { background: #eef7d8; color: #5a7d0e; }
.labo-msg-item.is-info .labo-msg-icon { background: var(--labo-blue-light, #eaf2fb); color: var(--labo-blue-deep, #0a4a8c); }
.labo-msg-item.is-warning .labo-msg-icon { background: #fff6e0; color: #b07908; }
.labo-msg-item.is-danger .labo-msg-icon { background: #fdecec; color: #b02a2a; }

.labo-msg-close { min-width: 140px; }

/* Zone de messages système sous l'en-tête (aucun espace quand elle est vide) */
.labo-messages { margin-top: 0; }
.labo-messages:has(.alert) { margin-top: 1rem; }
.labo-messages:empty,
.labo-messages #system-message-container:empty { display: none; }
.labo-messages .alert {
    font-size: 1.02rem;
    font-weight: 500;
    box-shadow: 0 10px 24px -14px rgba(8, 46, 88, .35);
}
.alert-success { background: #eef7d8; border-color: #cbe391; color: #3c520a; }
.alert-info { background: var(--labo-blue-light); border-color: #bcd6ef; color: var(--labo-blue-deep); }
.alert-warning { background: #fff6e0; border-color: #f2dd9a; color: #7a5c07; }
.alert-danger, .alert-error { background: #fdecec; border-color: #f2b8b8; color: #8f1f1f; }

/* Badges */
.badge {
    display: inline-block; font-size: .78rem; font-weight: 600;
    border-radius: 100px; padding: .3em .8em;
    background: var(--labo-blue-light); color: var(--labo-blue-deep);
}
.bg-primary { background: var(--labo-blue) !important; color: #fff; }
.bg-success { background: var(--labo-green) !important; color: var(--labo-green-ink); }
.bg-warning { background: #f4c542 !important; color: #574208; }

/* Tableaux */
table { border-collapse: collapse; }
.table { width: 100%; margin-bottom: 1.25rem; }
.table th, .table td { padding: .65rem .85rem; border-bottom: 1px solid var(--labo-line); text-align: left; }
.table thead th {
    font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--labo-muted); border-bottom-width: 2px;
}
.table-striped tbody tr:nth-child(odd) { background: rgba(15, 97, 180, .03); }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 1.5rem 0 0; list-style: none; justify-content: center; }
.pagination .page-link {
    display: block; padding: .45rem .85rem; border-radius: var(--labo-radius-sm);
    border: 1px solid var(--labo-line); background: #fff; color: var(--labo-blue);
    text-decoration: none;
}
.pagination .page-link:hover { background: var(--labo-blue-light); }
.pagination .active .page-link { background: var(--labo-blue); border-color: var(--labo-blue); color: #fff; }
.pagination .disabled .page-link { color: var(--labo-muted); pointer-events: none; opacity: .6; }

/* ==========================================================================
   5. Structure du contenu
   ========================================================================== */

/* Fil d'Ariane : pastille flottante avec chevrons */
.labo-breadcrumbs { font-size: .84rem; }
.labo-breadcrumbs > div { padding-block: .85rem 0; }

.labo-breadcrumbs ol, .labo-breadcrumbs .breadcrumb {
    display: inline-flex; flex-wrap: wrap; align-items: center; gap: .15rem;
    margin: 0; padding: .45rem 1.1rem; list-style: none;
    background: var(--labo-surface, #fff);
    border: 1px solid var(--labo-line);
    border-radius: 100px;
    box-shadow: 0 6px 18px -12px rgba(8, 46, 88, .25);
    color: var(--labo-muted);
}

/* Masquer le « Vous êtes ici : » */
.labo-breadcrumbs .mod-breadcrumbs__here { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.labo-breadcrumbs .breadcrumb-item { display: inline-flex; align-items: center; }

/* Chevron séparateur entre les éléments */
.labo-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    content: "\203A";
    margin-inline: .55rem;
    color: var(--labo-green, #8fbe22);
    font-weight: 700;
}

.labo-breadcrumbs a { color: var(--labo-muted); font-weight: 500; transition: color .15s ease; }
.labo-breadcrumbs a:hover { color: var(--labo-blue-deep); }
.labo-breadcrumbs .breadcrumb-item.active > span { color: var(--labo-blue-deep); font-weight: 600; }
.labo-breadcrumbs .divider { display: none; }

.labo-body { padding-block: 2rem 3.5rem; }

.labo-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }

@media (min-width: 992px) {
    .layout-right .labo-grid { grid-template-columns: minmax(0, 1fr) 320px; }
    .layout-left .labo-grid { grid-template-columns: 320px minmax(0, 1fr); }
    .layout-both .labo-grid { grid-template-columns: 280px minmax(0, 1fr) 280px; }
}

.labo-main { min-width: 0; }

.labo-section { padding-block: 1.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 768px) {
    .labo-top, .labo-bottom { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

/* ---- Page d'atterrissage (accueil invités) ---- */
.labo-landing {
    text-align: center;
    max-width: 880px;
    margin: 3.25rem auto .25rem;
    padding: 2.9rem 2.25rem 2.4rem;
    background: rgba(255, 255, 255, .62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 24px;
    box-shadow: 0 24px 60px -30px rgba(18, 58, 92, .35);
}
@media (max-width: 920px) { .labo-landing { margin-inline: 1rem; } }
.labo-landing-kicker {
    display: inline-block;
    padding: .4rem 1.1rem;
    border-radius: 100px;
    background: rgba(143, 190, 34, .16);
    border: 1px solid rgba(143, 190, 34, .45);
    color: var(--labo-green-ink);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 1.4rem;
}
.labo-landing h1 {
    margin: 0;
    font-size: clamp(1.9rem, 4.5vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--labo-blue-deep);
}
.labo-landing .labo-landing-sub {
    margin: .3rem 0 0;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--labo-green-dark);
}
.labo-landing .labo-landing-lead {
    margin: 1.1rem auto 0;
    max-width: 620px;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--labo-ink);
}

body.site-home:has(.labo-landing) {
    background:
        radial-gradient(1100px 520px at 78% -8%, rgba(15, 97, 180, .16), transparent 62%),
        radial-gradient(900px 480px at 12% 108%, rgba(143, 190, 34, .18), transparent 60%),
        linear-gradient(rgba(246, 251, 244, .82), rgba(239, 247, 238, .88)),
        url('/images/site/hero-nature.jpg') center / cover fixed no-repeat;
}
/* La bannière invités épouse la MÊME largeur (bords gauche/droite) que la
   rangée de cartes du dessous : 1020px de contenu moins la même gouttière. */
body.site-home:has(.labo-landing) .labo-landing {
    max-width: calc(1020px - clamp(2rem, 6vw, 3rem));
}

body.site-home:has(.labo-landing) .labo-top {
    max-width: 1020px;
    margin-inline: auto;
    width: 100%;
    align-items: stretch;
    gap: 2rem;
    padding-block: 2.25rem 4.25rem;
}

/* Sélecteur de langue sous la bannière (page d'accueil) */
.labo-home-lang { padding-block: .6rem 0; }
.labo-home-lang-list {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .7rem;
    margin: 0 auto; padding: 0; list-style: none;
}
.labo-home-lang-item {
    display: inline-flex; align-items: center; justify-content: center;
    box-sizing: border-box; height: 3rem; padding: 0 1.75rem; border-radius: 999px;
    font-size: 1.08rem; font-weight: 600; line-height: 1; text-decoration: none;
    color: var(--labo-blue-deep); background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(18, 58, 92, .16);
    box-shadow: 0 6px 16px -10px rgba(18, 58, 92, .35);
    transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease, background .18s ease;
}
.labo-home-lang-item:hover, .labo-home-lang-item:focus {
    background: #fff; border-color: var(--labo-green); transform: translateY(-2px);
    box-shadow: 0 12px 26px -12px rgba(18, 58, 92, .5);
}
.labo-home-lang-item.is-active {
    background: var(--labo-green); color: #fff; border-color: var(--labo-green);
    box-shadow: 0 8px 18px -12px rgba(18, 58, 92, .4);
}

/* ===== Effet hero : entrée en cascade au chargement (accueil invités) ===== */
@keyframes labo-hero-in {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
    body.site-home:has(.labo-landing) .labo-landing,
    body.site-home:has(.labo-landing) .labo-home-lang,
    body.site-home:has(.labo-landing) .labo-top .labo-card {
        animation: labo-hero-in .8s cubic-bezier(.22, .61, .36, 1) both;
    }
    body.site-home:has(.labo-landing) .labo-landing        { animation-delay: .05s; }
    body.site-home:has(.labo-landing) .labo-home-lang       { animation-delay: .24s; }
    body.site-home:has(.labo-landing) .labo-top .labo-card:nth-child(1) { animation-delay: .38s; }
    body.site-home:has(.labo-landing) .labo-top .labo-card:nth-child(2) { animation-delay: .50s; }
}
body.site-home:has(.labo-landing) .labo-top .labo-card {
    background: rgba(255, 255, 255, .93);
    border: 1px solid rgba(106, 168, 79, .28);
    border-top: 4px solid var(--labo-green);
    border-radius: 18px;
    padding: 2.4rem 2.1rem 2.1rem;
    box-shadow: 0 22px 55px -22px rgba(18, 58, 92, .32);
    backdrop-filter: blur(4px);
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
body.site-home:has(.labo-landing) .labo-top .labo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 70px -24px rgba(18, 58, 92, .4);
}
body.site-home:has(.labo-landing) .labo-top .labo-card form { text-align: left; }
body.site-home:has(.labo-landing) .labo-body { padding-block: 0; }

/* Carte « créer un compte » assortie à la carte OTP */
/* Vignette identique à .auth-icon-wrap du module de connexion OTP */
.labo-account-card .labo-account-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(143, 190, 34, .2), rgba(143, 190, 34, .15));
    color: var(--labo-green);
    margin-bottom: 1.25rem;
}
.labo-account-card .labo-account-icon svg { stroke-width: 1.5; width: 28px; height: 28px; }
.labo-account-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--labo-ink, #1e293b);
    margin: 0 0 1.1rem;
}
.labo-account-card p {
    color: var(--labo-muted);
    font-size: .92rem;
    line-height: 1.6;
    margin: 0 0 .9rem;
}
.labo-account-card .labo-btn {
    margin-top: .9rem;
    display: flex;
    width: 100%;
    max-width: 380px;
    margin-inline: auto;
}
.labo-account-card .labo-account-note {
    margin: 1.1rem 0 0;
    font-size: .78rem;
    opacity: .75;
}

/* ==========================================================================
   6. Pied de page
   ========================================================================== */

.labo-footer {
    margin-top: 0;
    background: linear-gradient(120deg, var(--labo-blue-darker), var(--labo-blue-deep) 70%);
    color: rgba(255, 255, 255, .85);
}

.labo-footer a { color: #cfe5fb; }
.labo-footer a:hover { color: #fff; }

.labo-footer-grid {
    display: grid; gap: 2rem;
    padding-block: 2.5rem 2rem;
}
@media (min-width: 768px) { .labo-footer-grid { grid-template-columns: repeat(3, 1fr); } }

.labo-footer-title {
    color: #fff; font-size: .9rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding-bottom: .5rem; margin-bottom: .9rem; position: relative;
}
.labo-footer-title::after {
    content: ""; position: absolute; left: 0; bottom: 0;
    width: 42px; height: 3px; border-radius: 3px; background: var(--labo-green);
}

.labo-footer-module ul { margin: 0; padding: 0; list-style: none; }
.labo-footer-module li { padding-block: .22rem; }
.labo-footer-module a { text-decoration: none; }

.labo-footer-modules { padding-block: 1.25rem; }

.labo-footer-copyright {
    background: rgba(0, 0, 0, .22);
    font-size: .88rem;
    text-align: center;
    padding-block: .8rem;
}
.labo-footer-copyright a { color: #cfe5fb; }

/* Retour en haut */
.labo-backtop {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1020;
    width: 44px; height: 44px; display: grid; place-items: center;
    background: var(--labo-green); color: var(--labo-green-ink);
    border-radius: 100px; text-decoration: none; font-size: 1.2rem; font-weight: 700;
    box-shadow: var(--labo-shadow-lift);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.labo-backtop.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.labo-backtop:hover { background: var(--labo-green-dark); color: #fff; }

/* ==========================================================================
   7. Harmonisation com_medicaments & modules
   ========================================================================== */

.com-medicaments { --med-accent: var(--labo-blue); }

.medicaments-card { border-radius: var(--labo-radius); }

/* Formulaire de connexion (mod_login) */
.mod-login .form-group, .mod-login .mb-3 { margin-bottom: .85rem; }
.mod-login .input-group { display: flex; }
.mod-login .input-group .form-control { border-radius: var(--labo-radius-sm) 0 0 var(--labo-radius-sm); }
.mod-login .input-group .btn, .mod-login .input-group .input-group-text {
    border-radius: 0 var(--labo-radius-sm) var(--labo-radius-sm) 0;
    border: 1px solid var(--labo-line); border-left: 0;
    background: var(--labo-blue-light); color: var(--labo-blue-deep);
    padding-inline: .7rem;
}
.mod-login ul { padding-left: 0; list-style: none; font-size: .88rem; }

/* ==========================================================================
   7a. Contenus migrés : documentation (flipbooks) & médias (vidéos)
   ========================================================================== */

.labo-lead {
    font-size: 1.08rem;
    color: var(--labo-muted);
    max-width: 65ch;
}

.labo-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
    margin-block: 1.25rem 2.25rem;
}

.labo-doc-card {
    display: flex; flex-direction: column;
    background: var(--labo-surface);
    border: 1px solid var(--labo-line);
    border-radius: var(--labo-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--labo-ink);
    box-shadow: var(--labo-shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}

.labo-doc-card:hover { transform: translateY(-3px); box-shadow: var(--labo-shadow-lift); color: var(--labo-ink); }

.labo-doc-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.labo-doc-card-body { display: flex; flex-direction: column; gap: .3rem; padding: .9rem 1rem 1rem; }

.labo-doc-card-body strong { font-size: .98rem; line-height: 1.3; }

.labo-doc-card-teaser { font-size: .85rem; color: var(--labo-muted); }

.labo-doc-card-cta { margin-top: .35rem; font-size: .85rem; font-weight: 600; color: var(--labo-green-dark); }

/* Grille médias (vidéos) */
.labo-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr));
    align-items: start;
    gap: 1.75rem;
    margin-block: 1.75rem;
}

.labo-media-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(18, 58, 92, .10);
    border-radius: 16px;
    box-shadow: 0 14px 38px -22px rgba(18, 58, 92, .35);
    padding: 1rem 1rem 1.15rem;
    transition: transform .2s ease, box-shadow .2s ease;
}
.labo-media-item:hover { transform: translateY(-3px); box-shadow: 0 24px 54px -24px rgba(18, 58, 92, .5); }

/* Vidéo en haut de la carte, coins arrondis */
.labo-media-item .labo-video {
    order: -1; margin: 0 0 .95rem;
    border-radius: 12px;
    box-shadow: 0 12px 28px -18px rgba(0, 0, 0, .55);
}

.labo-media-item h2 {
    order: 0; margin: 0 0 .7rem;
    font-size: 1.06rem; line-height: 1.4; font-weight: 700;
    color: var(--labo-blue-deep);
}
.labo-media-meta {
    display: block; margin-top: .4rem;
    font-size: .82rem; font-weight: 600; color: var(--labo-green-dark);
}
.labo-media-item > p { order: 1; margin: .9rem 0 0; }
/* Bouton PDF en pastille (le .labo-btn-outline de base n'a pas de bordure) */
.labo-media-item .labo-btn {
    align-self: flex-start;
    gap: .45rem;
    padding: .5rem 1.05rem;
    font-size: .85rem; font-weight: 600;
    color: var(--labo-green-dark);
    background: rgba(143, 190, 34, .10);
    border: 1.5px solid rgba(143, 190, 34, .55);
    border-radius: 999px;
}
.labo-media-item .labo-btn::before {
    content: ""; width: 15px; height: 15px; flex: 0 0 auto;
    background: currentColor;
    -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
}
.labo-media-item .labo-btn:hover {
    background: var(--labo-green); color: #fff; border-color: var(--labo-green);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -8px rgba(143, 190, 34, .6);
}

.labo-video {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--labo-radius-sm);
    overflow: hidden;
    background: #0b1523;
}

.labo-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Vignette vidéo cliquable (facade YouTube — le lecteur ne se charge qu'au clic) */
.labo-yt { cursor: pointer; background-color: #0b1523; background-size: cover; background-position: center; }
.labo-yt::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background: linear-gradient(rgba(0, 0, 0, .02), rgba(0, 0, 0, .22));
    transition: background .2s ease;
}
.labo-yt:hover::after { background: linear-gradient(rgba(0, 0, 0, .06), rgba(0, 0, 0, .34)); }
.labo-yt.labo-yt-playing::after { display: none; }
.labo-yt-play {
    position: absolute; inset: 0; margin: auto; z-index: 1;
    width: 72px; height: 50px; padding: 0; border: 0; border-radius: 14px;
    background: rgba(18, 18, 18, .78); cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.labo-yt-play::before {
    content: ''; position: absolute; inset: 0; margin: auto;
    width: 0; height: 0; border-style: solid;
    border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff;
}
.labo-yt:hover .labo-yt-play { background: #c8102e; transform: scale(1.06); }

/* Bloc vidéo (playlist des conférences) en tête de la page Médias */
.labo-media-video { margin: 0 0 2.25rem; }
.labo-media-video > h2 { margin: 0 0 1rem; font-size: 1.5rem; color: var(--labo-blue-deep); }
.labo-media-video .labo-video { box-shadow: 0 22px 55px -24px rgba(18, 58, 92, .4); }

/* PDF des conférences réservés aux membres connectés (page Médias publique) */
body.labo-guest .labo-media-item .labo-btn { display: none; }

/* Visionneuse (lightbox) pour les flipbooks */
.labo-lightbox {
    position: fixed; inset: 0; z-index: 2000;
    display: none;
    background: rgba(6, 28, 52, .82);
    backdrop-filter: blur(3px);
    padding: clamp(.75rem, 3vw, 2.5rem);
}

.labo-lightbox.is-open { display: block; }

.labo-lightbox iframe {
    width: 100%; height: 100%;
    border: 0; border-radius: var(--labo-radius);
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}

.labo-lightbox-close {
    position: absolute; top: .6rem; right: .75rem;
    width: 42px; height: 42px;
    background: var(--labo-green); color: var(--labo-green-ink);
    border: 0; border-radius: 100px; font-size: 1.3rem; font-weight: 700;
    cursor: pointer;
    box-shadow: var(--labo-shadow-lift);
}

/* ==========================================================================
   7b. Utilitaires (sous-ensemble Bootstrap utilisé par les sorties core)
   ========================================================================== */

.visually-hidden, .sr-only {
    position: absolute !important;
    width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important;
    overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important; border: 0 !important;
}

.d-none, .hidden { display: none !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-muted { color: var(--labo-muted) !important; }
.small, small { font-size: .86em; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.p-2 { padding: .5rem !important; }
.list-unstyled { padding-left: 0; list-style: none; }
.img-fluid { max-width: 100%; height: auto; }
.float-end { float: right; }
.float-start { float: left; }
.clearfix::after { content: ""; display: block; clear: both; }

/* Icônes / images dans les boutons (webauthn, etc.) */
.labo-btn img, .labo-btn svg, .btn img, .btn svg {
    height: 1.15em; width: auto; vertical-align: -0.15em;
}

/* Groupes de champs avec bouton accolé (mot de passe, recherche) */
.input-group { display: flex; align-items: stretch; }
.input-group > .form-control, .input-group > input { flex: 1 1 auto; border-radius: var(--labo-radius-sm) 0 0 var(--labo-radius-sm); }
.input-group > .btn, .input-group > .input-group-text {
    display: inline-flex; align-items: center;
    border-radius: 0 var(--labo-radius-sm) var(--labo-radius-sm) 0;
    border: 1px solid var(--labo-line); border-left: 0;
    background: var(--labo-blue-light); color: var(--labo-blue-deep);
    padding: .3rem .7rem; font-size: .9rem; cursor: pointer;
}

/* ==========================================================================
   8. Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
    .labo-brand img { height: 42px; }

    .labo-burger { display: flex; }

    .labo-nav {
        display: none;
        position: absolute; left: 0; right: 0; top: 100%;
        background: var(--labo-blue-darker);
        padding: .75rem 1rem 1rem;
        box-shadow: 0 18px 30px -12px rgba(8, 46, 88, .5);
        max-height: calc(100vh - 80px); overflow-y: auto;
    }

    .labo-header-bar { position: relative; }

    .labo-nav.is-open { display: block; }

    .labo-nav ul { flex-direction: column; align-items: stretch; gap: 0; }

    .labo-nav > ul > li > a::after { display: none; }

    .labo-nav li ul {
        position: static; opacity: 1; visibility: visible; transform: none;
        width: auto; min-width: 0; max-width: none;
        background: rgba(255, 255, 255, .06); box-shadow: none;
        margin: .15rem 0 .35rem .75rem; padding: .25rem;
    }
    .labo-nav li ul a { white-space: normal; }

    .labo-nav li ul a { color: rgba(255, 255, 255, .85); }
    .labo-nav li ul a:hover { background: rgba(255, 255, 255, .1); color: #fff; }

    /* Sous-menus toujours déployés en mobile : le chevron ne sert à rien */
    .labo-nav li { flex-wrap: wrap; }
    .labo-nav li ul { flex-basis: 100%; }
    .labo-nav .mod-menu__toggle-sub .icon-chevron-down { display: none; }
    .labo-nav .mod-menu__toggle-sub { cursor: default; }
}

/* ==========================================================================
   9. Impression
   ========================================================================== */

@media print {
    .labo-header, .labo-footer, .labo-backtop, .labo-banner, .labo-breadcrumbs, .labo-sidebar { display: none !important; }
    body.site { background: #fff; }
    .labo-body { padding: 0; }
}

/* ==========================================================================
   Formulaires com_profils (inscription, mon profil) — langage visuel du site
   ========================================================================== */

.profils-inscription, .profils-monprofil { max-width: 940px; margin-inline: auto; }

.profils-inscription h1, .profils-monprofil h1 {
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    color: var(--labo-blue-deep);
    margin: 1.2rem 0 1rem;
}

/* Inscription : présentation centrée (page d'accueil du parcours) */
.profils-inscription h1 { text-align: center; }

.profils-inscription .profils-intro {
    text-align: center;
    max-width: 680px;
    margin: 0 auto .6rem;
    color: var(--labo-muted);
}

/* Mon profil : titre et sous-titre alignés à gauche, sur une ligne */
.profils-monprofil h1 { text-align: left; }

.profils-monprofil .profils-intro {
    text-align: left;
    max-width: none;
    margin: 0 0 1.6rem;
    color: var(--labo-muted);
}

.profils-form { margin-top: 2.2rem; }

.profils-fieldset {
    background: #fff;
    border: 1px solid var(--labo-line);
    border-top: 4px solid var(--labo-green);
    border-radius: 16px;
    padding: 1.5rem 1.9rem 1.35rem;
    margin: 0 0 1.7rem;
    box-shadow: var(--labo-shadow);
}

.profils-fieldset legend {
    float: none;
    width: auto;
    padding: .32rem 1.05rem;
    margin: 0 0 .55rem;
    background: rgba(143, 190, 34, .14);
    border: 1px solid rgba(143, 190, 34, .42);
    border-radius: 100px;
    color: var(--labo-green-ink);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.profils-form .control-group { margin-bottom: 1.05rem; }
.profils-form label { display: block; margin-bottom: .35rem; }
.profils-form .form-text, .profils-form small { color: var(--labo-muted); font-size: .8rem; }

/* Bouton « œil » des champs mot de passe (icône embarquée, la police
   d'icônes Joomla n'est pas chargée par ce template) */
.profils-form .input-group { display: flex; align-items: stretch; }
.profils-form .input-group > input { flex: 1 1 auto; border-radius: var(--labo-radius-sm) 0 0 var(--labo-radius-sm); }
.profils-form .input-group > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    padding: 0;
    border: 1px solid var(--labo-line);
    border-left: 0;
    border-radius: 0 var(--labo-radius-sm) var(--labo-radius-sm) 0;
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235a6e84' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/><circle cx='12' cy='12' r='3'/></svg>") center / 18px no-repeat;
    box-shadow: none;
    color: transparent;
    font-size: 0;
}
.profils-form .input-group > .btn:hover,
.profils-form .input-group > .btn:focus {
    background-color: var(--labo-blue-light);
    transform: none;
    box-shadow: none;
}
.profils-form .input-group > .btn span { display: none; }

/* Jauge de force du mot de passe */
.profils-form .progress {
    width: 100%;
    height: 6px;
    margin-top: .55rem;
    background: var(--labo-line);
    border-radius: 100px;
    overflow: hidden;
}
.profils-form .progress-bar { background: linear-gradient(90deg, var(--labo-green), var(--labo-green-dark)); }

/* Soumission */
.profils-actions { text-align: center; margin-top: .4rem; }
.profils-actions .labo-btn { min-width: min(340px, 100%); }
/* Messages de validation : jamais inline dans les libellés (décalage) —
   l'erreur est signalée par le contour du champ */
.profils-form .form-control-feedback { display: none !important; }
.profils-form label.invalid { color: inherit; }
.profils-form input.invalid, .profils-form select.invalid, .profils-form textarea.invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 .2rem rgba(220, 38, 38, .12);
}

/* Jauge de force du mot de passe (<meter>) */
.profils-form meter { width: 100%; height: 8px; margin-top: .55rem; border-radius: 100px; }
.profils-form meter::-webkit-meter-bar { background: var(--labo-line); border: 0; border-radius: 100px; height: 8px; }
.profils-form meter::-webkit-meter-optimum-value,
.profils-form meter::-webkit-meter-suboptimum-value,
.profils-form meter::-webkit-meter-even-less-good-value {
    background: linear-gradient(90deg, var(--labo-green), var(--labo-green-dark));
    border-radius: 100px;
}