/* guide.css : composants du guide de la vente (/guide-vente/*).
   Chargé après refonte.css ; n'est utilisé par aucune autre page du site. */

/* ===== Bandeau brouillon (retiré à la publication) ===== */
.guide-brouillon { background: #fff4d6; color: #6b4e00; text-align: center; font-size: 0.85em; font-weight: 500; padding: 8px 16px; border-bottom: 1px solid #eedc9a; }
mark.a-valider { background: #fff1b8; color: #5c4500; padding: 1px 6px; border-radius: 4px; font-weight: 500; font-size: 0.92em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ===== Hero et mise en page ===== */
.page-guide .article-hero h1 { max-width: 820px; margin-left: auto; margin-right: auto; }
.page-guide .article-layout { max-width: 1160px; }
.guide-chapitre { font-size: 1rem; }
.guide-chapitre h2 { scroll-margin-top: 100px; }
.guide-chapitre h3 { font-size: 1.2em; }

/* ===== L'essentiel (réponse courte en tête de chapitre) ===== */
.guide-resume { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--pepite-gold); border-radius: 0 12px 12px 0; padding: 22px 26px 6px; margin: 0 0 2.2em; }
.guide-resume-titre { font-family: var(--sans); font-size: 0.78em !important; font-weight: 600 !important; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-text) !important; margin: 0 0 8px !important; }
.guide-resume p { font-size: 1.08em; font-weight: 400; }

/* ===== Encarts ===== */
.encart { border-radius: 12px; padding: 20px 24px 6px; margin: 1.8em 0; border: 1px solid var(--line); background: #fff; }
.encart-entete { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.encart-type { font-size: 0.74em; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.encart-type i { margin-right: 4px; }
.encart-portrait { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; margin: 0 !important; box-shadow: none !important; border: 2px solid var(--pepite-gold); }
.encart-titre { font-family: var(--serif); font-size: 1.18em !important; font-weight: 600 !important; color: var(--ink) !important; margin: 0 0 0.6em !important; line-height: 1.3 !important; }
.encart p, .encart li { font-size: 1em !important; }
.encart ol, .encart ul { margin-left: 1.3em; }

.encart-terrain { background: linear-gradient(160deg, #10233f 0%, var(--pepite-blue) 80%); border: none; color: #fff; }
.encart-terrain .encart-type { color: var(--pepite-gold-light); }
.encart-terrain .encart-titre { color: #fff !important; }
.encart-terrain p, .encart-terrain li { color: rgba(255,255,255,0.92) !important; }
.encart-terrain strong { color: #fff !important; }
.encart-terrain a { color: var(--pepite-gold-light) !important; }

.encart-loi { background: #f4f6fa; border-color: #d9dfea; }
.encart-loi .encart-type { color: #3b5683; }

.encart-erreur { background: #fdf3f1; border-color: #f0d6d0; }
.encart-erreur .encart-type { color: #a2402c; }

.encart-cas { background: var(--paper); border-style: dashed; border-color: #d8ccb0; }
.encart-cas .encart-type { color: var(--gold-text); }

.encart-local { background: #f2f7f3; border-color: #d3e3d7; }
.encart-local .encart-type { color: #2f6b45; }

/* ===== Tableau des communes (repliable) ===== */
.guide-donnees { border: 1px solid var(--line); border-radius: 12px; margin: 1.5em 0 2em; background: #fff; }
.guide-donnees summary { cursor: pointer; padding: 14px 20px; font-weight: 500; color: var(--ink); list-style-position: inside; }
.guide-donnees summary i { color: var(--gold-text); margin-right: 6px; }
.guide-donnees[open] summary { border-bottom: 1px solid var(--line); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 12px; }
.guide-donnees table { margin: 12px 0; font-size: 0.9em; box-shadow: none; min-width: 520px; }
.guide-donnees th { font-size: 0.72em; padding: 10px 12px; }
.guide-donnees td { padding: 8px 12px; }
.guide-donnees td:not(:first-child), .guide-donnees th:not(:first-child) { text-align: center; }
.guide-source { font-size: 0.82em !important; color: #6a7486 !important; padding: 0 20px 14px; margin: 0 !important; }

/* Le gabarit des articles aligne les colonnes en flex-start : sur mobile, la largeur minimale d'un
   tableau élargirait toute la page. On borne le contenu et on fait défiler les tableaux. */
.page-guide .article-layout > .article-content { width: 100%; max-width: 100%; }
.guide-chapitre table { display: block; overflow-x: auto; max-width: 100%; }
@media (min-width: 700px) { .guide-chapitre table { display: table; } .guide-donnees table { display: table; } }
.guide-donnees, .table-scroll { max-width: 100%; }

/* Tableaux du texte : en fiches empilées sur mobile (le tableau des communes reste défilant) */
@media (max-width: 699px) {
    .guide-chapitre table.tableau-fiches { display: block; box-shadow: none; border-radius: 0; overflow: visible; }
    .tableau-fiches thead { display: none; }
    .tableau-fiches tbody, .tableau-fiches tr, .tableau-fiches td { display: block; }
    .tableau-fiches tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 6px 0; background: #fff !important; }
    .tableau-fiches td { border: none !important; padding: 4px 16px !important; }
    .tableau-fiches td:first-child { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: 1.05em; }
    .tableau-fiches td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 0.72em; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-text); }
}

/* ===== Checklist ===== */
.guide-checklist { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px 4px; margin: 1.5em 0 2em; }
.guide-checklist ul { list-style: none; margin-left: 0 !important; }
.guide-checklist li { position: relative; padding-left: 32px; }
.guide-checklist li::before { content: "\f00c"; font-family: "Font Awesome 5 Free"; font-weight: 900; position: absolute; left: 0; top: 0.15em; width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--pepite-gold); color: var(--gold-text); font-size: 0.72em; display: flex; align-items: center; justify-content: center; }

/* ===== FAQ ===== */
.guide-faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.guide-faq summary { cursor: pointer; font-family: var(--serif); font-weight: 600; font-size: 1.08em; color: var(--ink); padding: 12px 28px 12px 0; position: relative; list-style: none; }
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after { content: "+"; position: absolute; right: 4px; top: 8px; font-family: var(--sans); font-size: 1.3em; color: var(--gold-text); }
.guide-faq details[open] summary::after { content: "–"; }

/* ===== Sources ===== */
.guide-sources { margin-top: 2.5em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.guide-sources-titre { font-size: 0.78em !important; font-weight: 600 !important; letter-spacing: 0.14em; text-transform: uppercase; color: #6a7486 !important; margin-bottom: 6px !important; }
.guide-sources ul { font-size: 0.9em !important; }

/* ===== Navigation entre chapitres ===== */
.chapitre-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 3em; }
.chapitre-nav-lien { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; color: var(--ink); font-family: var(--serif); font-weight: 600; line-height: 1.3; }
.chapitre-nav-lien small { display: block; font-family: var(--sans); font-weight: 500; font-size: 0.72em; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 4px; }
.chapitre-nav-lien em { font-family: var(--sans); font-weight: 300; font-size: 0.8em; color: #8a93a3; font-style: normal; }
.chapitre-nav-lien.suivant { text-align: right; }
@media (max-width: 600px) { .chapitre-nav { grid-template-columns: 1fr; } .chapitre-nav-lien.suivant { text-align: left; } }

/* ===== Barre latérale : sommaire collant ===== */
.guide-sidebar { top: 90px; }
.guide-toc { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 20px; }
.guide-toc-titre { font-size: 0.74em; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 8px; }
.guide-toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 0; }
.guide-toc li { counter-increment: toc; }
.guide-toc a { display: block; padding: 6px 0 6px 28px; position: relative; font-size: 0.86em; line-height: 1.35; color: #4a5568; text-decoration: none; border-left: 2px solid transparent; }
.guide-toc a::before { content: counter(toc); position: absolute; left: 6px; font-size: 0.85em; color: #a0a8b6; }
.guide-toc a:hover, .guide-toc a.actif { color: var(--ink); font-weight: 500; }
.guide-toc a.actif::before { color: var(--gold-text); font-weight: 600; }
@media (min-width: 901px) { .guide-sidebar { max-height: calc(100vh - 110px); overflow-y: auto; } }
@media (max-width: 900px) { .guide-toc { display: none; } }

/* ===== Tableaux de données : prix DVF, budgets ===== */
.guide-donnees tr.fiab-faible td { font-style: italic; color: #7a8394; }
a.chapitre-nav-lien { text-decoration: none; border-bottom: 1px solid var(--line) !important; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
a.chapitre-nav-lien:hover { border-color: var(--pepite-gold) !important; box-shadow: 0 10px 26px rgba(20,41,74,0.08); color: var(--ink) !important; }
.tableau-budgets td:not(:first-child), .tableau-budgets th:not(:first-child) { text-align: right; }
@media (max-width: 699px) {
    .guide-chapitre table.tableau-budgets { display: table; width: 100%; font-size: 0.86em; }
    .tableau-budgets th { padding: 10px 8px !important; font-size: 0.68em !important; letter-spacing: 0.02em !important; }
    .tableau-budgets td { padding: 10px 8px !important; white-space: nowrap; }
}

/* ===== Images : comparaison côte à côte, visuels avant / après ===== */
.guide-comparaison { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.6em 0 2em; }
.guide-comparaison figure { margin: 0; }
.guide-chapitre .guide-comparaison img { width: 100%; margin: 0 0 8px; border-radius: 10px; box-shadow: 0 6px 20px rgba(20,41,74,0.12); }
.guide-comparaison figcaption { font-size: 0.85em; color: #5b6576; line-height: 1.45; }
@media (max-width: 699px) { .guide-comparaison { grid-template-columns: 1fr; } }
.guide-chapitre p > img + img { margin-top: 0.6em; }
.guide-chapitre img + em, .guide-chapitre p > em:only-child { display: block; font-size: 0.88em; color: #5b6576 !important; }
.guide-chapitre .guide-comparaison img { aspect-ratio: 3 / 2; object-fit: cover; }

/* ===== Sommaire du guide (/guide-vente) ===== */
.guide-sommaire { max-width: 1100px; margin: 0 auto; padding: 50px 20px 30px; }
.guide-sommaire h2 { font-family: var(--serif); font-weight: 600; color: var(--ink); font-size: clamp(1.4em, 3vw, 1.8em); margin: 0 0 6px; letter-spacing: -0.01em; }
.guide-hub-intro { display: grid; grid-template-columns: 1fr 280px; gap: 40px; align-items: center; margin-bottom: 50px; }
.guide-hub-intro p { font-size: 1.08em; line-height: 1.8; font-weight: 300; color: #2f3e55; margin-bottom: 1em; }
.guide-hub-intro strong { font-weight: 500; color: var(--ink); }
.guide-hub-auteur { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px; text-align: center; }
.guide-hub-auteur img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--pepite-gold); margin-bottom: 10px; }
.guide-hub-auteur p { font-size: 0.9em; line-height: 1.55; color: #4a5568; margin: 0; }
.guide-hub-auteur strong { font-family: var(--serif); font-size: 1.15em; color: var(--ink); }
@media (max-width: 800px) { .guide-hub-intro { grid-template-columns: 1fr; } }

.guide-entrees-bloc { margin-bottom: 50px; }
.guide-entrees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.guide-entree { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 14px; text-decoration: none; background: linear-gradient(160deg, #10233f 0%, var(--pepite-blue) 85%); color: #fff; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.guide-entree:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20,41,74,0.22); }
.guide-entree i { color: var(--pepite-gold-light); font-size: 1.3em; }
.guide-entree strong { font-family: var(--serif); font-size: 1.2em; font-weight: 600; }
.guide-entree span { font-size: 0.92em; font-weight: 300; color: rgba(255,255,255,0.88); line-height: 1.5; }
@media (max-width: 800px) { .guide-entrees { grid-template-columns: 1fr; } }

.guide-phase { margin-bottom: 46px; }
.guide-phase h2 { display: flex; align-items: center; gap: 12px; }
.guide-phase-num { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--pepite-gold); color: #fff; font-family: var(--sans); font-size: 0.6em; font-weight: 600; }
.guide-phase-chapeau { color: #5b6576; font-weight: 300; margin: 0 0 16px; }
.guide-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.guide-carte { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; color: inherit; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.guide-carte:hover { border-color: var(--pepite-gold); box-shadow: 0 14px 30px rgba(20,41,74,0.1); transform: translateY(-3px); }
.guide-carte-num { font-size: 0.72em; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-text); }
.guide-carte strong { font-family: var(--serif); font-size: 1.15em; font-weight: 600; color: var(--ink); line-height: 1.25; }
.guide-carte-desc { font-size: 0.88em; font-weight: 300; color: #4a5568; line-height: 1.5; flex: 1; }
.guide-carte-temps { font-size: 0.78em; color: #8a93a3; }
.guide-donnees-locales .guide-carte { background: var(--paper); }

.guide-telechargement { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 30px; margin: 20px 0 40px; }
.guide-telechargement p { font-weight: 300; color: #2f3e55; line-height: 1.7; }
.guide-telechargement-form { background: #fff4d6; color: #6b4e00; border: 1px dashed #e5cf86; border-radius: 12px; padding: 20px; font-size: 0.92em; line-height: 1.55; }
.guide-telechargement-form i { margin-right: 6px; }
@media (max-width: 800px) { .guide-telechargement { grid-template-columns: 1fr; } }

/* ===== Glossaire : sommaire latéral en grille de lettres ===== */
.guide-glossaire-vente-immobiliere .guide-toc ol { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.guide-glossaire-vente-immobiliere .guide-toc a { padding: 6px 0; text-align: center; border: 1px solid var(--line); border-radius: 8px; font-family: var(--serif); font-weight: 600; font-size: 1em; }
.guide-glossaire-vente-immobiliere .guide-toc a::before { content: none; }
.guide-glossaire-vente-immobiliere .guide-toc a.actif { border-color: var(--pepite-gold); }
.guide-glossaire-vente-immobiliere .guide-chapitre h2 { font-size: 2em; margin-top: 1.4em; }

/* ===== Formulaire du kit (sommaire) ===== */
.guide-form { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.guide-form form { display: grid; gap: 6px; }
.guide-form label { font-size: 0.82em; font-weight: 500; color: var(--ink); margin-top: 6px; }
.guide-form input { width: 100%; padding: 12px 14px; border: 1px solid #d5cfc2; border-radius: 10px; font: inherit; font-weight: 400; }
.guide-form input:focus { outline: 2px solid var(--pepite-gold); outline-offset: 1px; border-color: var(--pepite-gold); }
.guide-form button { margin-top: 12px; padding: 14px 18px; border: none; border-radius: 10px; background: var(--ink); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.guide-form button:hover:not(:disabled) { background: var(--pepite-blue); }
.guide-form button:disabled { opacity: 0.55; cursor: not-allowed; }
.guide-form-erreur { color: #a2402c; font-size: 0.88em; margin: 6px 0 0; }
.guide-form-note { font-size: 0.78em; color: #6a7486; margin: 8px 0 0; }
.guide-form-merci { padding: 10px 0; color: var(--ink); line-height: 1.6; }
