/* ════════════════════════════════════════════════════════════════════════
   SITE PUBLIC — socle graphique commun des pages publiques CVGator

   Référence : la page d'accueil (accueil.html). Toutes les valeurs ci-dessous
   sont reprises de son code, pas inventées.

   Chargée UNIQUEMENT par les pages publiques (jamais par la console) :
     1. Jetons (couleurs, polices, rayons, ombres)
     2. Pied de page commun (.site-footer) — logo, slogan, liens, réseaux
     3. Pages éditoriales (body.pub-page) : guides, pages métiers, modèles,
        pages institutionnelles et légales
     4. Pages d'identification (bloc de marque .auth-brand)

   L'en-tête commun est dans navbar-public.css, le hero dans cvg-hero.css.
   Le HTML de l'en-tête et du pied de page est généré par
   scripts/site-public/sync.mjs — ne pas le modifier page par page.
   ════════════════════════════════════════════════════════════════════════ */

/* ── 1. JETONS ───────────────────────────────────────────────────────────── */
:root {
    /* Couleurs de marque (accueil) */
    --pub-green:         #00A78E;   /* vert principal : fonds, filets, icônes */
    --pub-green-2:       #009880;   /* vert secondaire */
    --pub-green-text:    #007A68;   /* vert porteur de texte (5,3:1 sur blanc) */
    --pub-green-hover:   #00695A;
    --pub-green-tint:    #F3FAF8;   /* surface vert très clair */
    --pub-green-line:    #B8DDD6;   /* bordure sur surface verte */
    --pub-text:          #293651;   /* titres, texte fort */
    --pub-muted:         #646F87;   /* texte courant */
    --pub-footer-text:   #64748b;
    --pub-border:        #e2e8f0;
    --pub-border-soft:   #f1f5f9;
    --pub-surface-alt:   #F9F9F9;   /* fond de section alternée */

    /* Typographie (accueil) */
    --pub-font:          'Open Sans', -apple-system, sans-serif;
    --pub-font-heading:  'Montserrat', -apple-system, sans-serif;

    /* Formes (accueil : cartes 5–10px, boutons pastille 50px, ombre diffuse) */
    --pub-radius-card:   10px;
    --pub-radius-btn:    50px;
    --pub-shadow-card:   0 0 10px 0 rgba(196,196,196,.3);
    --pub-shadow-hover:  0 14px 28px -12px rgba(0,122,104,.45);

    /* Largeurs */
    --pub-w-page:        1200px;    /* .container de l'accueil */
    --pub-w-text:        820px;     /* colonne de lecture */
}

/* ── 2. PIED DE PAGE COMMUN ──────────────────────────────────────────────── */
.footer.site-footer {
    padding: 44px 0 28px;
    margin: 0;
    text-align: left;
    background: #fff;
    border-top: 1px solid var(--pub-border-soft);
    font-family: var(--pub-font);
    font-size: 13px;
    line-height: 1.5;
    color: var(--pub-footer-text);
}
.site-footer .footer-inner {
    max-width: var(--pub-w-page);
    margin: 0 auto;
    padding: 0 24px;
}
.site-footer .footer-top {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) 3fr;
    gap: 40px;
    align-items: start;
}
.site-footer .footer-brand { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.site-footer .footer-logo { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .footer-logo img { height: 32px; width: auto; display: block; }
.site-footer .footer-slogan {
    margin: 0;
    max-width: 22ch;
    font-family: var(--pub-font-heading);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--pub-text);
    text-wrap: balance;
}
.site-footer .footer-slogan span { color: var(--pub-green-text); }

.site-footer .footer-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 32px;
}
.site-footer .footer-col-title {
    margin: 0 0 6px;
    font-family: var(--pub-font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--pub-text);
}
.site-footer .footer-col ul { list-style: none; margin: 0; padding: 0; }
.site-footer .footer-col li { margin: 0; padding: 0; font-size: 13px; line-height: 1.5; }
.site-footer .footer-col a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--pub-footer-text);
    text-decoration: none;
    transition: color .2s ease;
}
.site-footer .footer-col a:hover,
.site-footer .footer-col a[aria-current="page"] { color: var(--pub-green-text); }

.site-footer .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--pub-border-soft);
    font-size: 12px;
}
.site-footer .footer-copyright { margin: 0; font-size: 12px; color: var(--pub-footer-text); }

.site-footer .footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.site-footer .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--pub-border);
    background: #fff;
    color: var(--pub-footer-text);
    transition: border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.site-footer .footer-social a:hover {
    border-color: var(--pub-green);
    color: var(--pub-green-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,167,142,.18);
}
.site-footer .footer-social svg { width: 16px; height: 16px; fill: currentColor; }

@media (max-width: 860px) {
    .site-footer .footer-top { grid-template-columns: 1fr; gap: 28px; }
    .site-footer .footer-slogan { max-width: none; }
}
@media (max-width: 600px) {
    .footer.site-footer { padding: 36px 0 24px; }
    .site-footer .footer-inner { padding: 0 16px; }
    .site-footer .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
    .site-footer .footer-col a { min-height: 40px; }
    .site-footer .footer-col:last-child { grid-column: 1 / -1; }
    .site-footer .footer-col:last-child ul { columns: 2; column-gap: 16px; }
    .site-footer .footer-bottom { flex-direction: column-reverse; align-items: flex-start; }
}
@media (max-width: 350px) {
    .site-footer .footer-nav { grid-template-columns: 1fr; }
}

/* ── 3. PAGES ÉDITORIALES ────────────────────────────────────────────────── */
body.pub-page {
    margin: 0;
    padding: 0;
    font-family: var(--pub-font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--pub-muted);
    background: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
.pub-page *, .pub-page *::before, .pub-page *::after { box-sizing: border-box; }
.pub-page main { display: block; }

/* Focus clavier : même anneau que ui-kit.css, y compris sur les pages qui ne le chargent pas */
.pub-page :focus-visible,
.site-footer :focus-visible { outline: 2px solid var(--pub-green-text); outline-offset: 2px; border-radius: 4px; }

/* Lien d'évitement (clavier) */
.pub-skip {
    position: absolute; left: 16px; top: -60px; z-index: 1200;
    padding: 10px 16px; border-radius: 8px;
    background: var(--pub-text); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none;
    transition: top .15s ease;
}
.pub-skip:focus { top: 8px; }

/* Hero : composant commun cvg-hero, version compacte pour une page de lecture */
.pub-page .cvg-hero { padding: 52px 24px 48px; }
.pub-page .cvg-hero-title { margin: 0 0 12px; text-wrap: balance; }
.pub-page .cvg-hero-desc { max-width: 760px; color: rgba(255,255,255,.95); text-wrap: pretty; }
.pub-page .cvg-hero-note { margin-top: 0; color: rgba(255,255,255,.95); }
@media (max-width: 768px) { .pub-page .cvg-hero { padding: 40px 16px 36px; } }

/* Fil d'Ariane */
.pub-breadcrumb { margin: 0 0 28px; font-size: 13px; color: var(--pub-muted); }
.pub-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.pub-breadcrumb li { margin: 0; font-size: 13px; line-height: 1.5; display: inline-flex; align-items: center; gap: 8px; }
.pub-breadcrumb li + li::before { content: "›"; color: #94a3b8; }
.pub-breadcrumb a { color: var(--pub-muted); text-decoration: none; padding: 6px 0; }
.pub-breadcrumb a:hover { color: var(--pub-green-text); text-decoration: underline; }
.pub-breadcrumb [aria-current="page"] { color: var(--pub-text); font-weight: 600; }

/* Colonne de lecture */
.pub-container { max-width: var(--pub-w-text); margin: 0 auto; padding: 36px 24px 8px; }
.pub-article { margin: 0; }

.pub-article h2 {
    font-family: var(--pub-font-heading);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pub-text);
    margin: 44px 0 14px;
    text-wrap: balance;
}
.pub-article > h2:first-child,
.pub-article > .pub-breadcrumb + h2 { margin-top: 0; }
.pub-article h3 {
    font-family: var(--pub-font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--pub-text);
    margin: 28px 0 8px;
}
.pub-article p { font-size: 16px; line-height: 1.7; color: var(--pub-muted); margin: 0 0 16px; text-wrap: pretty; }
.pub-article .pub-lead { font-size: 18px; line-height: 1.65; color: var(--pub-text); margin: 0 0 24px; } /* intro de la page, sortie du hero (audit 15/11/2026) */
.pub-article ul, .pub-article ol { margin: 0 0 18px; padding-left: 22px; }
.pub-article li { font-size: 16px; line-height: 1.7; color: var(--pub-muted); margin: 0 0 8px; }
.pub-article li::marker { color: var(--pub-green); }
.pub-article strong { color: var(--pub-text); font-weight: 700; }
.pub-article a { color: var(--pub-green-text); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; transition: color .2s ease; }
.pub-article a:hover { color: var(--pub-green-hover); }
.pub-article img { max-width: 100%; height: auto; }

/* Pages légales : mention de version dans le hero, texte un peu plus dense */
.pub-page--legal .pub-article h2 { font-size: 20px; margin-top: 36px; }
.pub-page--legal .pub-article p,
.pub-page--legal .pub-article li { font-size: 15px; }

/* Encadré d'appel à l'action dans l'article (même carte que .how-box de l'accueil) */
.pub-article .cta-block {
    text-align: center;
    background: var(--pub-green-tint);
    border: 1px solid var(--pub-green-line);
    border-radius: var(--pub-radius-card);
    padding: 30px 24px;
    margin: 40px 0 8px;
}
.pub-article .cta-block p { margin: 0 0 16px; font-size: 16px; }
.pub-article .cta-btn,
.pub-article .dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 12px 32px;
    background: var(--pub-green-text);
    color: #fff;
    border-radius: var(--pub-radius-btn);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.pub-article .cta-btn:hover,
.pub-article .dl-btn:hover {
    background: var(--pub-green-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,167,142,.3);
}
.pub-article .cta-block .cta-note { font-size: 13px; color: var(--pub-muted); margin: 14px 0 0; }

/* Mini-FAQ de fin d'article : mêmes cartes que la FAQ */
.pub-article .faq-mini { margin-top: 8px; }
.pub-article .faq-mini h3 {
    margin: 12px 0 0;
    padding: 18px 22px 0;
    border: 1px solid var(--pub-border);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    font-size: 16px;
}
.pub-article .faq-mini h3 + p {
    margin: 0;
    padding: 8px 22px 18px;
    border: 1px solid var(--pub-border);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    font-size: 15px;
}

/* Bloc de téléchargement (pages institutionnelles) */
.pub-article .dl-block { border: 1px solid var(--pub-green-line); border-radius: var(--pub-radius-card); padding: 26px 28px; margin: 28px 0; background: var(--pub-green-tint); }
.pub-article .dl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pub-article .dl-head svg { width: 26px; height: 26px; fill: var(--pub-green); flex-shrink: 0; }
.pub-article .dl-head strong { font-family: var(--pub-font-heading); font-size: 18px; color: var(--pub-text); }
.pub-article .dl-block p { font-size: 15px; margin: 0 0 14px; }
.pub-article .dl-block ul { margin: 0 0 16px; padding-left: 20px; }
.pub-article .dl-block li { font-size: 15px; margin-bottom: 4px; }
.pub-article .dl-btn svg { width: 15px; height: 15px; fill: currentColor; }
.pub-article .dl-block .dl-note { font-size: 13px; color: var(--pub-muted); margin: 12px 0 0; }

/* Tableaux */
.pub-article .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0; }
.pub-article .table-scroll table { margin: 0; }
.pub-article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.pub-article th { background: var(--pub-green-tint); text-align: left; padding: 10px 12px; border: 1px solid var(--pub-border); font-family: var(--pub-font-heading); font-weight: 600; color: var(--pub-text); }
.pub-article td { padding: 10px 12px; border: 1px solid var(--pub-border); color: var(--pub-muted); vertical-align: top; }
@media (max-width: 600px) { .pub-article .table-scroll table { min-width: 460px; } }

/* Politique de confidentialité : droits, mentions à compléter */
.pub-article .todo { background: #FEF3C7; border: 1px dashed #D97706; border-radius: 4px; padding: 1px 6px; color: #92400E; font-style: italic; font-size: 14px; }
.pub-article .rights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.pub-article .right-item { background: #fff; border-radius: var(--pub-radius-card); box-shadow: var(--pub-shadow-card); padding: 16px 18px; }
.pub-article .right-item strong { font-family: var(--pub-font-heading); font-size: 14px; color: var(--pub-text); display: block; margin-bottom: 4px; }
.pub-article .right-item span { font-size: 14px; color: var(--pub-muted); line-height: 1.5; }
@media (max-width: 600px) { .pub-article .rights-grid { grid-template-columns: 1fr; } }

/* Modèles de CV : aperçu, galerie, liens voisins */
.pub-article .cv-preview { margin: 22px auto 8px; max-width: 520px; border-radius: var(--pub-radius-card); overflow: hidden; background: #fff; box-shadow: var(--pub-shadow-card); outline: 1px solid rgba(0,0,0,.06); outline-offset: -1px; }
.pub-article .cv-preview img { display: block; width: 100%; height: auto; }
.pub-article .persona-note { font-size: 13px; color: var(--pub-muted); margin: 10px 0 24px; font-style: italic; text-align: center; }
.pub-article .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 30px; margin: 4px 0 26px; }
.pub-article .tpl-card {
    display: block;
    border-radius: var(--pub-radius-card);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--pub-shadow-card);
    text-decoration: none;
    transition: box-shadow .3s ease-out, transform .3s ease-out;
}
.pub-article .tpl-card:hover,
.pub-article .tpl-card:focus-visible { box-shadow: var(--pub-shadow-hover); transform: translateY(-4px); }
.pub-article .tpl-card img { display: block; width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; border-bottom: 1px solid var(--pub-border-soft); }
.pub-article .tpl-card .tpl-label { display: block; padding: 14px 18px 16px; }
.pub-article .tpl-card .tpl-label strong { font-family: var(--pub-font-heading); font-size: 16px; font-weight: 600; color: var(--pub-text); display: block; }
.pub-article .tpl-card .tpl-label span { font-size: 14px; color: var(--pub-muted); }

/* Page galerie : la grille prend la largeur de l'accueil, le texte reste en colonne de lecture */
.pub-page--gallery .pub-container { max-width: var(--pub-w-page); }
.pub-page--gallery .pub-article > :not(.grid) { max-width: var(--pub-w-text); margin-left: auto; margin-right: auto; }

/* Liens voisins : « Autres modèles », « Guides » — pastilles de l'accueil */
.pub-article .autres,
.pub-page .guides-nav { margin: 36px 0 0; padding: 26px 0 0; border-top: 1px solid var(--pub-border-soft); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pub-article .autres > strong,
.pub-page .guides-nav > strong { flex: 0 0 100%; font-family: var(--pub-font-heading); font-size: 18px; font-weight: 700; color: var(--pub-text); margin: 0 0 4px; }
.pub-article .autres a,
.pub-page .guides-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 16px;
    border: 1px solid var(--pub-border);
    border-radius: 99px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--pub-text);
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
/* Les « · » textuels entre liens deviennent inutiles avec les pastilles */
.pub-article .autres { font-size: 0; }
.pub-article .autres a:hover,
.pub-page .guides-nav a:hover { border-color: var(--pub-green); color: var(--pub-green-text); background: var(--pub-green-tint); }

/* Le bloc d'appel commun (.cvg-cta) reprend la largeur de l'accueil */
.pub-page .cvg-cta { padding: 64px 0 80px; }

@media (max-width: 600px) {
    .pub-container { padding: 28px 16px 4px; }
    .pub-article h2 { font-size: 21px; margin-top: 36px; }
    .pub-article h3 { font-size: 17px; }
    .pub-article .grid { gap: 20px; }
    .pub-article .cta-btn, .pub-article .dl-btn { padding: 12px 22px; text-align: center; }
    .pub-page .cvg-cta { padding: 48px 0 56px; }
}
@media (max-width: 350px) {
    .pub-article .grid { grid-template-columns: 1fr; }
}

/* ── 4. PAGES D'IDENTIFICATION : bloc de marque (logo + slogan) ──────────── */
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 0 20px; text-align: center; }
.auth-brand a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.auth-brand img { height: 44px; width: auto; display: block; }
.auth-brand-slogan {
    margin: 0;
    font-family: 'Montserrat', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #293651;
    text-wrap: balance;
}
.auth-brand-slogan span { color: #007A68; }

@media (prefers-reduced-motion: reduce) {
    .pub-page *, .site-footer * { transition: none !important; }
}

/* ── Fabrication du CV (bloc commun « Comment votre CV est fabriqué ») ─────────
   HTML généré par scripts/site-public/fabrication.mjs : templates.html, cv-latex.html,
   modeles-cv/*.html. Sélecteurs à deux classes pour primer sur .pub-article p/li/ol. */
.cvg-fab { width: min(1080px, calc(100% - 32px)); margin: 44px auto; padding: 32px 28px; background: var(--pub-green-tint); border: 1px solid var(--pub-green-line); border-radius: 16px; }
.cvg-fab > h2 { font-family: var(--pub-font-heading); font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--pub-text); margin: 0 0 8px; text-align: center; text-wrap: balance; }
.cvg-fab .cvg-fab-sub { font-size: 16px; line-height: 1.6; color: var(--pub-muted); text-align: center; margin: 0 0 24px; text-wrap: pretty; }
.cvg-fab .cvg-fab-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; counter-reset: none; }
.cvg-fab .cvg-fab-step { position: relative; margin: 0; padding: 18px 16px 16px; background: #fff; border: 1px solid var(--pub-border); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.55; color: var(--pub-muted); }
.cvg-fab .cvg-fab-step::marker { content: none; }
.cvg-fab .cvg-fab-num { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--pub-green-text); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.cvg-fab .cvg-fab-ico { width: 26px; height: 26px; fill: none; stroke: var(--pub-green-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.cvg-fab .cvg-fab-step strong { font-family: var(--pub-font-heading); font-size: 15px; font-weight: 700; color: var(--pub-text); line-height: 1.35; text-wrap: balance; }
.cvg-fab .cvg-fab-note { font-size: 14px; line-height: 1.6; color: var(--pub-muted); text-align: center; margin: 20px 0 0; text-wrap: pretty; }
.cvg-fab .cvg-fab-note a { color: var(--pub-green-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pub-article .cvg-fab { width: auto; margin: 40px 0; padding: 26px 20px; }
@media (max-width: 560px) {
    .cvg-fab { padding: 24px 16px; border-radius: 14px; }
    .cvg-fab > h2 { font-size: 21px; }
}

/* cv-latex.html : deux aperçus réels de CV compilés */
.pub-article .cvl-previews { margin: 8px 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pub-article .cvl-previews img { width: 100%; height: auto; border: 1px solid var(--pub-border); border-radius: 10px; box-shadow: var(--pub-shadow-card); background: #fff; }
.pub-article .cvl-previews figcaption { grid-column: 1 / -1; font-size: 13px; color: var(--pub-muted); text-align: center; }
