/* =========================================================================
   LAMA — refonte 2026-11 : navigation à menus déroulants, pages intérieures,
   blocs partagés, nettoyage visuel. Chargé après style.css.
   ========================================================================= */

/* ---------- Accessibilité ---------- */
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100000;
    background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 6px;
    font-weight: 600; text-decoration: none; transition: top .2s ease;
}
.skip-link:focus { top: 12px; }
#main-content { outline: none; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--gold); outline-offset: 2px;
}
html { scroll-padding-top: 92px; }

/* ---------- Navigation principale ---------- */
nav.main-nav .nav-root { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
nav.main-nav .nav-item { position: relative; display: flex; align-items: center; }
nav.main-nav .nav-link {
    display: inline-flex !important; align-items: center; gap: 5px;
    font-size: .76rem !important; letter-spacing: .6px !important; padding: 10px 11px !important;
    text-transform: uppercase; font-weight: 600; color: var(--navy); border-radius: 6px; white-space: nowrap;
}
nav.main-nav .nav-caret { opacity: .55; transition: transform .2s ease, opacity .2s ease; }
nav.main-nav .nav-item.is-current > .nav-link { color: var(--gold); }
nav.main-nav .nav-item.is-current > .nav-link::after {
    content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; background: var(--gold); border-radius: 2px;
}
nav.main-nav .sub-toggle { display: none; }
.mobile-nav-portal { display: none; }

/* Panneau déroulant (desktop) */
@media (min-width: 1241px) {
    nav.main-nav .sub-menu {
        position: absolute; top: calc(100% + 6px); left: 50%; min-width: 280px;
        list-style: none; margin: 0; padding: 8px; display: block !important;
        background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold);
        border-radius: 10px; box-shadow: 0 22px 48px rgba(10, 29, 55, .16);
        opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
        transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
        z-index: 200;
    }
    /* pont invisible pour ne pas perdre le survol entre le lien et le panneau */
    nav.main-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
    nav.main-nav .has-sub:hover > .sub-menu,
    nav.main-nav .has-sub:focus-within > .sub-menu,
    nav.main-nav .has-sub.sub-open > .sub-menu {
        opacity: 1; visibility: visible; transform: translate(-50%, 0);
        transition: opacity .18s ease, transform .18s ease, visibility 0s;
    }
    nav.main-nav .has-sub:hover > .nav-link .nav-caret,
    nav.main-nav .has-sub:focus-within > .nav-link .nav-caret { transform: rotate(180deg); opacity: 1; }
    nav.main-nav .sub-menu li { display: block; width: auto; }
    nav.main-nav .sub-menu a {
        display: flex !important; flex-direction: column; gap: 2px; padding: 10px 12px !important;
        border-radius: 7px; text-transform: none !important; letter-spacing: 0 !important; white-space: normal;
        border: 0 !important;
    }
    nav.main-nav .sub-menu a:hover { background: #f6f1e6 !important; }
    nav.main-nav .sub-label { font-size: .88rem; font-weight: 600; color: var(--navy); }
    nav.main-nav .sub-desc { font-size: .76rem; font-weight: 400; color: var(--mute); }
    nav.main-nav .sub-menu a:hover .sub-label { color: #8c6a28; }
    .brand small { display: block !important; }
}
@media (min-width: 1241px) and (max-width: 1399px) {
    .brand small { display: none !important; }
    nav.main-nav .nav-link { padding: 10px 8px !important; font-size: .72rem !important; }
}

/* Menu mobile / tablette : accordéon */
@media (max-width: 1240px) {
    nav.main-nav .nav-root { flex-direction: column; align-items: stretch; gap: 0; }
    nav.main-nav .nav-item { flex-wrap: wrap; border-bottom: 1px solid rgba(228, 225, 216, .7); }
    nav.main-nav .nav-item .nav-link {
        flex: 1; padding: 14px 6px !important; font-size: .95rem !important; border-bottom: 0 !important;
        text-transform: none; letter-spacing: .2px !important;
    }
    nav.main-nav .nav-caret { display: none; }
    nav.main-nav .nav-item.is-current > .nav-link::after { display: none; }
    nav.main-nav .sub-toggle {
        display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
        background: transparent; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); cursor: pointer;
    }
    nav.main-nav .sub-toggle svg { transition: transform .2s ease; }
    nav.main-nav .has-sub.sub-open .sub-toggle svg { transform: rotate(180deg); }
    nav.main-nav .sub-menu { display: none; list-style: none; width: 100%; margin: 0 0 10px; padding: 0 0 0 12px; border-left: 2px solid var(--gold2); }
    nav.main-nav .has-sub.sub-open > .sub-menu { display: block; }
    nav.main-nav .sub-menu a { display: flex !important; flex-direction: column; padding: 9px 8px !important; border-bottom: 0 !important; font-size: .9rem !important; text-transform: none !important; letter-spacing: 0 !important; }
    nav.main-nav .sub-label { font-weight: 600; color: var(--navy); }
    nav.main-nav .sub-desc { font-size: .78rem; color: var(--mute); }
    .mobile-nav-portal { display: block !important; padding-top: 16px; border-bottom: 0 !important; }
    .mobile-nav-portal .btn { width: 100%; text-align: center; }
    nav.main-nav { max-height: calc(100vh - 140px); overflow-y: auto; }
}

/* ---------- En-têtes de pages intérieures ---------- */
.page-hero {
    position: relative; overflow: hidden; color: #fff;
    background: radial-gradient(circle at 85% 0%, rgba(29, 94, 168, .45) 0%, transparent 55%), linear-gradient(160deg, #07172c 0%, #0d284a 60%, #081a33 100%);
    border-bottom: 3px solid var(--gold); padding: 44px 0 46px;
}
.page-hero-art { position: absolute; right: 0; top: 0; height: 100%; width: 60%; color: #d9b877; opacity: .14; pointer-events: none; }
.page-hero .wrap { position: relative; }
.page-hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 6px 0 10px; color: #fff; }
.page-hero-lead { color: #cbd7e8; max-width: 760px; font-size: 1.02rem; line-height: 1.65; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .78rem; color: #9fb2cc; letter-spacing: .3px; }
.crumbs a { color: var(--gold2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Sections ---------- */
.sec-pad { padding: 64px 0; }
.sec-ivory { background: var(--ivory); border-top: 1px solid var(--line); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.sec-head .head { margin-bottom: 0; }
.sec-head.is-dark h2 { color: #fff; }
.sec-head.is-dark p { color: #cbd5e0; }
.sec-head.is-dark .eyebrow { color: var(--gold2); }
.sec-head-btn { color: var(--navy) !important; border-color: var(--line) !important; padding: 9px 18px !important; font-size: .8rem !important; white-space: nowrap; }
.sec-head.is-dark .sec-head-btn { color: #fff !important; border-color: rgba(255,255,255,.35) !important; }
.sec-head.is-dark .sec-head-btn:hover { border-color: var(--gold2) !important; color: var(--gold2) !important; }
.btn-on-dark { color: #fff !important; border-color: rgba(255,255,255,.4) !important; }
.btn-on-light { color: var(--navy) !important; border-color: var(--line) !important; }
.empty-note { text-align: center; padding: 30px 0; }
.page-dark { padding: 56px 0 70px; min-height: 60vh; }
.page-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-toolbar p { margin: 0; }
.prose { max-width: 820px; line-height: 1.75; }

/* ---------- Hero ---------- */
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero .hs .sl.tx {
    cursor: pointer; justify-content: flex-start;
    background:
        radial-gradient(circle at 85% 20%, rgba(217, 184, 119, .22) 0%, transparent 45%),
        linear-gradient(140deg, #123764 0%, #0b2547 55%, #081a33 100%);
}
.hero .hs .sl.tx::before {
    content: "∫"; position: absolute; right: 18px; top: -30px; font-family: var(--serif); font-style: italic;
    font-size: 15rem; line-height: 1; color: rgba(217, 184, 119, .10); pointer-events: none;
}
.hero .hs .sl-date {
    position: absolute; left: 24px; top: 22px; z-index: 2; display: flex; flex-direction: column; align-items: center;
    padding: 10px 14px; border: 1px solid rgba(217,184,119,.55); border-radius: 8px; background: rgba(6,20,42,.45);
    color: #fff; line-height: 1;
}
.hero .hs .sl-date b { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; color: var(--gold2); }
.hero .hs .sl-date i { font-style: normal; font-size: .68rem; letter-spacing: 1.4px; text-transform: uppercase; margin-top: 4px; color: #cbd7e8; }
.hero .hs .sl-loc { display: block; margin-top: 6px; font-size: .8rem; color: #b9c8dc; }
.hero-agenda-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.hero-agenda-head h3 { margin: 0 !important; }
.hero-agenda-head a { color: var(--gold2); font-size: .82rem; text-decoration: none; white-space: nowrap; }
.hero-agenda-head a:hover { text-decoration: underline; }
.hero .panel.hero-agenda li time { display: block; margin-top: 6px; color: #9fb2cc; font-size: .8rem; }

/* ---------- Chiffres clés ---------- */
.stats .box { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
.stats .stat { text-decoration: none; color: inherit; padding: 26px 12px 22px; }
.stats .stat:hover { background: #fbf7ee; }
.stats .stat:hover b { color: #8c6a28; }
.stats .stat span { margin-top: 8px; font-size: .72rem; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600; color: var(--mute); }
.stats .stat:last-child { border-right: 0; }
@media (max-width: 1160px) {
    .stats .stat, .stats .stat:nth-child(n) { grid-column: auto !important; border-top: 0 !important; }
}
@media (max-width: 640px) {
    .stats .box { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .stats .stat { border-bottom: 1px solid rgba(235,230,220,.9); }
}

/* Pages intérieures : pas de chevauchement avec la section précédente */
.inner-page .stats { margin-top: 0 !important; padding: 8px 0 56px; background: #fff; }

/* Eyebrows hors .head (contact, présentation) */
.contact-info .eyebrow, .about-left .eyebrow {
    font-size: .72rem; letter-spacing: 2.2px; text-transform: uppercase; font-weight: 700; color: var(--gold); margin-bottom: 10px;
}

/* ---------- Présentation ---------- */
.about-left .eyebrow { color: var(--gold); }
.about-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.pillar-icon { color: #8c6a28; }
.pillar-icon svg { display: block; }

/* ---------- Citation ---------- */
.quote .qa b { margin-top: 6px; }

/* ---------- Actualités ---------- */
.nw-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.nw-top .cat { margin-bottom: 0 !important; }
.nw .dt { font-size: .8rem; color: var(--mute); white-space: nowrap; }
.nw-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.25; margin: 0 0 10px; }
.nw-title a { color: var(--navy); text-decoration: none; }
.nw-title a::after { content: ""; position: absolute; inset: 0; }
.nw:hover .nw-title a { color: #8c6a28; }
.nw p { color: #4a5568; font-size: .92rem; line-height: 1.6; flex: 1; }
.nw-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0ebe0; font-size: .8rem; }
.nw-loc { color: #875e18; font-weight: 600; }
.nw-more { color: var(--navy); font-weight: 600; text-decoration: none; margin-left: auto; position: relative; z-index: 1; }
.chip-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 30px; padding: 7px 14px; font: 600 .82rem var(--sans); cursor: pointer; }
.chip span { margin-left: 6px; font-size: .72rem; color: var(--mute); }
.chip.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip.is-on span { color: var(--gold2); }

/* ---------- Équipes ---------- */
section.dark.sec-pad { padding: 64px 0; }
.teams-foot { color: #cbd5e0; margin: 26px 0 0; font-size: .95rem; }
.members-spotlight-bar { display: none; }

/* ---------- Publications ---------- */
.articles-grid .article-excerpt { display: none; }
.lama-pub-search {
    display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 0 16px;
    background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--mute);
}
.lama-pub-search input { flex: 1; border: 0; outline: none; padding: 13px 0; font: inherit; font-size: .95rem; background: transparent; color: var(--ink); }
.lama-pub-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,145,74,.15); }
.hist-peak-badge { display: none !important; }
.article-card .article-authors { margin-bottom: 4px; }

/* ---------- Archives ---------- */
.arch-card .meta-item .icon { display: none; }
.arch-card .arch-card-footer { justify-content: flex-end; }
.lama-archive-section .sec-head { margin-bottom: 26px; }

/* ---------- Rejoindre ---------- */
a.jc { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
a.jc:hover { border-left-color: var(--navy); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(10,29,55,.08); }
a.jc p { flex: 1; }
.jc-more { margin-top: 14px; font-weight: 600; font-size: .85rem; color: #8c6a28; }

/* ---------- Tutelles ---------- */
.inst-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.inst-card {
    display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: #fff; text-decoration: none;
    border: 1px solid var(--line); border-radius: 10px; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.inst-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(10,29,55,.07); }
.inst-logo { width: 64px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center; }
.inst-logo img { max-width: 100%; max-height: 46px; object-fit: contain; }
.inst-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inst-role { font-size: .68rem; letter-spacing: 1.2px; text-transform: uppercase; color: #8c6a28; font-weight: 700; }
.inst-body strong { color: var(--navy); font-size: .95rem; }
.inst-url { font-size: .8rem; color: var(--blue); }

/* ---------- Contact ---------- */
.contact-title { font-family: var(--serif); font-size: clamp(2rem, 3vw, 2.4rem); color: var(--navy); line-height: 1.15; margin: 0 0 20px; }
.contact-dl { margin: 0 0 24px; display: grid; gap: 4px; }
.contact-dl dt { font-size: .72rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-top: 14px; }
.contact-dl dd { margin: 0; color: #4a5568; line-height: 1.6; }
.contact-dl a { color: var(--blue); font-weight: 500; }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form .fld { display: flex; flex-direction: column; gap: 6px; }
.contact-form .fld > span { font-size: .8rem; font-weight: 600; color: var(--navy); }
.contact-form button[type=submit] { padding: 14px 28px; font-weight: 600; align-self: flex-start; min-width: 220px; }
.form-hint { font-size: .8rem; color: var(--mute); margin: 0; }
.form-notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 16px; font-weight: 500; }
.form-notice.is-ok { background: #ecf8f0; border: 1px solid #9fd8b2; color: #1d6b3a; }
.form-notice.is-err { background: #fdf0ef; border: 1px solid #f0b4ae; color: #9b2c22; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.contact-map-card { margin-top: 8px; }

/* ---------- Doctorat ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 26px 22px 22px; display: flex; flex-direction: column; }
.step-n {
    width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--navy); color: var(--gold2); font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin-bottom: 14px;
}
.step h3 { font-family: var(--serif); font-size: 1.3rem; color: var(--navy); margin: 0 0 8px; }
.step p { color: #4a5568; font-size: .92rem; line-height: 1.6; flex: 1; margin: 0; }
.step-link { margin-top: 14px; font-weight: 600; font-size: .85rem; color: #8c6a28; text-decoration: none; }
.step-link:hover { text-decoration: underline; }
.host-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.host-team { border: 1px solid var(--line); border-left: 4px solid var(--team, var(--gold)); border-radius: 10px; padding: 22px 24px; background: #fff; display: flex; flex-direction: column; }
.host-team-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.host-team-top h3 { font-family: var(--serif); font-size: 1.35rem; color: var(--navy); margin: 0; }
.host-sig { font: 700 .7rem var(--sans); letter-spacing: 1px; color: var(--team); border: 1px solid var(--team); border-radius: 4px; padding: 3px 7px; }
.host-team p { color: #4a5568; font-size: .92rem; line-height: 1.6; flex: 1; }
.host-team-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; padding-top: 12px; border-top: 1px solid #f0ebe0; }
.host-team-foot span { font-weight: 600; color: var(--navy); }
.host-team-foot a { color: var(--blue); text-decoration: none; }
.host-team-foot a:last-child { margin-left: auto; color: #8c6a28; font-weight: 600; }

/* ---------- Bandeau d'appel à l'action ---------- */
.cta-band { background: linear-gradient(160deg, #0b2244 0%, #081a33 100%); color: #fff; padding: 48px 0; border-top: 3px solid var(--gold); }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 0 0 6px; color: #fff; }
.cta-band p { color: #cbd7e8; margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Pied de page ---------- */
.site-footer .brand-footer { margin-bottom: 14px; }
.site-footer .brand-footer b { color: #fff; }
.site-footer .brand-footer small { color: #9fb2cc; display: block !important; }
.site-footer .f-text { font-size: .9rem; line-height: 1.6; opacity: .88; }
.site-footer .f-text a { color: var(--gold2); }
.site-footer .f-small { font-size: .82rem; margin-top: 10px; }
.site-footer .f-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.site-footer .f-actions .btn { padding: 8px 16px; font-size: .72rem; }
.copy-sys-txt:empty { display: none; }

/* ---------- Assistant : bouton compact ---------- */
.lama-ai-launcher-btn {
    width: 54px; height: 54px; padding: 0 !important; border-radius: 50% !important;
    display: flex; align-items: center; justify-content: center; bottom: 22px !important; right: 22px !important;
    border-width: 1.5px !important; box-shadow: 0 10px 26px rgba(10, 29, 55, .35) !important;
}
.lama-ai-launcher-btn .launcher-inner { display: flex; align-items: center; justify-content: center; color: var(--gold2); }
.lama-ai-launcher-btn .launcher-text {
    position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
    background: var(--navy); color: #fff; font-size: .78rem; font-weight: 600; white-space: nowrap;
    padding: 7px 12px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.lama-ai-launcher-btn:hover .launcher-text, .lama-ai-launcher-btn:focus-visible .launcher-text { opacity: 1; }
.lama-ai-launcher-btn .launcher-glow, .lama-ai-launcher-btn .launcher-pulse { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .host-teams { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .newsgrid, .articles-grid, .join { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 640px) {
    .sec-pad, section.dark.sec-pad { padding: 46px 0; }
    .newsgrid, .articles-grid, .join, .steps { grid-template-columns: 1fr !important; }
    .page-hero { padding: 32px 0 34px; }
    .sec-head-btn { width: 100%; text-align: center; }
    .contact-form button[type=submit] { width: 100%; align-self: stretch; }
    .host-team-foot a:last-child { margin-left: 0; }
    .hero .hs .sl-date { left: 16px; top: 16px; padding: 8px 10px; }
    .hero .hs .sl-date b { font-size: 1.6rem; }
}

@media print {
    .tick, .site-header, .lama-ai-app-container, .site-footer .f-actions { display: none !important; }
}
