/* ==========================================================================
   Page article du site public
   Lecture guidee : contexte avant l'image, texte en colonne de lecture,
   partage colle a gauche, decouverte a droite, puis commentaires.
   ========================================================================== */

.art {
    --art-bleu: var(--app-them, #072890);
    --art-bleu-fonce: var(--app-primary-dark, #051c66);
    --art-rouge: var(--app-second-them, #e30613);
    --art-encre: #141c33;
    --art-texte: #1f2a44;
    --art-gris: #5b6478;
    --art-filet: #dfe3ec;
    --art-filet-clair: #eceef4;
    --art-fond: #f4f5fa;
    --art-bleu-pale: #eef2fc;

    background: #ffffff;
    color: var(--art-texte);
}

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

.art a:focus-visible,
.art button:focus-visible,
.art textarea:focus-visible,
.art input:focus-visible {
    outline: 3px solid var(--art-bleu);
    outline-offset: 2px;
}

/* Le theme du site impose une hauteur de ligne de 56px aux titres */
.art h1,
.art h2,
.art h3 {
    line-height: 1.25;
    letter-spacing: normal;
}

/* ─── Boutons ─────────────────────────────────────────────────────────────── */
.art-bouton,
.art-bouton-contour {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.art-bouton {
    border: 0;
    background: var(--art-bleu);
    color: #ffffff;
}

.art-bouton:hover,
.art-bouton:focus {
    background: var(--art-bleu-fonce);
    color: #ffffff;
    text-decoration: none;
}

.art-bouton:disabled {
    opacity: .6;
    cursor: default;
}

.art-bouton--rouge {
    background: var(--art-rouge);
}

.art-bouton--rouge:hover,
.art-bouton--rouge:focus {
    background: #b8050f;
}

.art-bouton-contour {
    border: 1px solid var(--art-filet);
    background: #ffffff;
    color: var(--art-bleu);
}

.art-bouton-contour:hover,
.art-bouton-contour:focus {
    border-color: var(--art-bleu);
    color: var(--art-bleu);
    text-decoration: none;
}

/* Rond de partage */
.art-rond {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--art-filet);
    border-radius: 50%;
    background: #ffffff;
    color: var(--art-bleu);
    font-size: 17px;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.art-rond:hover,
.art-rond:focus {
    border-color: var(--art-bleu);
    background: var(--art-bleu);
    color: #ffffff;
    text-decoration: none;
}

/* L'assistant de lecture se distingue des boutons de partage */
.art-rond--ia {
    border-color: var(--art-bleu);
    background: var(--art-bleu);
    color: #ffffff;
}

.art-rond--ia:hover,
.art-rond--ia:focus {
    background: var(--art-bleu-fonce);
}

.art-rond.copie {
    border-color: #1d7a46;
    background: #1d7a46;
    color: #ffffff;
}

/* Pastille d'initiales */
.art-pastille {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--art-bleu);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.art-pastille--grande {
    width: 56px;
    height: 56px;
    font-size: 18px;
}

.art-pastille--claire {
    background: #e8edfa;
    color: var(--art-bleu);
}

/* ─── Progression de lecture ──────────────────────────────────────────────── */
.art-progression {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    height: 4px;
    background: transparent;
    pointer-events: none;
}

.art-progression span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--art-rouge);
}

/* ─── En-tete ─────────────────────────────────────────────────────────────── */
/* Meme largeur que l'image : le titre et l'image partent du meme bord */
.art-entete {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 24px 28px;
}

.art-ariane {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--art-gris);
}

.art-ariane a {
    color: var(--art-gris);
    text-decoration: none;
}

.art-ariane a:hover {
    color: var(--art-bleu);
    text-decoration: underline;
}

.art-ariane .art-ariane-rubrique {
    color: var(--art-bleu);
    font-weight: 500;
}

.art-titre {
    max-width: 860px;
    margin: 0;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2 !important;
    letter-spacing: -.01em !important;
    color: var(--art-encre);
}

.art-chapo {
    max-width: 700px;
    margin: 0;
    font-size: 19px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--art-gris);
}

.art-signature {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
    padding-top: 6px;
}

.art-signature-texte {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.art-auteur {
    font-size: 15px;
    font-weight: 500;
    color: var(--art-encre);
}

.art-meta {
    font-size: 13px;
    color: var(--art-gris);
}

.art-signature .art-bouton-contour {
    margin-left: auto;
    min-height: 44px;
    border-radius: 22px;
    font-size: 14px;
}

/* ─── Image a la une ──────────────────────────────────────────────────────── */
.art-image {
    /* Largeur de la grille du dessous : image et rail partent du meme bord */
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.art-image img {
    display: block;
    width: 100%;
    height: clamp(220px, 34vw, 420px);
    object-fit: cover;
    border-radius: 20px;
    background: var(--art-fond);
}

/* ─── Grille : partage | texte | decouverte ───────────────────────────────── */
.art-grille {
    display: grid;
    grid-template-columns: 56px minmax(0, 680px) 300px;
    justify-content: center;
    align-items: start;
    gap: 48px;
    max-width: 1220px;
    margin: 0 auto;
    padding: 48px 24px 0;
}

.art-rail {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.art-rail-titre {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--art-gris);
}

.art-colonne {
    grid-column: 2;
    min-width: 0;
}

/* Article sans rail (reserve aux abonnes) : le texte garde sa colonne */
.art-cote {
    grid-column: 3;
    display: flex;
    flex-direction: column;
    gap: 36px;
    min-width: 0;
}

/* ─── Corps de l'article ──────────────────────────────────────────────────── */
/* Lecture reposante : lignes de 65 a 70 caracteres, interligne ample,
   gris adouci plutot que presque noir */
.art-corps {
    max-width: 640px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.85;
    letter-spacing: .005em;
    color: #3d4660;
    overflow-wrap: break-word;
}

.art-corps > :first-child {
    margin-top: 0;
}

.art-corps p {
    margin: 0 0 30px;
}

.art-corps h2,
.art-corps h3,
.art-corps h4 {
    margin: 56px 0 18px;
    font-weight: 700;
    color: var(--art-encre);
}

.art-corps h2 {
    font-size: 22px;
}

.art-corps h3 {
    font-size: 19px;
}

.art-corps h4 {
    font-size: 17px;
}

.art-corps a {
    color: var(--art-bleu);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.art-corps strong,
.art-corps b {
    font-weight: 500;
    color: var(--art-encre);
}

.art-corps ul,
.art-corps ol {
    margin: 0 0 24px;
    padding-left: 1.4em;
}

.art-corps li {
    margin-bottom: 8px;
}

.art-corps ol {
    list-style: decimal;
}

/* Etapes reconnues par la mise en forme : pastilles, une par ligne */
.art-corps ol.art-etapes {
    list-style: none;
    padding-left: 0;
    counter-reset: etape;
    font-size: 16px;
    line-height: 1.5;
}

.art-corps ol.art-etapes > li {
    counter-increment: etape;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--art-filet-clair);
}

.art-corps ol.art-etapes > li:last-child {
    border-bottom: 0;
}

.art-corps ol.art-etapes > li::before {
    content: counter(etape);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8edfa;
    color: var(--art-bleu);
    font-size: 14px;
    font-weight: 700;
}

.art-corps blockquote {
    margin: 32px 0;
    padding: 20px 24px;
    border-radius: 16px;
    background: var(--art-bleu-pale);
    font-style: italic;
    color: var(--art-encre);
}

.art-corps blockquote p:last-child {
    margin-bottom: 0;
}

.art-corps img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 32px auto;
    border-radius: 14px;
}

.art-corps figure {
    margin: 32px 0;
}

.art-corps figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--art-gris);
}

.art-tableau {
    margin: 32px 0;
    overflow-x: auto;
}

.art-corps table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.5;
}

.art-corps th,
.art-corps td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--art-filet);
    text-align: left;
}

.art-corps th {
    background: var(--art-fond);
    font-weight: 700;
    color: var(--art-encre);
}

.art-corps hr {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid var(--art-filet);
}

.art-corps iframe,
.art-corps video {
    max-width: 100%;
    border-radius: 14px;
}

/* Article reserve aux abonnes : le debut seulement, qui s'efface */
.art-corps-cadre--verrou {
    position: relative;
    max-height: 420px;
    overflow: hidden;
}

.art-corps-cadre--verrou::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 200px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff);
}

.art-verrou {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 32px 24px;
    border: 1px solid var(--art-filet);
    border-radius: 20px;
    text-align: center;
}

.art-verrou > i {
    font-size: 28px;
    color: var(--art-bleu);
}

.art-verrou h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--art-encre);
}

.art-verrou p {
    margin: 0;
    max-width: 460px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--art-gris);
}

.art-verrou-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

/* ─── Mots-cles et partage de fin ─────────────────────────────────────────── */
.art-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.art-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 18px;
    background: #f0f1f5;
    color: #4a5263;
    font-size: 14px;
    text-decoration: none;
}

.art-tags a:hover {
    background: var(--art-bleu-pale);
    color: var(--art-bleu);
}

.art-partage-bas {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--art-filet-clair);
}

.art-partage-bas > span {
    margin-right: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--art-encre);
}

/* ─── Encart conseiller ───────────────────────────────────────────────────── */
.art-conseil {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding: 28px;
    border-radius: 20px;
    background: var(--art-bleu);
    color: #ffffff;
}

.art-conseil > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 420px;
}

.art-conseil h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 500;
    color: #ffffff;
}

.art-conseil p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #d6def7;
}

/* ─── Carte auteur ────────────────────────────────────────────────────────── */
.art-carte-auteur {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 24px 0;
    border-top: 1px solid var(--art-filet-clair);
    border-bottom: 1px solid var(--art-filet-clair);
}

.art-carte-auteur > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.art-carte-auteur-label {
    font-size: 13px;
    color: var(--art-gris);
}

.art-carte-auteur strong {
    font-size: 16px;
    font-weight: 500;
    color: var(--art-encre);
}

/* ─── Commentaires ────────────────────────────────────────────────────────── */
.art-commentaires {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 40px 0 16px;
    scroll-margin-top: 24px;
}

.art-commentaires h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    color: var(--art-encre);
}

.art-compte {
    font-weight: 500;
    color: var(--art-gris);
}

.art-com-connexion {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border: 1px solid var(--art-filet);
    border-radius: 16px;
}

.art-com-connexion p {
    margin: 0;
    font-size: 15px;
    color: #4a5263;
}

.art-com-form {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.art-com-form[hidden],
.art-com-connexion[hidden],
.art-com-reponse[hidden],
.art-com-plus[hidden] {
    display: none;
}

.art-com-champ {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    min-width: 0;
}

.art-com-champ label {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--art-encre);
}

.art-com-champ textarea {
    width: 100%;
    min-height: 110px;
    padding: 14px 16px;
    border: 1px solid #c9cfdd;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    color: var(--art-texte);
    resize: vertical;
}

.art-com-champ textarea:focus {
    border-color: var(--art-bleu);
    box-shadow: 0 0 0 1px var(--art-bleu);
}

.art-com-reponse {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 6px 6px 14px;
    border-radius: 10px;
    background: var(--art-bleu-pale);
    font-size: 14px;
    color: var(--art-bleu);
}

.art-com-reponse button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--art-bleu);
    cursor: pointer;
}

.art-com-pied {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.art-com-pied > span {
    font-size: 13px;
    color: var(--art-gris);
}

.art-com-liste {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.art-com-vide {
    margin: 0;
    padding: 20px;
    border-radius: 16px;
    background: #f7f8fb;
    font-size: 15px;
    color: var(--art-gris);
    text-align: center;
}

.art-com {
    display: flex;
    gap: 12px;
    padding: 18px 20px;
    border-radius: 16px;
    background: #f7f8fb;
}

.art-com .art-pastille {
    width: 40px;
    height: 40px;
    font-size: 14px;
    background: var(--art-gris);
}

.art-com--auteur .art-pastille {
    background: var(--art-bleu);
}

.art-com-corps {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.art-com-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    font-size: 14px;
    color: var(--art-gris);
}

.art-com-meta strong {
    color: var(--art-encre);
}

.art-com-badge {
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--art-bleu);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
}

.art-com-modifie {
    font-style: italic;
}

.art-com-texte {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--art-texte);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.art-com-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-left: -10px;
}

.art-com-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--art-bleu);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
}

button.art-com-action {
    cursor: pointer;
}

button.art-com-action:hover {
    background: #e8edfa;
}

span.art-com-action {
    color: var(--art-gris);
    font-weight: 500;
}

.art-com-action.aime {
    color: var(--art-rouge);
}

.art-com-reponses {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-left: 52px;
}

.art-com-plus {
    display: flex;
    justify-content: center;
}

/* Message bref apres une action */
.art-toast {
    position: fixed;
    left: 50%;
    bottom: 96px;
    z-index: 10001;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--art-encre);
    color: #ffffff;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity .25s, transform .25s;
}

.art-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.art-toast.error {
    background: #9b0c14;
}

/* Confirmation de suppression */
.art-confirm {
    position: fixed;
    inset: 0;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 28, 51, .5);
    opacity: 0;
    transition: opacity .2s;
}

.art-confirm.visible {
    opacity: 1;
}

.art-confirm-boite {
    width: 100%;
    max-width: 380px;
    padding: 24px;
    border-radius: 18px;
    background: #ffffff;
}

.art-confirm-boite p {
    margin: 0 0 20px;
    font-size: 16px;
    color: var(--art-encre);
}

.art-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ─── Decouverte : les plus lus et categories ─────────────────────────────── */
.art-bloc {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.art-bloc[hidden],
.art-suite[hidden] {
    display: none;
}

/* Titre de bloc : texte sobre, souligne d'un trait court rouge */
.art-bloc-titre {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    font-size: 18px !important;
    font-weight: 700;
    letter-spacing: normal !important;
    color: var(--art-encre);
}

.art-bloc-titre::after {
    content: "";
    width: 32px;
    height: 3px;
    border-radius: 2px;
    background: var(--art-rouge);
}

.art-bloc {
    gap: 6px;
}

/* Les plus lus : lignes separees par des filets, texte a gauche, image carree a droite */
.art-plus-lus {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.art-plus-lus > li + li {
    border-top: 1px solid var(--art-filet-clair);
}

.art-plus-lu {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    color: var(--art-encre);
    text-decoration: none;
}

.art-plus-lu:hover,
.art-plus-lu:focus {
    color: var(--art-bleu);
    text-decoration: none;
}

.art-plus-lu img,
.art-vignette-vide {
    width: 84px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
}

.art-vignette-vide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--art-fond);
    color: var(--art-bleu);
    font-size: 22px;
}

.art-plus-lu-texte {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.art-plus-lu-texte .art-plus-lu-rubrique {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--art-bleu);
}

.art-plus-lu-texte strong {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--art-encre);
}

.art-plus-lu:hover .art-plus-lu-texte strong {
    color: var(--art-bleu);
}

.art-plus-lu-texte span {
    font-size: 12px;
    color: var(--art-gris);
}

/* Repli « Nos offres » : deux lignes de description sous le titre */
.art-plus-lu-texte .art-offre-resume {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
}

/* Categories : lignes a filets, chevron a droite, la courante en bleu gras */
.art-rubriques {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.art-rubriques > li + li {
    border-top: 1px solid var(--art-filet-clair);
}

.art-rubriques a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    color: var(--art-texte);
    font-size: 15px;
    text-decoration: none;
}

.art-rubriques a:hover,
.art-rubriques a:focus {
    color: var(--art-bleu);
    text-decoration: none;
}

.art-rubriques a.courante {
    color: var(--art-bleu);
    font-weight: 700;
}

.art-rubrique-fin {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    color: #9aa1b3;
    font-size: 12px;
}

.art-rubriques a:hover .art-rubrique-fin,
.art-rubriques a.courante .art-rubrique-fin {
    color: var(--art-bleu);
}

.art-rubrique-nb {
    font-size: 13px;
    font-weight: 700;
}

/* Nombre de vues sur les cartes d'articles */
.art-carte-vues {
    /* Le libelle cache reste dans la carte, meme dans une piste qui defile */
    position: relative;
    margin-left: 10px;
    white-space: nowrap;
}

.art-carte-vues i {
    margin-right: 3px;
}

/* ─── A lire aussi ────────────────────────────────────────────────────────── */
.art-suite {
    margin-top: 56px;
    padding: 64px 24px;
    background: var(--art-fond);
}

.art-suite-cadre {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 1120px;
    margin: 0 auto;
}

.art-suite-entete {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.art-suite-entete h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--art-encre);
}

.art-suite-entete a {
    font-size: 15px;
    font-weight: 700;
    color: var(--art-bleu);
    text-decoration: none;
}

.art-suite-entete a:hover {
    text-decoration: underline;
}

.art-suite-grille {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.art-carte {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    color: var(--art-encre);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(7, 40, 144, .06);
    transition: box-shadow .25s;
}

.art-carte:hover,
.art-carte:focus {
    color: var(--art-encre);
    text-decoration: none;
    box-shadow: 0 16px 36px rgba(7, 40, 144, .14);
}

.art-carte-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    overflow: hidden;
    background: #e8edfa;
    color: var(--art-bleu);
    font-size: 34px;
}

.art-carte-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.art-carte-corps {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 10px;
    padding: 20px 22px 24px;
}

.art-carte-meta {
    font-size: 13px;
    color: var(--art-gris);
}

.art-carte-meta strong {
    color: var(--art-bleu);
}

.art-carte-titre {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
}

/* ─── Page de liste : actualites, categorie, mot-cle ──────────────────────── */
.rub-entete {
    padding-bottom: 8px;
}

/* Mot-cle : bandeau clair sur toute la largeur */
.rub-bandeau {
    background: var(--art-bleu-pale);
}

.rub-bandeau-cadre {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 24px 28px;
}

.rub-bandeau-titre {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.rub-bandeau-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--art-bleu);
    color: #ffffff;
    font-size: 20px;
}

.rub-bandeau-texte {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rub-bandeau-texte > span {
    font-size: 13px;
    color: var(--art-gris);
}

.rub-bandeau-texte h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    color: var(--art-encre);
    overflow-wrap: anywhere;
}

.rub-bandeau-compte {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--art-filet);
    border-radius: 18px;
    background: #ffffff;
    font-size: 14px;
    color: var(--art-texte);
}

.rub-bandeau-compte:empty {
    display: none;
}

.rub-sujets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 4px 0 0;
    list-style: none;
}

.rub-sujets[hidden] {
    display: none;
}

.rub-sujets a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 18px;
    background: #ffffff;
    color: var(--art-bleu);
    font-size: 14px;
    text-decoration: none;
}

.rub-sujets a:hover,
.rub-sujets a:focus {
    background: var(--art-bleu);
    color: #ffffff;
    text-decoration: none;
}

/* Pied de carte : auteur a gauche, lien de lecture a droite */
.art-carte-pied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--art-filet-clair);
}

.art-carte-signature {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 13px;
    color: var(--art-gris);
}

.art-carte-signature .art-pastille {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

.rub-carte-lire {
    font-size: 14px;
    font-weight: 500;
    color: var(--art-bleu);
}

/* Dans la meme categorie, quand le mot-cle a peu d'articles */
.rub-memes {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 40px;
}

.rub-memes[hidden] {
    display: none;
}

.rub-memes h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: var(--art-encre);
}

.rub-memes-grille {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.rub-meme {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--art-encre);
    text-decoration: none;
}

.rub-meme:hover,
.rub-meme:focus {
    color: var(--art-bleu);
    text-decoration: none;
}

.rub-meme-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 130px;
    overflow: hidden;
    border-radius: 12px;
    background: #e8edfa;
    color: var(--art-bleu);
    font-size: 26px;
}

.rub-meme-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rub-meme-date {
    font-size: 12px;
    color: var(--art-gris);
}

.rub-meme-titre {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.art-grille--liste {
    grid-template-columns: minmax(0, 1fr) 300px;
    max-width: 1180px;
    padding-top: 24px;
    padding-bottom: 72px;
}

.art-grille--liste .art-colonne {
    grid-column: 1;
}

.art-grille--liste .art-cote {
    grid-column: 2;
}

.rub-liste {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.rub-liste[aria-busy="true"] {
    opacity: .5;
}

.rub-carte {
    border: 1px solid var(--art-filet-clair);
    box-shadow: none;
}

.rub-carte .art-carte-image {
    height: 200px;
}

.rub-carte-resume {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.55;
    color: var(--art-gris);
}

/* Le plus recent, en tete de la premiere page : image a gauche, texte a droite */
.rub-carte--une {
    grid-column: 1 / -1;
    flex-direction: row;
}

.rub-carte--une .art-carte-image {
    flex: 0 0 52%;
    height: auto;
    min-height: 300px;
}

.rub-carte--une .art-carte-corps {
    justify-content: center;
    gap: 12px;
    padding: 28px 32px;
}

/* Carte en tete : le pied suit le texte au lieu de tomber en bas */
.rub-carte--une .art-carte-pied {
    margin-top: 6px;
}

.rub-carte--une .art-carte-titre {
    font-size: 22px;
    line-height: 1.3;
}

.rub-carte--une .rub-carte-resume {
    -webkit-line-clamp: 3;
    font-size: 15px;
}

.rub-vide {
    margin: 0;
    padding: 32px 24px;
    border-radius: 16px;
    background: #f7f8fb;
    font-size: 15px;
    color: var(--art-gris);
    text-align: center;
}

.rub-vide[hidden],
.rub-pagination[hidden] {
    display: none;
}

.rub-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
}

.rub-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--art-filet);
    border-radius: 12px;
    background: #ffffff;
    color: var(--art-texte);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.rub-page:hover:not(:disabled):not(.active) {
    border-color: var(--art-bleu);
    color: var(--art-bleu);
}

.rub-page.active {
    border-color: var(--art-bleu);
    background: var(--art-bleu);
    color: #ffffff;
    cursor: default;
}

.rub-page:disabled {
    opacity: .4;
    cursor: default;
}

.rub-page-ecart {
    padding: 0 4px;
    color: var(--art-gris);
}

/* ─── Article introuvable ─────────────────────────────────────────────────── */
.art-introuvable {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 560px;
    margin: 0 auto;
    padding: 96px 24px;
    text-align: center;
}

.art-introuvable > i {
    font-size: 40px;
    color: var(--art-bleu);
}

.art-introuvable h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--art-encre);
}

.art-introuvable p {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--art-gris);
}

/* ─── Barre d'actions du telephone ────────────────────────────────────────── */
.art-barre {
    display: none;
}

/* ─── Assistant de lecture ────────────────────────────────────────────────── */
.ai-chat-panel {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10003;
    display: flex;
    flex-direction: column;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 140px);
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(20, 28, 51, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .2s, transform .2s, visibility .2s;
}

.ai-chat-panel.open {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px 14px 18px;
    background: var(--app-them, #072890);
    color: #ffffff;
}

.ai-chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
}

.ai-chat-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
}

.ai-chat-close:hover {
    background: rgba(255, 255, 255, .15);
}

.ai-chat-messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    overflow-y: auto;
    background: #f7f8fb;
}

.ai-chat-msg {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.55;
}

.ai-chat-msg p {
    margin: 0 0 8px;
}

.ai-chat-msg p:last-child {
    margin-bottom: 0;
}

.ai-chat-msg ul {
    margin: 0 0 8px;
    padding-left: 18px;
}

.ai-chat-msg.user {
    align-self: flex-end;
    background: var(--app-them, #072890);
    color: #ffffff;
}

.ai-chat-msg.bot {
    align-self: flex-start;
    background: #ffffff;
    color: #1f2a44;
    box-shadow: 0 1px 2px rgba(20, 28, 51, .08);
}

.ai-chat-msg.error {
    align-self: flex-start;
    background: #fdecee;
    color: #9b0c14;
}

.ai-chat-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5b6478;
}

.ai-typing-dots {
    display: flex;
    gap: 4px;
}

.ai-typing-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5b6478;
    animation: art-points 1.2s infinite ease-in-out;
}

.ai-typing-dots i:nth-child(2) {
    animation-delay: .2s;
}

.ai-typing-dots i:nth-child(3) {
    animation-delay: .4s;
}

@keyframes art-points {
    0%, 80%, 100% { opacity: .3; }
    40% { opacity: 1; }
}

.ai-chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px 0;
}

.ai-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #dfe3ec;
    border-radius: 18px;
    background: #ffffff;
    color: var(--app-them, #072890);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.ai-quick-btn:hover:not(:disabled) {
    border-color: var(--app-them, #072890);
}

.ai-quick-btn:disabled {
    opacity: .5;
    cursor: default;
}

.ai-chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px;
}

.ai-chat-input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #c9cfdd;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
}

.ai-chat-input:focus {
    border-color: var(--app-them, #072890);
    box-shadow: 0 0 0 1px var(--app-them, #072890);
}

.ai-chat-send {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--app-them, #072890);
    color: #ffffff;
    cursor: pointer;
}

.ai-chat-send:disabled {
    opacity: .5;
}

@media (prefers-reduced-motion: reduce) {
    .art *,
    .ai-chat-panel {
        transition: none !important;
        animation: none !important;
    }
}

/* ─── Paliers ─────────────────────────────────────────────────────────────── */

/* Ecran moyen : le rail de partage laisse sa place, le partage passe en fin d'article */
@media (max-width: 1199px) {
    .art-entete {
        max-width: 1080px;
    }

    .art-image {
        max-width: 1080px;
    }

    .art-grille {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 40px;
        max-width: 1080px;
    }

    .art-rail {
        display: none;
    }

    .art-colonne {
        grid-column: 1;
    }

    .art-cote {
        grid-column: 2;
    }

    .art-partage-bas {
        display: flex;
    }

    .art-grille--liste {
        grid-template-columns: minmax(0, 1fr) 280px;
        max-width: 1080px;
    }
}

/* Tablette : une seule colonne, la decouverte passe apres les commentaires */
@media (max-width: 991px) {
    .art-entete {
        max-width: 760px;
    }

    .art-grille {
        grid-template-columns: minmax(0, 1fr);
        max-width: 760px;
        gap: 8px;
    }

    .art-image {
        max-width: 760px;
    }

    .art-colonne,
    .art-cote,
    .art-grille--liste .art-colonne,
    .art-grille--liste .art-cote {
        grid-column: 1;
    }

    .art-grille--liste {
        grid-template-columns: minmax(0, 1fr);
        max-width: 760px;
    }

    .art-grille--liste .art-cote {
        padding-top: 48px;
    }

    .art-cote {
        gap: 32px;
        padding-top: 24px;
    }

    .art-plus-lus {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 24px;
    }

    .art-plus-lus > li + li {
        border-top: 0;
    }

    .art-plus-lus > li {
        border-bottom: 1px solid var(--art-filet-clair);
    }

    /* Categories en pastilles */
    .art-rubriques {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .art-rubriques > li + li {
        border-top: 0;
    }

    .art-rubriques a {
        justify-content: flex-start;
        gap: 8px;
        min-height: 44px;
        padding: 0 14px;
        border: 1px solid var(--art-filet);
        border-radius: 22px;
        font-size: 14px;
        font-weight: 400;
    }

    .art-rubriques a.courante {
        font-weight: 500;
    }

    .art-rubrique-fin i {
        display: none;
    }

    .art-rubriques a.courante .art-rubrique-fin {
        color: #ffffff;
    }

    .art-rubriques a.courante {
        border-color: var(--art-bleu);
        background: var(--art-bleu);
        color: #ffffff;
    }

    .art-rubriques a.courante .art-rubrique-nb {
        color: #ffffff;
    }

    .art-rubrique-nb {
        font-weight: 700;
    }

    .art-suite-grille {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .art-suite-grille > :nth-child(3) {
        display: none;
    }
}

/* Telephone */
@media (max-width: 767px) {
    .art--barre {
        padding-bottom: 72px;
    }

    .art--barre .art-partage-bas {
        display: none;
    }

    .art-entete {
        gap: 12px;
        padding: 20px 16px 20px;
    }

    .art-titre {
        font-size: 27px;
        line-height: 1.22 !important;
    }

    .art-chapo {
        font-size: 16px;
    }

    .art-signature .art-bouton-contour {
        display: none;
    }

    .art-image {
        padding: 0;
    }

    .art-image img {
        height: 230px;
        border-radius: 0;
    }

    .art-grille {
        padding: 24px 16px 0;
    }

    .art-corps {
        font-size: 17px;
        line-height: 1.8;
    }

    .art-corps p {
        margin-bottom: 24px;
    }

    .art-corps h2 {
        margin: 30px 0 10px;
        font-size: 20px;
    }

    .art-corps ol.art-etapes {
        font-size: 16px;
    }

    .art-corps ol.art-etapes > li {
        gap: 12px;
        padding: 10px 0;
    }

    .art-corps ol.art-etapes > li::before {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .art-conseil {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

    .art-conseil h2 {
        font-size: 18px;
    }

    .art-conseil .art-bouton {
        min-height: 48px;
    }

    .art-commentaires {
        padding-top: 32px;
    }

    .art-commentaires h2 {
        font-size: 21px;
    }

    .art-com-form > .art-pastille {
        display: none;
    }

    .art-com-pied .art-bouton {
        width: 100%;
        min-height: 48px;
    }

    .art-com {
        padding: 14px 16px;
    }

    .art-com-reponses {
        margin-left: 20px;
    }

    .art-plus-lus {
        grid-template-columns: minmax(0, 1fr);
    }

    .art-suite {
        margin-top: 32px;
        padding: 32px 0 36px;
    }

    .art-suite-entete {
        padding: 0 16px;
    }

    .art-suite-entete h2 {
        font-size: 22px;
    }

    /* Les cartes defilent sur le cote plutot que de s'empiler */
    .art-suite-grille {
        display: flex;
        gap: 14px;
        padding: 0 16px 4px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .art-suite-grille::-webkit-scrollbar {
        display: none;
    }

    .art-suite-grille > .art-carte,
    .art-suite-grille > :nth-child(3) {
        display: flex;
        flex: 0 0 min(280px, 78vw);
        scroll-snap-align: start;
    }

    .art-carte-image {
        height: 140px;
    }

    .art-carte-corps {
        padding: 14px 16px 18px;
    }

    .art-carte-titre {
        font-size: 16px;
    }

    .art-barre {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--art-filet);
        background: #ffffff;
    }

    .art-barre-bouton {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 52px;
        padding: 4px 2px;
        border: 0;
        border-radius: 12px;
        background: #f0f2f8;
        color: var(--art-bleu);
        font-family: inherit;
        font-size: 12px;
        line-height: 1.1;
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
    }

    .art-barre-bouton:hover,
    .art-barre-bouton:focus {
        color: var(--art-bleu);
        text-decoration: none;
    }

    .art-barre-bouton.copie {
        background: #1d7a46;
        color: #ffffff;
    }

    .art-barre-bouton i {
        font-size: 17px;
    }

    .ai-chat-panel {
        left: 8px;
        right: 8px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
        height: auto;
        max-height: calc(100vh - 120px);
        min-height: 360px;
    }

    .art-toast {
        bottom: 90px;
    }

    /* Boutons flottants du site : la barre d'actions a deja « Haut »,
       et l'assistant du site remonte au-dessus de la barre */
    body.art-page #backToTop {
        display: none !important;
    }

    body.art-page .fcb-trigger {
        bottom: calc(80px + env(safe-area-inset-bottom)) !important;
    }

    .rub-liste {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .rub-carte--une {
        flex-direction: column;
    }

    .rub-carte--une .art-carte-image {
        flex: none;
        min-height: 0;
        height: 200px;
    }

    .rub-carte--une .art-carte-corps {
        padding: 16px 18px 20px;
    }

    .rub-carte--une .art-carte-titre {
        font-size: 19px;
    }

    .rub-carte .art-carte-image {
        height: 180px;
    }

    .rub-bandeau-cadre {
        gap: 14px;
        padding: 20px 16px 22px;
    }

    .rub-bandeau-icone {
        width: 44px;
        height: 44px;
        font-size: 17px;
    }

    .rub-bandeau-texte h1 {
        font-size: 26px;
    }

    .rub-bandeau-compte {
        margin-left: 0;
    }

    /* Les sujets lies defilent sur une ligne */
    .rub-sujets {
        flex-wrap: nowrap;
        margin: 0 -16px;
        padding: 4px 16px 2px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .rub-sujets::-webkit-scrollbar {
        display: none;
    }

    .rub-sujets li {
        flex: none;
    }

    .rub-sujets a {
        min-height: 40px;
    }

    .rub-memes-grille {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .rub-meme {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        column-gap: 14px;
        row-gap: 4px;
    }

    .rub-meme-image {
        grid-row: 1 / 3;
        height: 84px;
    }

    .rub-meme-date {
        grid-column: 2;
        grid-row: 2;
    }

    .rub-meme-titre {
        grid-column: 2;
        grid-row: 1;
    }
}
