/* ==========================================================================
   Focus web — single-focus_online.php
   Chargé uniquement sur ce CPT (inc/focus-online.php).
   Reprend le langage du thème : header .header-area-new, Roboto, titres en
   graisse normale, boutons pilule, cartes blanches à ombre légère.
   ========================================================================== */

.fo {
    --fo-blue: var(--new-blue, #0077be);
    --fo-blue-dark: var(--primary-btn, #186db2);
    --fo-sky: var(--primary, #e8f3fb);
    --fo-green: var(--success, #a0c434);
    --fo-text: var(--black-text, #3c3d3b);
    --fo-muted: var(--gray-text, #747f85);
    --fo-line: #d8d8d8;
    --fo-shadow: 0 2px 14px rgba(0, 0, 0, .07);
    color: var(--fo-text);
}

.fo-icon { flex: none; vertical-align: middle; }

/* Le thème souligne tous les liens : uniquement dans le texte courant ici */
.fo a { text-decoration: none; }
.fo a:hover { text-decoration: underline; }
.fo .fo-text a { text-decoration: underline; }
.fo .fo-card:hover, .fo .fo-result:hover, .fo .fo-pill:hover { text-decoration: none; }

/* Le thème stylise tous les <button> (fond bleu foncé, majuscules, largeur fixe) */
.fo button {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    text-transform: none;
    letter-spacing: normal;
    width: auto;
    min-width: 0;
}

/* Boutons pilule (comme « En savoir + » / « Lire plus » du site) */
.fo .fo-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .5px;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    transition: .3s;
}
.fo .fo-pill--blue { background: var(--fo-blue); }
.fo .fo-pill--blue:hover { background: var(--fo-blue-dark); color: #fff; }
.fo .fo-pill--green { background: var(--fo-green); }
.fo .fo-pill--green:hover { background: #8aaa2a; color: #fff; }

/* ------------------------------------------------------------------ header */
.fo-header { padding-top: 30px; }
.fo-header .header-content { padding-right: 24px; }
.fo-label {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--fo-muted);
    margin-bottom: 12px;
}
.fo-label__sep { margin: 0 4px; }
.fo-header .header-title { margin-bottom: 0; }
.fo-header__second { display: block; font-style: normal; color: var(--fo-blue); }
.fo-audience { margin-top: 18px; font-size: 15px; color: var(--fo-muted); }

.fo-searchpanel {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--fo-shadow);
    padding: 30px;
}
.fo-search label { display: block; font-size: 18px; color: #1d1d1d; margin-bottom: 12px; }
.fo-search__box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--fo-line);
    border-radius: 50px;
    padding: 5px 5px 5px 18px;
    color: var(--fo-muted);
    transition: .2s;
}
.fo-search__box:focus-within { border-color: var(--fo-blue); }
.fo-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    font-size: 16px;
    padding: 8px 0;
    background: transparent;
    color: var(--fo-text);
}
.fo-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 16px; font-size: 14px; color: var(--fo-muted); }
.fo .fo-suggestions button { color: var(--fo-blue); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.fo .fo-suggestions button:hover { color: var(--fo-blue-dark); }

.fo-actions { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--fo-line); }
.fo .fo-actions a, .fo .fo-actions button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--fo-blue);
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
}
.fo .fo-actions a:hover, .fo .fo-actions button:hover { color: var(--fo-blue-dark); text-decoration: underline; }

/* ------------------------------------------------------------------ mise en page */
.fo-workspace {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 60px;
    align-items: start;
    padding: 20px 0 80px;
}
.fo-aside { position: sticky; top: 30px; }
.fo-reading { min-width: 0; }

/* Titres de section : comme la page Focus (bleu, filet gris) */
.fo-title { border-bottom: 1px solid var(--fo-line); margin-bottom: 24px; padding-bottom: 12px; }
.fo-title__kicker { font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--fo-muted); margin: 0 0 6px; }
.fo-title h2 { font-size: 30px; line-height: 1.3; font-weight: 500; color: var(--fo-blue); margin: 0; }
.fo-intro { font-size: 17px; line-height: 1.6; color: var(--fo-muted); margin-bottom: 30px; }
.fo-intro strong { display: block; margin-top: 6px; font-weight: 500; color: var(--fo-text); }

/* sommaire latéral */
.fo-toc summary { display: none; list-style: none; cursor: pointer; }
.fo-toc summary::-webkit-details-marker { display: none; }
.fo-toc__label { font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--fo-muted); margin-bottom: 12px; }
.fo-toc nav { display: flex; flex-direction: column; }
.fo-toc nav a {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #ececec;
    color: var(--fo-text);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.4;
    transition: .2s;
}
.fo-toc nav a:hover, .fo-toc nav a[aria-current="page"] { color: var(--fo-blue); }
.fo-toc nav a[aria-current="page"] { font-weight: 500; }
.fo-toc nav a.is-annexe { font-size: 14px; color: var(--fo-muted); }
.fo-num { color: var(--fo-blue); font-variant-numeric: tabular-nums; min-width: 20px; }

.fo-help { margin-top: 30px; font-size: 15px; }
.fo-help p { margin-bottom: 4px; color: var(--fo-muted); }
.fo-help a { color: var(--fo-blue); font-weight: 500; }
.fo-help small { display: block; margin-top: 4px; color: var(--fo-muted); }

/* ------------------------------------------------------------------ cartes chapitres */
.fo-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.fo-card {
    display: flex;
    gap: 18px;
    padding: 26px 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--fo-shadow);
    color: var(--fo-text);
    text-decoration: none;
    transition: .3s;
}
.fo-card:hover { box-shadow: 0 6px 24px rgba(0, 0, 0, .12); color: var(--fo-text); }
.fo-card__num { font-size: 34px; line-height: 1; font-weight: 300; color: var(--fo-blue); }
.fo-card__title { display: block; font-size: 20px; font-weight: 500; line-height: 1.35; color: #1d1d1d; margin-bottom: 8px; }
.fo-card:hover .fo-card__title { color: var(--fo-blue); }
.fo-card__text { display: block; font-size: 15px; color: var(--fo-muted); }

.fo-annexes { margin-top: 36px; }
.fo-annexes p { font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--fo-muted); margin-bottom: 8px; }
.fo-annexes ul { list-style: none; padding: 0; margin: 0; }
.fo-annexes li { padding: 4px 0; }
.fo-annexes a { color: var(--fo-blue); }

.fo-note { margin-top: 36px; padding: 28px 30px; background: var(--fo-sky); border-radius: 8px; }
.fo-note h3 { font-size: 20px; font-weight: 500; color: #1d1d1d; margin: 0 0 10px; }

/* ------------------------------------------------------------------ chapitre */
.fo .fo-back {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--fo-blue);
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
}
.fo .fo-back::before { content: "← "; }
.fo .fo-back:hover { text-decoration: underline; }

.fo-block { margin-bottom: 24px; scroll-margin-top: 30px; }
.fo-block h3 { font-size: 24px; font-weight: 500; color: #1d1d1d; margin: 16px 0 0; }
.fo-block h4 { font-size: 19px; font-weight: 500; color: var(--fo-blue); margin: 6px 0 0; }
.fo-text { font-size: 17px; line-height: 1.7; }
.fo-text p:last-child { margin-bottom: 0; }
.fo-text a { color: var(--fo-blue); }
.fo-text ul { padding-left: 1.2em; }
.fo-text li { margin-bottom: 6px; }
.fo-text li::marker { color: var(--fo-blue); }

.fo-callout { padding: 24px 28px; border-radius: 8px; background: var(--fo-sky); }
.fo-callout--important { background: var(--caution-light, #fbf9e4); }
.fo-callout--astuce { background: var(--success-light, #eafbe7); }
.fo-callout__title { font-size: 18px; font-weight: 500; color: #1d1d1d; margin-bottom: 8px; }

.fo-list-title { font-size: 19px; font-weight: 500; color: var(--fo-blue); margin: 0 0 16px; }
.fo-orgs { display: grid; gap: 16px; }
.fo-org, .fo-contact {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--fo-shadow);
    padding: 22px 24px;
}
.fo-org h5, .fo-contact h5 { font-size: 18px; font-weight: 500; color: #1d1d1d; margin: 0 0 8px; }
.fo-org .fo-text { font-size: 16px; }
.fo-meta { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 15px; }
.fo-meta li { display: flex; gap: 8px; align-items: flex-start; }
.fo-meta .fo-icon { width: 16px; height: 16px; margin-top: 3px; color: var(--fo-blue); }
.fo-meta a { color: var(--fo-blue); word-break: break-word; }

.fo-contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.fo-contact .fo-meta { flex-direction: column; margin-top: 8px; }
.fo-contact__sub { font-size: 14px; color: var(--fo-muted); margin: -4px 0 0; }

.fo-figure img { max-width: 100%; height: auto; border-radius: 8px; }
.fo-figure figcaption { font-size: 14px; color: var(--fo-muted); margin-top: 8px; }
.fo-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

.fo-crossref { font-size: 17px; padding: 16px 0; border-top: 1px solid var(--fo-line); border-bottom: 1px solid var(--fo-line); }
.fo-crossref a { color: var(--fo-blue); font-weight: 500; }

.fo-block.is-flash { animation: fo-flash 2s ease-out; }
@keyframes fo-flash { 0%, 30% { background: #fff6c2; box-shadow: 0 0 0 10px #fff6c2; } 100% { background: transparent; box-shadow: 0 0 0 10px transparent; } }

.fo-pager { display: flex; justify-content: space-between; gap: 24px; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--fo-line); }
.fo-pager a { display: flex; flex-direction: column; gap: 2px; max-width: 48%; color: #1d1d1d; text-decoration: none; font-size: 17px; }
.fo-pager a:hover { color: var(--fo-blue); }
.fo-pager small { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--fo-blue); }
.fo-pager__prev small::before { content: "← "; }
.fo-pager__next { margin-left: auto; text-align: right; }
.fo-pager__next small::after { content: " →"; }

.fo-top { display: inline-block; margin-top: 40px; color: var(--fo-blue); font-size: 15px; }
.fo-top::before { content: "↑ "; }

/* ------------------------------------------------------------------ résultats */
.fo-results__count { color: var(--fo-muted); }
.fo-results__list { display: grid; gap: 16px; }
.fo-result {
    display: block;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--fo-shadow);
    padding: 20px 24px;
    text-decoration: none;
    color: var(--fo-text);
    transition: .3s;
}
.fo-result:hover { box-shadow: 0 6px 24px rgba(0, 0, 0, .12); color: var(--fo-text); }
.fo-result small { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--fo-blue); }
.fo-result p { margin: 8px 0; font-size: 16px; }
.fo-result mark { background: #fff1a8; padding: 0 2px; }
.fo-result span { font-size: 15px; color: var(--fo-blue); }
.fo-results .fo-note { margin-top: 0; }

/* ------------------------------------------------------------------ helpdesks (bande pleine largeur) */
.fo-helpdesk { background: var(--fo-sky); padding: 70px 0 80px; scroll-margin-top: 0; }
.fo-helpdesk .fo-title { border-bottom-color: #c9dbe8; }
.fo-contacts--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ------------------------------------------------------------------ JS : un panneau à la fois */
.fo.is-js .fo-chapter { display: none; }
.fo.is-js .fo-chapter.is-active { display: block; }
.fo:not(.is-js) .fo-chapter { margin-top: 60px; }
.fo:not(.is-js) .fo-back { display: none; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1199px) {
    .fo-contacts--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .fo-header .header-content { padding-right: 0; }
    .fo-workspace { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 0; }
    .fo-aside { position: sticky; top: 0; z-index: 20; background: #fff; padding: 10px 0; }
    .fo-toc { border-radius: 8px; box-shadow: var(--fo-shadow); background: #fff; }
    .fo-toc summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; color: #1d1d1d; }
    .fo-toc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--fo-blue); border-bottom: 2px solid var(--fo-blue); transform: rotate(45deg); margin-top: -4px; transition: .2s; }
    .fo-toc[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
    .fo-toc__label { display: none; }
    .fo-toc nav { max-height: 60vh; overflow: auto; padding: 0 18px 10px; }
    .fo-help { display: none; }
    .fo-title h2 { font-size: 26px; }
    .fo-contacts--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .fo-searchpanel { padding: 22px 18px; }
    .fo-search__box { flex-wrap: wrap; border-radius: 8px; padding: 6px 10px; }
    .fo-search__box .fo-icon { display: none; }
    .fo .fo-search__box .fo-pill { width: 100%; }
    .fo-cards { grid-template-columns: minmax(0, 1fr); }
    .fo-card { padding: 22px 20px; }
    .fo-pager { flex-direction: column; }
    .fo-pager a { max-width: 100%; }
    .fo-contacts--5 { grid-template-columns: minmax(0, 1fr); }
    .fo-helpdesk { padding: 50px 0; }
}

/* ------------------------------------------------------------------ impression : tout le Focus */
@media print {
    header.header, footer, .footer, .fo-searchpanel, .fo-aside, .fo-back, .fo-pager,
    .fo-results, .fo-top, .fo-cards, .fo-annexes { display: none !important; }
    .fo-header { background: none !important; padding: 0 !important; }
    .fo-workspace { display: block; padding: 0; }
    .fo-overview { display: block !important; }
    .fo.is-js .fo-chapter, .fo-chapter { display: block !important; break-before: page; }
    .fo-org, .fo-contact, .fo-callout { break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
    .fo-helpdesk { background: none; padding: 30px 0 0; }
    .fo-text a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; color: #555; }
}
