/* Système de design commun de Patrimoine International (refonte de novembre 2026).
   Chargé APRÈS les styles de la page : il règle les tokens, la typographie et les
   composants partagés (en-tête, boutons, cartes, bandeau de confiance, encart guide,
   pied de page). Lecteur type : 55 ans et plus, sur téléphone. Règles : texte courant
   d'au moins 18 px, graisse normale, encre foncée, boutons d'au moins 56 px, aucun
   effet décoratif, jamais d'aplat bleu nuit. Charte : CHARTE.md (dossier PI).
   Toute modification : relever le ?v= dans les pages qui le chargent. */

/* 1. Échelle : tout le site est écrit en rem, on monte la base de 16 à 18 px. */
html { font-size: 112.5%; scroll-behavior: auto; }

:root {
  --ivory: #f8f5ef; --ivory-deep: #f0ebe1; --ivory-card: #fdfbf7;
  --ink: #15191f; --navy: #1b2a44; --navy-soft: #2c3850;
  --bronze: #a67c52; --bronze-deep: #7d5a37; --bronze-light: #c2a079;
  /* Texte secondaire : 7:1 au moins sur l'ivoire (avant : #5c6573 en graisse 300). */
  --slate: #434b58; --slate-light: #505865;
  --line: rgba(27,42,68,0.22); --line-soft: rgba(27,42,68,0.12);
  --radius: 6px; --transition: 0.15s ease;
  --pi-text: #1f242c;
}

body { color: var(--pi-text); line-height: 1.7; }
p, li, td, dd { font-weight: 400; }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--bronze-deep); outline-offset: 3px; }

/* 2. En-tête : dans le flux (il ne masque plus un quart de l'écran), liens lisibles. */
.nav { position: static; padding: 14px 0; background: var(--ivory); backdrop-filter: none; border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1080px; padding: 0 24px; gap: 20px; }
.nav-logo { font-size: 1.45rem; white-space: nowrap; letter-spacing: 0; text-decoration: none; }
.nav-logo .mark { width: 36px; height: 36px; font-size: 0.85rem; flex-shrink: 0; }
.nav-logo .logo-text { max-width: none !important; }
.nav-links { gap: 20px; }
.nav-links a { font-size: 0.92rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--navy); }
.nav-links a:hover { color: var(--bronze-deep); text-decoration: underline; }
.nav-links a.nav-cta { white-space: nowrap; font-size: 0.92rem !important; font-weight: 600; padding: 10px 18px; border: 1.5px solid var(--navy); background: transparent; }
.nav-links a.nav-cta:hover { background: var(--navy); color: #fff !important; text-decoration: none; }
/* Le bouton du menu dit « Menu » en toutes lettres. */
.nav-toggle { width: auto !important; height: auto; padding: 10px 16px !important; border: 1.5px solid var(--navy); border-radius: var(--radius); }
.nav-toggle span { display: none !important; }
.nav-toggle::after { content: "Menu"; font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600; color: var(--navy); }
.nav.open .nav-toggle::after { content: "Fermer"; }
@media (max-width: 1100px) {
  .nav { position: relative; }
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; display: flex; flex-direction: column; align-items: stretch; gap: 0; background: var(--ivory); backdrop-filter: none; border-bottom: 1px solid var(--line); padding: 4px 24px 20px; box-shadow: 0 14px 24px -18px rgba(21,25,31,0.35); }
  .nav.open .nav-links a { display: block; padding: 15px 0; font-size: 1.05rem; border-top: 1px solid var(--line-soft); }
  .nav.open .nav-links a.nav-cta { margin-top: 12px; text-align: center; padding: 14px; }
}
@media (max-width: 560px) {
  .nav { padding: 10px 0; }
  .nav-inner { padding: 0 16px; gap: 10px; }
  .nav-logo { font-size: 1.1rem; gap: 8px; }
  .nav-logo .mark { width: 30px; height: 30px; font-size: 0.72rem; }
  .nav:not(.open) .nav-links a.nav-cta { display: none; }
}

/* 3. Boutons : larges, libellé en clair, plus de capitales espacées. */
.btn { min-height: 56px; padding: 14px 30px; justify-content: center; font-size: 1rem; font-weight: 600; letter-spacing: 0; text-transform: none; border-radius: var(--radius); text-align: center; text-decoration: none; }
.btn:hover { transform: none !important; }
.btn-primary, .btn-navy { background: var(--navy); color: #fff; }
.btn-primary:hover, .btn-navy:hover { background: var(--ink); }
.btn-bronze { background: var(--bronze-deep); color: #fff; }
.btn-ghost { border: 1.5px solid var(--navy); color: var(--navy); background: transparent; }
@media (max-width: 600px) { .btn { width: 100%; } }

/* 4. Titres et étiquettes. */
.eyebrow, .section-label { font-size: 0.74rem; letter-spacing: 0.14em; margin-bottom: 14px; }
.section-pad { padding: 72px 0; }
.section-title { font-weight: 600; margin-bottom: 20px; }
.section-intro { font-size: 1.05rem; line-height: 1.7; }
.container { padding: 0 24px; }
@media (max-width: 720px) { .section-pad { padding: 48px 0; } .container { padding: 0 20px; } }

/* 5. Accueil : entrée par situation, bandeau de confiance, encart du guide. */
.hero { padding-top: 56px; padding-bottom: 48px; }
.hero::before, .hero::after { display: none; }
.hero h1 { font-size: clamp(2.05rem, 5vw, 3.5rem); font-weight: 600; letter-spacing: 0; margin-bottom: 20px; max-width: 26ch; }
.hero-lead { font-size: 1.1rem; line-height: 1.65; color: var(--pi-text); max-width: 60ch; margin-bottom: 0; }
@media (max-width: 720px) { .hero { padding-top: 32px; padding-bottom: 36px; } }

.pi-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 32px; }
.pi-tile { display: block; background: var(--ivory-card); border: 2px solid var(--navy); border-radius: 8px; padding: 22px 24px; color: var(--pi-text); text-decoration: none; }
.pi-tile:hover { border-color: var(--bronze-deep); background: #fff; }
.pi-tile b { display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 700; line-height: 1.2; color: var(--navy); margin-bottom: 6px; }
.pi-tile span { display: block; font-size: 0.95rem; line-height: 1.5; }
.pi-tile i { display: inline-block; margin-top: 12px; font-style: normal; font-weight: 600; color: var(--bronze-deep); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .pi-tiles { grid-template-columns: 1fr; gap: 14px; } }

.pi-trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ivory-card); }
.pi-trust ul { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.pi-trust li { padding: 18px 18px; font-size: 0.86rem; line-height: 1.45; border-left: 1px solid var(--line-soft); }
.pi-trust li:first-child { border-left: 0; padding-left: 0; }
.pi-trust b { display: block; color: var(--navy); font-size: 0.92rem; font-weight: 600; margin-bottom: 2px; }
@media (max-width: 900px) {
  .pi-trust ul { grid-template-columns: 1fr 1fr; padding: 0 20px; }
  .pi-trust li { padding: 14px 12px; }
  .pi-trust li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .pi-trust li:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}

.pi-guide { display: grid; grid-template-columns: 190px 1fr; gap: 36px; align-items: center; background: var(--ivory-card); border: 1.5px solid var(--line); border-top: 4px solid var(--bronze); border-radius: var(--radius); padding: 34px; }
.pi-guide img { width: 190px; height: auto; border: 1px solid var(--line); box-shadow: 0 12px 28px -10px rgba(21,25,31,0.3); }
.pi-guide h3 { font-size: 1.85rem; font-weight: 700; margin: 6px 0 10px; }
.pi-guide p { font-size: 1rem; }
.pi-guide .pi-guide-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 20px; }
.pi-guide .pi-price { font-family: 'Cormorant Garamond', serif; font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1; }
.pi-guide small { display: block; margin-top: 14px; font-size: 0.86rem; color: var(--slate); }
@media (max-width: 720px) { .pi-guide { grid-template-columns: 1fr; gap: 20px; padding: 22px; } .pi-guide img { width: 130px; } }

/* 6. Pied de page clair : plus d'aplat sombre, mentions lisibles. */
.footer { background: var(--ivory-deep); color: var(--pi-text); border-top: 1px solid var(--line); padding: 48px 0 32px; }
.footer [style*="rgba(248,245,239"] { color: inherit !important; }
.footer-brand { color: var(--navy); font-weight: 600; }
.footer-brand-desc { font-size: 0.9rem; font-weight: 400; line-height: 1.6; }
.footer h4 { color: var(--bronze-deep); font-size: 0.74rem; letter-spacing: 0.12em; }
.footer a { color: var(--navy); font-size: 0.92rem; font-weight: 400; }
.footer a:hover { color: var(--bronze-deep); text-decoration: underline; }
.footer li { margin-bottom: 12px; }
.footer-legal { border-top: 1px solid var(--line); font-size: 0.84rem; font-weight: 400; line-height: 1.6; color: var(--slate); }
.footer-legal strong { color: var(--navy) !important; }
.footer .pi-follow { font-size: 0.92rem !important; }

/* 7. Formulaires : champs et boutons assez grands pour être lus et touchés. */
input[type="email"], input[type="text"], textarea, select { font-size: 1rem !important; min-height: 54px; border: 1.5px solid #8b8478 !important; border-radius: var(--radius); color: var(--ink); background: #fff; }
form button[type="submit"] { min-height: 54px; font-size: 1rem !important; font-weight: 600; letter-spacing: 0 !important; text-transform: none !important; background: var(--bronze-deep) !important; color: #fff !important; }

/* 8. Page de vente : réassurance avant le paiement, étapes de l'achat, barre d'achat. */
.pi-reassure { list-style: none; margin: 18px 0 0; padding: 0; font-size: 0.9rem; line-height: 1.5; color: var(--pi-text); text-align: left; }
.pi-reassure li { position: relative; padding: 9px 0 9px 26px; border-top: 1px solid var(--line-soft); }
.pi-reassure li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: var(--bronze); }
.pi-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 34px 0 6px; counter-reset: pis; text-align: left; }
.pi-steps div { background: var(--ivory-card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px 22px; font-size: 0.92rem; line-height: 1.5; counter-increment: pis; }
.pi-steps div::before { content: counter(pis); display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1.5px solid var(--bronze); border-radius: 50%; font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 700; color: var(--bronze-deep); margin-bottom: 10px; }
.pi-steps b { display: block; color: var(--navy); font-weight: 600; margin-bottom: 2px; }
@media (max-width: 820px) { .pi-steps { grid-template-columns: 1fr; gap: 12px; } }
.buybar .btn { width: auto; min-height: 50px; padding: 12px 18px; font-size: 0.95rem; }
.buybar .bb-t a { font-size: 0.85rem; }

/* 9. Pages intérieures : l'en-tête n'est plus fixe, les marges hautes prévues pour lui disparaissent. */
.art-head { padding-top: 36px; padding-bottom: 40px; }
.head { padding-top: 48px !important; }
.breadcrumb { font-size: 0.86rem; color: var(--slate); }
.art-meta { font-size: 0.88rem; color: var(--slate); }
.sources li, .footer-legal, .callout p, .warn p, .faq p { font-weight: 400; }
.sources li { font-size: 0.9rem; color: var(--pi-text); }
@media (max-width: 720px) { .art-head { padding-top: 22px; padding-bottom: 28px; } .head { padding-top: 28px !important; } }

/* 10. Articles : serif de lecture (Source Serif 4, licence OFL, auto-hébergée) pour le texte long.
   Les titres restent en Cormorant, les étiquettes, tableaux et encarts en Inter. */
@font-face { font-family: 'Source Serif 4'; src: url(/assets/fonts/gf/files/source-serif-4-latin-wght-normal.woff2) format('woff2'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url(/assets/fonts/gf/files/source-serif-4-latin-wght-italic.woff2) format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }
.art-body > p, .art-body > ul > li, .art-body > ol > li { font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif; font-size: 1.09rem; line-height: 1.68; color: var(--pi-text); }
.art-lead { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.2rem; line-height: 1.6; color: var(--navy-soft); }
.art-body h2 { font-weight: 700; margin-top: 48px; }
.art-body h3 { font-weight: 700; }
@media (max-width: 720px) { .art-body > p, .art-body > ul > li, .art-body > ol > li { font-size: 1.06rem; } .art-lead { font-size: 1.12rem; } }
/* Le cadre « Version vidéo à venir » n'apporte rien au lecteur : masqué tant que la vidéo n'existe pas
   (le bloc reste dans la page, video/integrate_video.py le retrouve). */
.video-ph { display: none; }

/* 11. Menu unique (build-shell.py) : règles de base, pour les pages qui n'en avaient pas. */
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-links { display: flex; align-items: center; }
.nav-links a { text-decoration: none; }
.nav-toggle { display: none; background: none; cursor: pointer; }
@media (max-width: 1100px) { .nav-toggle { display: flex; } }

/* 12. Encart partenaire : trois avantages visibles, le reste au clic. */
.xapo-more { margin: 0 0 14px; }
.xapo-more summary { cursor: pointer; font-weight: 600; color: var(--bronze-deep); text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
.xapo-more[open] summary { margin-bottom: 8px; }
.nav-toggle { background: none !important; min-height: 0 !important; color: var(--navy) !important; }
.nav-links a { white-space: nowrap; }
@media (min-width: 1101px) { .nav-links { gap: 16px; } .nav-links a { font-size: 0.86rem; } .nav-links a.nav-cta { font-size: 0.86rem !important; padding: 9px 14px; } .nav-logo { font-size: 1.32rem; } }

/* 13. « En résumé » en tête d'article (cinq articles les plus vus, test du 10/11/2026). */
.pi-essentiel { background: var(--ivory-card); border: 1.5px solid var(--line); border-left: 5px solid var(--bronze); border-radius: var(--radius); padding: 22px 26px 8px; margin: 28px 0 8px; }
.art-body .pi-essentiel h2 { font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bronze-deep); margin: 0 0 10px; }
.art-body .pi-essentiel p { font-family: 'Inter', sans-serif; font-size: 1rem; line-height: 1.6; color: var(--pi-text); }

/* 14. Index des articles par rubrique, et pays de retraite sur l'accueil. */
.pi-themes { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 8px; }
.pi-themes a { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 16px; border: 1.5px solid var(--navy); border-radius: var(--radius); font-size: 0.92rem; font-weight: 600; color: var(--navy); text-decoration: none; background: var(--ivory-card); }
.pi-themes a:hover { border-color: var(--bronze-deep); color: var(--bronze-deep); }
.pi-rubrique { margin: 56px 0 6px; padding-top: 26px; border-top: 3px solid var(--bronze); scroll-margin-top: 16px; }
.pi-rubrique h2 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); font-weight: 700; margin-bottom: 6px; }
.pi-rubrique p { font-size: 1rem; color: var(--slate); max-width: 62ch; }
.art-card h2 { font-weight: 600; }
.art-card .meta { font-size: 0.86rem; color: var(--slate); }
.pi-pays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.pi-pays a { display: block; background: var(--ivory-card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px 22px; text-decoration: none; color: var(--pi-text); }
.pi-pays a:hover { border-color: var(--bronze-deep); }
.pi-pays b { display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.55rem; font-weight: 700; color: var(--navy); line-height: 1.2; margin-bottom: 4px; }
.pi-pays span { font-size: 0.92rem; line-height: 1.45; }
@media (max-width: 820px) { .pi-pays { grid-template-columns: 1fr 1fr; gap: 12px; } .pi-pays a { padding: 16px; } }
@media (max-width: 420px) { .pi-pays { grid-template-columns: 1fr; } }
