/* ============================================
   Articles Display Cards — Page détail (3 colonnes)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700;800;900&family=Crimson+Pro:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

.ads-detail,
.ads-reader-body {
    --adsd-ink:      #111111;
    --adsd-text:     #2a2a2a;
    --adsd-muted:    #707070;
    --adsd-border:   #e3e3e3;
    --adsd-soft:     #f6f6f6;
    --adsd-red:      #d8141b;
    --adsd-dark:     #2b2e33;
    --adsd-sans:     'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
    --adsd-serif:    'Crimson Pro', Georgia, 'Times New Roman', serif;
}

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

/* ── Conteneur ── */
.ads-detail {
    background: #ffffff;
    color: var(--adsd-ink);
    font-family: var(--adsd-sans);
    padding: 0 0 40px;
}

/* Page entière autonome */
body.ads-detail-page {
    margin: 0;
    background: #ffffff;
}
body.ads-detail-page .ads-detail {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

.ads-detail a {
    text-decoration: none;
    box-shadow: none;
}

/* ── Barre retour ── */
.ads-detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--adsd-border);
}

.ads-detail-site {
    color: var(--adsd-ink) !important;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.01em;
    text-align: right;
}

.ads-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px 9px 12px;
    border: 1px solid var(--adsd-border);
    border-radius: 6px;
    background: #fff;
    color: var(--adsd-ink) !important;
    font-family: var(--adsd-sans);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    transition: background .2s ease, border-color .2s ease;
}
.ads-back:hover {
    background: var(--adsd-soft);
    border-color: #cfcfcf;
}

/* ── Grille 3 colonnes ── */
.ads-detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: stretch;
}

.ads-col { min-width: 0; }

.ads-panel {
    background: #fff;
    border: 1px solid var(--adsd-border);
    border-radius: 8px;
    overflow: hidden;
}

/* ── Colonne gauche : Articles publiés (hauteur = colonne centrale) ── */
.ads-col-left {
    position: relative;
    min-height: 420px;
}

.ads-col-left .ads-panel-published {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.ads-published-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 20px 16px;
    border-bottom: 1px solid var(--adsd-border);
    flex-shrink: 0;
}

.ads-detail .ads-published-title {
    margin: 0;
    padding: 0;
    font-family: var(--adsd-sans);
    font-size: 30px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--adsd-ink);
    text-transform: none;
}

.ads-count-badge {
    flex-shrink: 0;
    min-width: 42px;
    height: 42px;
    padding: 0 8px;
    border-radius: 21px;
    background: var(--adsd-red);
    color: #fff;
    font-family: var(--adsd-sans);
    font-size: 17px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ads-published-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cfcfcf transparent;
}
.ads-published-list::-webkit-scrollbar { width: 6px; }
.ads-published-list::-webkit-scrollbar-track { background: transparent; }
.ads-published-list::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 3px; }

.ads-published-item {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ads-published-item + .ads-published-item a {
    border-top: 1px solid #efefef;
}

.ads-published-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px 13px 17px;
    border-left: 3px solid transparent;
    color: var(--adsd-ink);
    transition: background .18s ease;
}
.ads-published-item a:hover { background: var(--adsd-soft); }
.ads-published-item.is-current a {
    background: var(--adsd-soft);
    border-left-color: var(--adsd-red);
}

.ads-published-thumb {
    width: 56px !important;
    height: 56px !important;
    max-width: none !important;
    border-radius: 50% !important;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--adsd-border);
    background: var(--adsd-soft);
    margin: 0 !important;
}

.ads-published-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ads-published-name {
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--adsd-ink);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ads-published-date {
    font-size: 13px;
    color: var(--adsd-muted);
    font-weight: 400;
}

/* ── Colonne centrale ── */
.ads-col-main {
    padding: 4px 6px 0;
}

.ads-article-head {
    display: flex;
    align-items: center;
    gap: 30px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--adsd-border);
}

.ads-article-photo {
    flex-shrink: 0;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--adsd-border);
    background: var(--adsd-soft);
}
.ads-article-photo img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    display: block;
    margin: 0 !important;
}

.ads-article-headtext { min-width: 0; flex: 1; }

.ads-detail .ads-article-title {
    margin: 0 0 12px;
    padding: 0;
    font-family: var(--adsd-sans);
    font-size: clamp(26px, 2.6vw, 38px);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: var(--adsd-ink);
    text-transform: none;
}

.ads-article-views {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 18px;
    font-size: 15.5px;
    color: var(--adsd-muted);
}
.ads-article-views svg { color: var(--adsd-muted); flex-shrink: 0; }
.ads-views-count {
    color: var(--adsd-red);
    font-weight: 800;
    font-size: 17px;
}

.ads-recent-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ads-recent-thumb,
.ads-recent-more {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ads-recent-thumb {
    display: block;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--adsd-border);
    transition: transform .18s ease, box-shadow .18s ease;
}
.ads-recent-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px #bdbdbd;
}
.ads-recent-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    display: block;
    margin: 0 !important;
    border-radius: 50%;
}

.ads-recent-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfcfcf;
    background: var(--adsd-soft);
    color: var(--adsd-ink) !important;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    padding-bottom: 3px;
    transition: background .18s ease;
}
.ads-recent-more:hover { background: #ececec; }
.ads-recent-more.is-all { font-size: 22px; }

.ads-recent-thumb[hidden],
.ads-recent-thumb.is-hidden { display: none; }

@keyframes ads-pop {
    from { opacity: 0; transform: scale(.6); }
    to   { opacity: 1; transform: scale(1); }
}
.ads-recent-thumb.is-new { animation: ads-pop .28s ease both; }

/* Méta (catégorie, date, auteur) */
.ads-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 22px 0 6px;
    font-family: var(--adsd-sans);
    font-size: 13.5px;
    color: var(--adsd-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ads-article-cat {
    color: var(--adsd-ink);
    font-weight: 700;
}
.ads-dot { color: #b5b5b5; }

/* Corps éditorial */
.ads-article-body {
    font-family: var(--adsd-serif);
    font-size: 20px;
    line-height: 1.62;
    color: var(--adsd-text);
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    font-kerning: normal;
}
.ads-article-body > * { max-width: 100%; }

.ads-article-body p {
    margin: 0 0 1.05em;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.ads-article-body h2,
.ads-article-body h3,
.ads-article-body h4 {
    font-family: var(--adsd-serif);
    font-weight: 700;
    color: var(--adsd-ink);
    line-height: 1.25;
    text-align: left;
    margin: 1.5em 0 .55em;
}
.ads-article-body h2 { font-size: 1.45em; }
.ads-article-body h3 { font-size: 1.25em; }
.ads-article-body h4 { font-size: 1.1em; }

.ads-article-body a {
    color: var(--adsd-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ads-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.ads-article-body figure,
.ads-article-body .wp-block-image {
    margin: 1.6em 0;
}
.ads-article-body figure img,
.ads-article-body p > img {
    display: block;
    width: 100%;
    height: auto;
}

.ads-article-body figcaption,
.ads-article-body .wp-caption-text {
    font-family: var(--adsd-sans);
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--adsd-muted);
    text-align: left;
    margin-top: 8px;
}

.ads-article-body .wp-caption { max-width: 100%; }

.ads-article-body blockquote {
    margin: 1.6em 0;
    padding: .2em 0 .2em 1.1em;
    border-left: 3px solid var(--adsd-ink);
    font-style: italic;
    color: var(--adsd-ink);
    text-align: left;
}

.ads-article-body ul,
.ads-article-body ol {
    margin: 0 0 1.05em 1.3em;
    text-align: left;
}

.ads-article-body iframe,
.ads-article-body video {
    max-width: 100%;
}

/* Actions bas de l'article */
.ads-article-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid var(--adsd-border);
}

.ads-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 22px;
    border-radius: 6px;
    font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .2s ease, border-color .2s ease;
}

.ads-btn-dark {
    background: #2b2e33;
    border: 1px solid #2b2e33;
    color: #fff !important;
}
.ads-btn-dark:hover { background: #111; border-color: #111; }

.ads-btn-ghost {
    background: #fff;
    border: 1px solid #e3e3e3;
    color: #111 !important;
}
.ads-btn-ghost:hover { background: #f6f6f6; border-color: #cfcfcf; }

/* ── Colonne droite : Les articles à suivre ── */
.ads-col-right {
    position: relative;
    min-height: 420px;
}

/* Hauteur = colonne centrale, liste défilante */
.ads-col-right .ads-panel-follow {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.ads-detail .ads-follow-head {
    flex-shrink: 0;
    margin: 0;
    padding: 18px 20px;
    background: var(--adsd-dark);
    color: #fff;
    font-family: var(--adsd-sans);
    font-size: 21px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
}

.ads-follow-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cfcfcf transparent;
}
.ads-follow-list::-webkit-scrollbar { width: 6px; }
.ads-follow-list::-webkit-scrollbar-track { background: transparent; }
.ads-follow-list::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 3px; }

.ads-follow-item {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ads-follow-item + .ads-follow-item a { border-top: 1px solid #efefef; }

.ads-follow-item a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 20px;
    color: var(--adsd-ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.32;
    transition: background .18s ease;
}
.ads-follow-item a:hover { background: var(--adsd-soft); }
.ads-follow-item a:hover span { text-decoration: underline; text-underline-offset: 3px; }

.ads-check {
    flex-shrink: 0;
    color: var(--adsd-ink);
    margin-top: 1px;
}

.ads-follow-empty {
    margin: 0;
    padding: 18px 20px;
    color: var(--adsd-muted);
    font-size: 15px;
}

/* Focus visible */
.ads-detail a:focus-visible,
.ads-btn:focus-visible {
    outline: 2px solid var(--adsd-ink);
    outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 1240px) {
    .ads-detail-grid { grid-template-columns: 260px minmax(0, 1fr) 270px; gap: 22px; }
    .ads-article-photo { width: 170px; height: 170px; }
    .ads-detail .ads-published-title { font-size: 26px; }
}

@media (max-width: 1000px) {
    .ads-detail-grid { grid-template-columns: minmax(0, 1fr); }
    .ads-col-main  { order: 1; padding: 0; }
    .ads-col-right { order: 2; }
    .ads-col-left  { order: 3; min-height: 0; }
    .ads-col-left .ads-panel-published { position: static; }
    .ads-published-list { max-height: 460px; }
    .ads-col-right { min-height: 0; }
    .ads-col-right .ads-panel-follow { position: static; }
    .ads-follow-list { max-height: 460px; }
}

@media (max-width: 640px) {
    body.ads-detail-page .ads-detail { padding: 0 16px 40px; }
    .ads-detail-site { font-size: 15px; }
    .ads-article-head { flex-direction: column; align-items: flex-start; gap: 18px; }
    .ads-article-photo { width: 150px; height: 150px; }
    .ads-recent-thumb, .ads-recent-more { width: 46px; height: 46px; }
    .ads-article-body { font-size: 18.5px; text-align: left; }
    .ads-article-actions { flex-direction: column-reverse; align-items: stretch; }
    .ads-article-actions .ads-btn { justify-content: center; }
}

/* ============================================
   Lecteur « Élargir la page » (nouvel onglet)
   ============================================ */
.ads-reader-body {
    margin: 0;
    background: #fff;
    color: var(--adsd-ink);
    font-family: var(--adsd-sans);
}

.ads-reader-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid var(--adsd-border);
}

.ads-reader-site {
    color: var(--adsd-ink);
    font-weight: 900;
    font-size: 18px;
    text-decoration: none;
}

.ads-reader-tools { display: flex; gap: 10px; }
.ads-reader-tools .ads-btn { padding: 9px 16px; font-size: 14px; }

.ads-reader {
    max-width: 820px;
    margin: 0 auto;
    padding: 36px 24px 80px;
}

.ads-reader .ads-article-meta { margin-top: 0; }

.ads-reader-title {
    margin: 10px 0 26px;
    font-family: var(--adsd-sans);
    font-size: clamp(30px, 4.4vw, 48px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.ads-reader-hero {
    margin: 0 0 30px;
}
.ads-reader-hero img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.ads-reader .ads-article-body { font-size: 21px; }

@media (max-width: 640px) {
    .ads-reader-bar { padding: 10px 14px; }
    .ads-reader { padding: 24px 16px 60px; }
    .ads-reader .ads-article-body { font-size: 18.5px; text-align: left; }
}

@media print {
    .ads-reader-bar { display: none; }
    .ads-reader { padding: 0; max-width: none; }
}

/* ── Page détail avec l'en-tête du site ── */
.ads-detail-shell {
    width: 100%;
    background: #ffffff;
    padding-top: 8px;
}
body.ads-detail-page--with-header .ads-detail-topbar {
    padding-top: 20px;
}

/* ── Bas de page : Articles à savoir (recommandations personnalisées) ── */
.ads-know {
    margin-top: 48px;
    padding-top: 30px;
    border-top: 1px solid var(--adsd-border);
}

.ads-know-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 24px;
    margin-bottom: 22px;
}

.ads-detail .ads-know-title {
    margin: 0;
    padding: 0;
    font-family: var(--adsd-sans);
    font-size: 30px;
    font-weight: 900;
    line-height: 1.1;
    color: var(--adsd-ink);
    text-transform: none;
}

.ads-know-sub {
    margin: 0;
    color: var(--adsd-muted);
    font-size: 15px;
}

.ads-know-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.ads-know-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--adsd-border);
    border-radius: 8px;
    background: #fff;
    color: var(--adsd-ink) !important;
    transition: border-color .18s ease, background .18s ease;
}
.ads-know-card:hover {
    border-color: #c9c9c9;
    background: var(--adsd-soft);
}
.ads-know-card:hover .ads-know-name {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ads-know-img {
    flex-shrink: 0;
    width: 112px;
    height: 84px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--adsd-soft);
}
.ads-know-img img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    display: block;
    margin: 0 !important;
}

.ads-know-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.ads-know-reason {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--adsd-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ads-know-name {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.28;
    color: var(--adsd-ink);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ads-know-meta {
    font-size: 13px;
    color: var(--adsd-muted);
}

.ads-know-card[hidden],
.ads-know-card.is-hidden { display: none; }
.ads-know-card.is-new { animation: ads-fade-up .3s ease both; }
@keyframes ads-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.ads-know-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 26px;
}
.ads-know-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 26px;
    border-radius: 6px;
    background: var(--adsd-dark);
    border: 1px solid var(--adsd-dark);
    color: #fff !important;
    font-family: var(--adsd-sans);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    transition: background .2s ease;
}
.ads-know-more:hover { background: #111; }
.ads-know-more-count {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 12px;
    background: var(--adsd-red);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ads-know-more.is-all svg { transform: rotate(-90deg); }

@media (max-width: 1100px) {
    .ads-know-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .ads-know-grid { grid-template-columns: minmax(0, 1fr); }
    .ads-know-img { width: 92px; height: 72px; }
    .ads-detail .ads-know-title { font-size: 25px; }
}
