/* Lysios public site - additions loaded after the legacy theme (js_css/*.css).
   Keeps the existing identity (navy + light Helvetica) and only adds: accessibility, responsive fixes, cookie banner. */

:root {
    --lys-navy: #1e355d;
    --lys-blue: #1c4776;
    --lys-ink: #1a1a1a;
    --lys-radius: 10px;
}

/* ---------- Base refinements ---------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--lys-blue); color: #fff; }
img { max-width: 100%; height: auto; }
a, .read-more, .download { transition: color .2s ease, background-color .2s ease, opacity .2s ease; }

/* The legacy theme removed every focus outline: restore a visible one for keyboard users. */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--lys-blue) !important;
    outline-offset: 3px;
}
header a:focus-visible, .footer-container a:focus-visible, .lys-cookie a:focus-visible, .lys-cookie button:focus-visible {
    outline-color: #fff !important;
}

/* Skip link */
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 1000000; background: #fff; color: var(--lys-navy); padding: 10px 16px; border-radius: 0 0 8px 8px; font-weight: 600; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 0; }

/* ---------- Responsive fixes ---------- */
/* Sector tag lists: the theme keeps a 295px left offset and a 640px width at every viewport. */
@media (max-width: 1199px) {
    .sector-container .content { padding: 0 40px 100px 120px; }
    .sector-container .content ul,
    .page-lysios .sectors-container .content ul { width: 100%; margin-left: 0; padding-left: 0; }
}
@media (max-width: 767px) {
    .sector-container .content { padding: 0 20px 90px; }
    .sector-container .content p { padding-top: 24px; }
}
@media (max-width: 575px) {
    .sector-container .content li,
    .page-lysios .sectors-container .content li { width: 100%; text-align: left; }
}
/* Never allow horizontal scrolling of the whole page on small screens. */
@media (max-width: 991px) { html, body { overflow-x: hidden; } }
.footer-container address a { overflow-wrap: anywhere; }

/* ---------- Cookie banner ---------- */
.lys-cookie {
    position: fixed; left: 24px; bottom: 24px; z-index: 999999;
    width: min(520px, calc(100vw - 48px));
    display: flex; align-items: center; gap: 18px;
    padding: 16px 18px 16px 20px;
    background: var(--lys-navy); color: #fff;
    border-radius: var(--lys-radius);
    box-shadow: 0 10px 30px rgba(10, 20, 40, .35), 0 2px 6px rgba(10, 20, 40, .25);
    font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.45;
    opacity: 0; transform: translateY(16px); transition: opacity .3s ease, transform .3s ease;
}
.lys-cookie[hidden] { display: none; }
.lys-cookie.is-visible { opacity: 1; transform: none; }
.lys-cookie p { margin: 0; flex: 1; color: #fff; text-align: left; font-size: inherit; }
.lys-cookie button {
    flex: none; min-height: 44px; padding: 0 22px; border: 0; border-radius: 8px;
    background: #fff; color: var(--lys-navy); font: 600 14px/1 Helvetica, Arial, sans-serif; letter-spacing: .02em; cursor: pointer;
    transition: background-color .2s ease, transform .1s ease;
}
.lys-cookie button:hover { background: #e4ecf8; }
.lys-cookie button:active { transform: translateY(1px); }
@media (max-width: 575px) {
    .lys-cookie { left: 12px; right: 12px; bottom: 12px; width: auto; flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
    .lys-cookie button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .lys-cookie { transition: none; transform: none; }
}

/* ---------- Contrast fixes (WCAG AA 4.5:1) ----------
   The legacy theme used 48-50% transparent text and a few white-on-pastel / black-on-navy pairs. */
.read-more.read-more { color: rgba(0, 0, 0, .72); }
.read-more.read-more:hover { color: #000; }
#expertise .read-more.read-more, #publication .read-more.read-more { color: rgba(255, 255, 255, .9); }
#expertise .read-more.read-more:hover, #publication .read-more.read-more:hover { color: #fff; }
#publication .content h4 { color: #d6d5d5; }
#publication .publication-date { color: rgba(255, 255, 255, .85); }
#publication a.download, #publication a.download:hover { color: #fff; }
.footer-container .container p, .footer-container .container .l-address-map { color: rgba(255, 255, 255, .88); }
.footer-container .container .l-address-map:hover { color: #fff; }
/* Key dates: dark text on the light-blue 2007 bubble. */
.page-lysios .dates-container .content li.date02 span, .page-lysios .dates-container .content li.date02 p { color: #14213a; }
/* Competences accordion: dark text on the two pastel tiles, light text on the navy panel. */
.block-competences.competence02 .block-header h4,
.block-competences.competence04 .block-header h4 { color: #14213a; }
.block-competences.competence03 .block-content,
.block-competences.competence03 .block-content li,
.block-competences.competence03 .block-content p { color: #fff; }

/* ---------- Readability on small screens ---------- */
/* Justified text creates wide gaps between words in narrow columns. */
@media (max-width: 767px) {
    .page-lysios .content p, .page-lysios .content li, .sector-container .content p,
    .competences-container .content p, .block-content li, .footer-container .container p { text-align: left; }
}

/* ---------- Mobile menu ---------- */
@media (max-width: 767px) {
    #menu-primary-menu { background: var(--lys-navy); box-shadow: 0 12px 24px rgba(10, 20, 40, .3); }
    #menu-primary-menu a { display: flex; align-items: center; min-height: 44px; }
}

/* Publications: archives (publications not highlighted), grouped by year */
.footer-publication .archives { padding: 0 20px 10px; }
.footer-publication .archive-year { font-size: 22px; font-weight: bold; color: #000; margin: 14px 0 6px; padding-left: 10px; }
.footer-publication .archive-item { padding: 0 10px 5px 30px; }
.footer-publication .archive-item a { color: #000; }
.footer-publication .archive-item a:hover { text-decoration: underline; }

/* ---------- Legal pages and footer links ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.legal-page { max-width: 820px; margin: 0 auto; padding: 48px 15px 64px; color: #14213a; line-height: 1.6; }
.legal-page > h2 { font-size: 2.4em; color: var(--lys-navy, #1e355d); margin: 0 0 24px; }
.legal-page > h3 { font-size: 1.4em; color: var(--lys-navy, #1e355d); margin: 32px 0 8px; }
.legal-page a { color: #1C4776; text-decoration: underline; }
.legal-page mark { background: #fff3b0; color: #14213a; padding: 0 3px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; padding: 16px 15px 4px; }
.legal-links a { color: #1C4776; text-decoration: underline; padding: 8px 0; }
