/* Page article : le texte, l'en-tête, l'astuce et la FAQ. Le reste vient d'accueil.css et d'articles.css. */

/* En-tête, en tête de la colonne de l'article : le titre, puis le résumé à gauche et la vidéo éventuelle à droite (cadre « video-embed-wrapper » de framework.css) */
.hm-head { display: grid; gap: 0.8rem; }
.hm-head .hm-title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.hm-head__row { display: grid; gap: 0.8rem; }
.hm-head__txt { display: grid; gap: 0.6rem; align-content: start; min-width: 0; }
.hm-lead { font-size: 1.05rem; line-height: 1.6; max-width: 46rem; }
.hm-head .scroll-handwriting { grid-area: auto; justify-content: flex-end; } /* « Le résumé de l'article » à droite, vers la vidéo */
.hm-head .video-embed-wrapper { align-self: start; }
/* Vidéo flottante à droite, sur ordinateur comme sur mobile : le résumé l'entoure, aligné à gauche.
   Format des Shorts (9:16) à une taille fixe : plus de bandes noires sur les côtés. */
.hm-head__row--video { display: block; }
.hm-head__row--video .video-embed-wrapper { float: right; width: 7.5rem; aspect-ratio: 9 / 16; margin: 0.2rem 0 0.5rem 1rem; }
.hm-head__row--video .hm-head__txt { display: block; }
.hm-head__row--video .hm-head__txt > * + * { margin-top: 0.6rem; }
@media (min-width: 640px) { .hm-head__row--video .video-embed-wrapper { width: 10rem; margin-left: 1.5rem; } }

/* Texte de l'article */
.hm-prose { font-size: 1.06rem; line-height: 1.75; color: var(--hm-text); }
.hm-prose > * + * { margin-top: 1.1rem; }
/* Le reset « .hm p { margin: 0 } » passait devant la règle ci-dessus et collait les paragraphes et les listes entre eux ; les titres gardent leurs propres espacements */
.hm .hm-prose > :not(h2):not(h3) + :is(p, ul, ol) { margin-top: 1.1rem; }
.hm-prose > :first-child { margin-top: 0; }
.hm-prose h2 { display: flex; align-items: center; gap: 1rem; margin-top: 2.6rem; font: 800 1.3rem/1.15 var(--hm-head); text-transform: uppercase; letter-spacing: -0.02em; color: var(--hm-navy); }
.hm-prose h2::after { content: ""; flex: 1; min-width: 1.5rem; border-top: 3px dashed var(--hm-orange-dark); }
.hm-prose h3 { margin-top: 1.9rem; font: 800 1.08rem/1.25 var(--hm-head); color: var(--hm-navy); }
.hm-prose h2 + *, .hm-prose h3 + * { margin-top: 0.8rem; }
.hm-prose a { color: var(--hm-navy); font-weight: 700; text-decoration: underline; text-decoration-color: var(--hm-orange-dark); text-underline-offset: 3px; }
.hm-prose a:hover { color: var(--hm-orange-dark); }
.hm-prose strong { color: var(--hm-navy); }
.hm-prose ul, .hm-prose ol { display: grid; gap: 0.5rem; padding-left: 1.4rem; list-style: none; counter-reset: li; }
.hm-prose li { position: relative; }
.hm-prose ul > li::before { content: ""; position: absolute; left: -1.1rem; top: 0.72em; width: 0.45rem; height: 0.45rem; background: var(--hm-orange-dark); border-radius: 2px; }
.hm-prose ol > li { counter-increment: li; }
.hm-prose ol > li::before { content: counter(li); position: absolute; left: -1.7rem; top: 0.15em; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--hm-orange-dark); color: #fff; font: 800 0.72rem/1.4rem var(--hm-head); text-align: center; }
.hm-prose p > img { float: right; width: 8.5rem; height: auto; margin: 0.2rem 0 0.6rem 1.2rem; }
@media (max-width: 520px) { .hm-prose p > img { width: 5.5rem; } }
.hm-prose img { max-width: 100%; height: auto; border-radius: 8px; }
.hm-prose blockquote { padding: 0.75rem 1.1rem; background: rgba(233, 213, 255, 0.6); border: 0; border-radius: 10px; color: var(--hm-navy); white-space: normal; } /* citation : violet très clair du reste du site (celui du logo) à 60 %, sans bordure ; white-space normal : l'ancien style gardait les retours à la ligne du HTML, d'où un grand vide en haut et en bas */
.hm-prose hr { display: none; } /* les séparateurs « --- » du texte ajoutaient 57 px de vide au-dessus du livre blanc */
.hm-prose blockquote p { margin: 0; }
.hm-prose h2, .hm-prose h3 { clear: both; }

/* Tableaux : pointillés marine, défilement horizontal sur petit écran */
/* Tableaux : même dessin partout (aperçu du tableau de recherche compris) */
.hm-table { overflow-x: auto; border: 2px solid var(--hm-line); border-radius: 12px; background: #fff; }
.hm-table table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 0.88rem; line-height: 1.5; }
.hm-table th, .hm-table td { padding: 0.7rem 0.9rem; text-align: left; vertical-align: top; border: 0; border-top: 1px dashed #CBD5E1; }
.hm-table th { background: #F1F5F9; border-top: 0; font: 800 0.68rem var(--hm-head); text-transform: uppercase; letter-spacing: 0.08em; color: var(--hm-navy); }
.hm-table td:first-child { font-weight: 700; color: var(--hm-navy); }

/* Astuce : ma photo à gauche, comme si c'était moi qui parlais */
.hm-tip { flex-direction: row; align-items: flex-start; gap: 1rem; }
.hm-tip > img { flex: none; width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--hm-violet); }
.hm-tip > div { display: grid; gap: 0.3rem; min-width: 0; }
.hm-tip p { font-size: 1rem; line-height: 1.65; color: var(--hm-navy); }
@media (max-width: 520px) { .hm-tip > img { width: 3.4rem; height: 3.4rem; } }

/* FAQ */
.hm-faq { display: grid; gap: 0.7rem; }
.hm-faq details { background: #fff; border: 2px solid var(--hm-line); border-radius: 12px; } /* même épaisseur ouvert ou fermé : rien ne bouge */
.hm-faq details[open] { border-color: var(--hm-navy); }
.hm-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.1rem; cursor: pointer; list-style: none; font: 800 0.95rem/1.3 var(--hm-head); color: var(--hm-navy); }
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::after { content: "+"; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--hm-orange-light); color: var(--hm-orange-dark); text-align: center; font: 800 1.1rem/1.6rem var(--hm-head); }
.hm-faq details[open] summary::after { content: "−"; background: var(--hm-orange-dark); color: #fff; }
.hm-faq details > div { padding: 0 1.1rem 1rem; font-size: 0.98rem; line-height: 1.65; }

/* Recherche et mots-clés en bas de page */
.hm-more { display: grid; gap: 0.9rem; }
.hm-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Deux colonnes : l'article à gauche, la barre latérale à droite (empilées sur petit écran) */
.hm-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
.hm-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.25rem; min-width: 0; }
.hm-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; align-content: start; min-width: 0; }
@media (min-width: 960px) {
  .hm-layout { grid-template-columns: minmax(0, 1fr) 19rem; gap: 2.5rem; }
  .hm-main { align-self: start; }
  .hm-side__dossier { position: sticky; top: 5.5rem; } /* seul le dossier suit le défilement */
}
/* Sans dossier, la recherche et le test gratuit suivent le défilement ensemble (si l'écran est assez haut pour les afficher en entier) */
@media (min-width: 960px) and (min-height: 720px) { .hm-side--solo { position: sticky; top: 5.5rem; align-self: start; } }
.hm-side__dossier h2 { font: 800 1.02rem/1.25 var(--hm-head); text-transform: none; letter-spacing: -0.01em; }
.hm-side__dossier h2 a { color: var(--hm-navy); }
.hm-side .hm-list a, .hm-side .hm-list__current { font-size: 0.8rem; }
.hm-side .hm-cat__head h2::after { min-width: 0.8rem; }
.hm-list--2 { display: grid; column-gap: 2rem; }
@media (min-width: 640px) { .hm-list--2 { grid-template-columns: 1fr 1fr; } }
/* Page en cours dans une liste du dossier : en orange, sans lien ni flèche */
.hm-list__current { display: block; padding: 0.55rem 0; border-bottom: 1px dashed #CBD5E1; font: 700 0.84rem/1.3 var(--hm-head); color: var(--hm-orange-dark); }

/* Bloc compact d'orientation des barres latérales */
.hm-sidetest { gap: 0.5rem; justify-items: start; }
.hm-sidetest .hm-tag { margin-top: 0.3rem; justify-self: start; align-self: flex-start; width: fit-content; background: #2B4168; color: #fff; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.68rem; line-height: 1; padding: 0.5rem 0.9rem; border-radius: 999px; }
.hm-sidetest h2 { font-size: 0.95rem; }
.hm-sidetest p { font-size: 0.85rem; }
.hm-sidetest .hm-btn { padding: 0.6rem 1rem; }
