/* ====== Guide de Bubble Parts (faq.html) ====== */

.guide-hero { padding-block: clamp(36px, 6vw, 80px) clamp(24px, 4vw, 48px); }
.guide-hero h1 { max-width: 18ch; }
.guide-hero__intro { margin-top: 20px; font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); color: var(--texte-doux); }

/* --- Mise en page : sommaire collant + contenu --- */
.guide { display: grid; gap: 40px; padding-bottom: 40px; }
.guide > *, .anatomie > * { min-width: 0; } /* sinon la bulle (300px) élargit la colonne sur mobile */
.sommaire { padding: 18px 20px; background: #fff; border: 2px solid var(--ardoise); border-radius: var(--cadre-rayon); }
.sommaire__titre { font-weight: 700; margin-bottom: 8px; }
.sommaire ol { list-style: none; padding: 0; counter-reset: chapitre; display: grid; gap: 2px; }
.sommaire li { counter-increment: chapitre; }
.sommaire a {
    display: grid;
    grid-template-columns: 2rem 1fr;
    padding: 6px 0;
    color: var(--texte-doux);
    text-decoration: none;
    border-left: 2px solid transparent;
}
.sommaire a::before {
    content: counter(chapitre, decimal-leading-zero);
    font-size: 0.8125rem;
    padding-top: 3px;
    color: var(--bleu-600);
}
.sommaire a:hover { color: var(--bleu-950); }
.sommaire a[aria-current="true"] { color: var(--bleu-950); font-weight: 700; }
.sommaire a[aria-current="true"]::before { color: var(--violet-700); }

@media (min-width: 1000px) {
    .guide { grid-template-columns: 230px 1fr; gap: 64px; align-items: start; }
    .sommaire { position: sticky; top: calc(var(--en-tete) + 28px); }
}

/* --- Chapitres --- */
.chapitre { padding-block: 8px clamp(48px, 6vw, 72px); }
.chapitre + .chapitre { border-top: 1px solid var(--trait); padding-top: clamp(40px, 5vw, 56px); }
.chapitre > h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin-bottom: 16px; }
.chapitre > p { color: var(--texte-doux); }
.chapitre h3 { font-size: 1.2rem; margin-bottom: 6px; }
.chapitre p + p { margin-top: 10px; }
.chapitre kbd, .mot-cle {
    font-family: var(--mono);
    font-size: 0.875em;
    padding: 1px 6px;
    background: #fff;
    border: 1px solid var(--trait);
    border-radius: 4px;
    white-space: nowrap;
}

/* Prérequis */
.encadre {
    margin-top: 24px;
    padding: 20px 22px;
    background: #fff;
    border: 2px solid var(--ardoise);
    border-radius: var(--cadre-rayon);
    box-shadow: 6px 6px 0 var(--violet-500);
}
.encadre h3 { margin-bottom: 10px; }
.encadre ul { padding-left: 1.2em; display: grid; gap: 6px; }

/* Étapes numérotées (vraie séquence) */
.etapes-guide { list-style: none; padding: 0; counter-reset: etape; display: grid; margin-top: 24px; }
.etapes-guide li {
    counter-increment: etape;
    display: grid;
    grid-template-columns: 2.6rem 1fr;
    gap: 14px;
    padding: 16px 0;
    border-top: 1px solid var(--trait);
}
.etapes-guide li:last-child { border-bottom: 1px solid var(--trait); }
.etapes-guide li::before {
    content: counter(etape);
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    background: var(--bleu-100);
    color: var(--bleu-600);
    border-radius: 50%;
    background: #fff;
    font-weight: 600;
    font-size: 0.875rem;
}
.etapes-guide p { color: var(--texte-doux); }

/* Méthodes de recherche */
.methodes { display: grid; gap: 0; margin-top: 24px; }
.methodes > div { padding: 18px 0; border-top: 1px solid var(--trait); }
.methodes > div:last-child { border-bottom: 1px solid var(--trait); }
.methodes p { color: var(--texte-doux); }
@media (min-width: 760px) {
    .methodes > div { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
}

/* --- Anatomie d'une bulle --- */
.anatomie { display: grid; gap: 36px; margin-top: 28px; align-items: center; }
@media (min-width: 900px) {
    .anatomie { grid-template-columns: minmax(320px, 0.9fr) 1.1fr; gap: 48px; }
}
.anatomie__scene {
    display: grid;
    place-items: center;
    padding: 44px 40px;
    background: #fff;
    border: 2px solid var(--ardoise);
    border-radius: var(--cadre-rayon);
}
/* Bulle reconstituée à l'identique de l'extension */
.bulle-reelle {
    position: relative;
    width: 300px;
    max-width: 100%;
    padding: 16px 14px 14px;
    border-radius: 20px;
    background: radial-gradient(circle at bottom right, rgba(82, 123, 204, 0.9), #fff);
    box-shadow: -3px 4px 8px rgba(0, 0, 0, 0.7);
    font-family: Verdana, 'Segoe UI', sans-serif;
    font-size: 11px;
    line-height: 15px;
    text-align: center;
    color: #000;
}
.bulle-reelle__punaise { position: absolute; left: -14px; top: -16px; width: 34px; height: 34px; }
.bulle-reelle__croix { position: absolute; right: 14px; top: 8px; font: bold 14px Verdana, sans-serif; }
.bulle-reelle__titre {
    margin: 6px auto 12px;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(74, 74, 74, 0.45);
}
.bulle-reelle__lignes { list-style: none; padding: 0; display: grid; gap: 7px; }
.bulle-reelle__lignes li { display: flex; align-items: center; justify-content: center; gap: 5px; }
.bulle-reelle__ref {
    padding: 3px 10px;
    border-radius: 10px;
    background: #f0f0f0;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    font-weight: bold;
    white-space: nowrap;
}
.bulle-reelle__ref--cherchee { background: #d6f5d0; }
.bulle-reelle__ref--vide { color: #888; }
.bulle-reelle__lignes img { width: 18px; height: 18px; }
.bulle-reelle__pied { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.bulle-reelle__pied img:first-child { width: 48px; height: auto; }
.bulle-reelle__pied img:last-child { width: 60px; height: auto; }

/* Repères posés sur la bulle */
.pastille {
    position: absolute;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--violet-500);
    color: #fff;
    font: 700 11px var(--police);
    box-shadow: 0 0 0 2px #fff;
    z-index: 2;
}
.legende-bulle { list-style: none; padding: 0; display: grid; gap: 10px; }
.legende-bulle li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; }
.legende-bulle .pastille { position: static; }
.legende-bulle strong { color: var(--bleu-950); }
.legende-bulle span:last-child { color: var(--texte-doux); }

/* --- Tableau des signaux --- */
.signaux { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 24px; background: #fff; border: 2px solid var(--ardoise); border-radius: var(--cadre-rayon); overflow: hidden; }
.signaux th, .signaux td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--trait); }
.signaux thead th { background: var(--bleu-100); font-size: 0.9375rem; border-bottom: 1px solid var(--trait); }
.signaux td:first-child { width: 34%; font-weight: 600; }
.signaux td:last-child { color: var(--texte-doux); }
.echantillon {
    display: inline-block;
    width: 26px;
    height: 16px;
    margin-right: 8px;
    vertical-align: -3px;
    border-radius: 6px;
    box-shadow: -1px 2px 3px rgba(0, 0, 0, 0.4);
}
.echantillon--bleu { background: radial-gradient(circle at bottom right, rgba(82, 123, 204, 0.9), #fff); }
.echantillon--orange { background: radial-gradient(circle at bottom right, rgba(255, 165, 81, 0.95), #fff); }
.echantillon--violet { background: radial-gradient(circle at bottom right, rgba(164, 91, 227, 0.9), #fff); }
@media (max-width: 639.98px) {
    .signaux, .signaux tbody { display: block; }
    .signaux thead { display: none; }
    .signaux tr { display: block; border-bottom: 1px solid var(--trait); }
    .signaux td { display: block; width: auto !important; border: 0; padding: 4px 14px; }
    .signaux td:first-child { padding-top: 14px; }
    .signaux td:last-child { padding-bottom: 14px; }
}

/* Mots-clés du menu */
.mots-cles { display: grid; margin: 20px 0 0; }
.mots-cles > div { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--trait); }
.mots-cles > div:last-child { border-bottom: 1px solid var(--trait); }
.mots-cles dd { margin: 0; color: var(--texte-doux); }
@media (min-width: 640px) {
    .mots-cles > div { grid-template-columns: 200px 1fr; gap: 20px; }
}

/* --- Questions fréquentes --- */
.faq-groupe + .faq-groupe { margin-top: 36px; }
.faq-groupe h3 { margin-bottom: 12px; }
.question { border-top: 1px solid var(--trait); }
.faq-groupe .question:last-child { border-bottom: 1px solid var(--trait); }
.question summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.question summary::-webkit-details-marker { display: none; }
.question summary::after {
    content: "+";
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    background: var(--bleu-100);
    color: var(--bleu-600);
    transition: transform 0.2s;
}
.question[open] summary::after { content: "−"; background: var(--bleu-100); }
.question summary:hover { color: var(--bleu-600); }
.question__reponse { padding: 0 0 18px; color: var(--texte-doux); max-width: 68ch; }
.question__reponse ul { padding-left: 1.2em; margin-top: 8px; display: grid; gap: 4px; }

/* Contact final */
.guide-contact {
    padding: clamp(24px, 4vw, 36px);
    background: #fff;
    border: 2px solid var(--ardoise);
    border-radius: var(--cadre-rayon);
    box-shadow: 6px 6px 0 var(--bleu-500);
}
.guide-contact h2 { margin-bottom: 10px; }
.guide-contact p { color: var(--texte-doux); margin-bottom: 20px; }

/* Pastilles accrochées aux éléments de la bulle */
.bulle-reelle__lignes li { position: relative; }
.bulle-reelle .pastille--ligne { left: -38px; top: 50%; transform: translateY(-50%); }
.bulle-reelle .icone { position: relative; display: inline-flex; }
.bulle-reelle .pastille--haut { left: 50%; top: -26px; transform: translateX(-50%); width: 18px; height: 18px; font-size: 10px; }
.bulle-reelle__titre { margin-bottom: 26px; }
.legende-bulle .pastille--ligne, .legende-bulle .pastille--haut { transform: none; }

/* --- Mentions légales (confidentiality.html partage la mise en page du guide) --- */
.mentions { margin-top: 20px; padding: 4px 20px; background: #fff; border: 2px solid var(--ardoise); border-radius: var(--cadre-rayon); }
.mentions > div:first-child { border-top: 0; }
.mentions > div:last-child { border-bottom: 0; }
.methodes p + p { margin-top: 8px; }
.maj { margin-top: 28px !important; font-size: 0.875rem; color: var(--texte-doux); }
