/* ============================================================
   pages-publiques.css — Système de design commun aux pages
   publiques (fonctionnalités, comparatifs, hub, profils).

   Objectif : une seule source de vérité pour la palette, la
   typographie et les composants. Palette alignée sur la page
   d'accueil (bleu #0055FF) pour une marque cohérente.
   ============================================================ */

:root {
    /* Palette — alignée sur css/v3-home.css */
    --pub-blue:        #0055FF;
    --pub-blue-bright: #2979FF;
    --pub-blue-dark:   #0030BB;
    --pub-blue-soft:   #E8F0FF;
    --pub-cyan:        #00D4FF;

    --pub-ink:    #0A0E1A;   /* titres */
    --pub-text:   #2A3142;   /* corps de texte — contraste AA sur blanc */
    --pub-muted:  #5A6380;   /* texte secondaire — contraste AA sur blanc */
    --pub-border: #E3E8F2;
    --pub-soft:   #F4F6FC;   /* fond de section alterné */

    /* Accent CTA — action commerciale principale (1 par écran).
       Cf. design-system/edutools/MASTER.md §4. */
    --pub-accent:      #EA580C;
    --pub-accent-dark: #C2410C;

    --pub-radius:    16px;
    --pub-radius-sm: 10px;
    --pub-shadow:    0 4px 24px rgba(0, 85, 255, 0.08);
    --pub-shadow-lg: 0 12px 32px rgba(0, 85, 255, 0.14);

    --pub-font-body:  'Nunito', system-ui, -apple-system, sans-serif;
    --pub-font-title: 'Plus Jakarta Sans', sans-serif;
}

/* ─── Base typographique (alignée sur la page d'accueil) ─── */
/* Police drapeaux auto-hébergée (cf. v3-home.css) — affiche les drapeaux sur
   Windows + Chrome/Edge. unicode-range = uniquement les drapeaux. */
@font-face {
  font-family: "Twemoji Country Flags";
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E007F;
  src: url("../fonts/TwemojiCountryFlags.woff2") format("woff2");
  font-display: swap;
}
body {
    margin: 0;
    font-family: "Twemoji Country Flags", var(--pub-font-body);
    color: var(--pub-text);
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ─── Accessibilité : focus visible homogène ─── */
.pub-scope a:focus-visible,
.pub-scope button:focus-visible,
.pub-scope summary:focus-visible {
    outline: 3px solid var(--pub-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── Icônes (Lucide) ─── */
.pub-ic {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.12em;
    stroke-width: 2;
}
.pub-ic--lg { width: 1.85rem; height: 1.85rem; color: var(--pub-blue); }

/* ─── Hero ─── */
.pub-hero {
    background: linear-gradient(135deg, #f4f8ff 0%, var(--pub-blue-soft) 55%, #e7f6ff 100%);
    padding: 70px 5% 80px;
    text-align: center;
}
.pub-hero__inner { max-width: 880px; margin: 0 auto; }

/* Variante 2 colonnes (texte gauche, visuel droite avec bleed) — utilisée par
   feature/comparison/profile/hub/conformite quand un visuel est rendu. */
.pub-hero--split {
    padding: 70px 0 80px;
    overflow: hidden;
    text-align: left;
}
.pub-hero--split .pub-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 560px) 1fr;
    gap: 56px;
    align-items: center;
    padding-left: max(24px, 5vw);
    /* Pas de padding-right : la photo touche le bord droit (bleed) */
}
.pub-hero--split .pub-hero__inner {
    max-width: 560px;
    margin: 0;
    text-align: left;
}
.pub-hero__visual {
    position: relative;
}

/* Conteneur du carousel (et du fallback statique) — arrondi gauche seulement
   pour épouser le bleed à droite. */
.pub-hero__carousel,
.pub-hero__photo {
    position: relative;
    height: clamp(340px, 50vh, 540px);
    border-radius: 20px 0 0 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 24px 60px rgba(10, 14, 26, 0.10);
}
.pub-hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pub-hero__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    will-change: opacity;
}
.pub-hero__slide.is-active { opacity: 1; }

/* Responsive : sous 960px on stack vertical, plus de bleed, arrondi sur 4 côtés */
@media (max-width: 960px) {
    .pub-hero--split { padding: 70px 5% 80px; }
    .pub-hero--split .pub-hero__layout {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-left: 0;
    }
    .pub-hero--split .pub-hero__inner {
        max-width: none;
    }
    .pub-hero__visual { order: -1; max-width: 560px; margin: 0 auto; width: 100%; }
    .pub-hero__carousel,
    .pub-hero__photo {
        height: auto;
        aspect-ratio: 16 / 10;
        border-radius: 18px;
    }
}

.pub-breadcrumb { font-size: 0.82rem; color: var(--pub-muted); margin-bottom: 18px; }
.pub-breadcrumb a { color: var(--pub-blue); text-decoration: none; }
.pub-breadcrumb a:hover { text-decoration: underline; }

/* Pastille de validation (✓) — listes d'avantages et de cas d'usage */
.pub-check {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
}

.pub-eyebrow {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pub-blue);
    background: rgba(0, 85, 255, 0.10);
    padding: 7px 16px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.pub-h1 {
    font-family: var(--pub-font-title);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--pub-ink);
    margin: 0 0 20px;
}
.pub-h1 .hl {
    background: linear-gradient(135deg, var(--pub-blue), var(--pub-blue-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pub-lead {
    font-size: 1.12rem;
    line-height: 1.7;
    color: var(--pub-text);
    max-width: 680px;
    margin: 0 auto 32px;
}

/* ─── Boutons ─── */
.pub-btn {
    font-family: var(--pub-font-title);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: var(--pub-accent);
    color: #fff;
    box-shadow: 0 8px 28px rgba(234, 88, 12, 0.32);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.pub-btn:hover {
    background: var(--pub-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(234, 88, 12, 0.45);
}
/* Variante claire (sur fond bleu de la CTA finale) — reste blanc/bleu */
.pub-btn--light { background: #fff; color: var(--pub-blue); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15); }
.pub-btn--light:hover { background: var(--pub-soft); color: var(--pub-blue-dark); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22); }
.pub-btn--ghost {
    background: #fff;
    color: var(--pub-ink);
    border: 1.5px solid var(--pub-border);
    box-shadow: none;
}
.pub-btn--ghost:hover {
    background: #fff;
    color: var(--pub-blue);
    border-color: var(--pub-blue);
    box-shadow: none;
}
.pub-btn-row {
    display: inline-flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Icône emoji (cartes pilotées par des données utilisateur) */
.pub-card__emoji { font-size: 2rem; line-height: 1; margin-bottom: 11px; }

/* ─── Démo visuelle (sous le hero) ─── */
.pub-demo-section {
    padding: 24px 5% 50px;   /* plus serré : suit directement le hero */
    background: #fff;
}
.pub-demo {
    max-width: 880px;
    margin: 0 auto;
}
.pub-demo__media {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

/* ─── Démo Live Quiz (showcase quiz-interactif) ───
   Mockup CSS-only animé, scope `.demo-quiz`. Copie ce pattern pour
   créer une démo d'une autre fonctionnalité.
*/
.demo-quiz {
    background: linear-gradient(135deg, #1e293b 0%, #0a0e1a 100%);
    border-radius: 18px;
    padding: 26px 30px;
    color: #fff;
    font-family: var(--pub-font-title);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.22);
}
.demo-quiz__bar {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    margin-bottom: 22px;
}
.demo-quiz__pin,
.demo-quiz__players {
    background: rgba(255, 255, 255, 0.10);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
}
.demo-quiz__pin strong,
.demo-quiz__players strong { color: #fff; font-weight: 800; }
.demo-quiz__timer-wrap {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}
.demo-quiz__timer-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--pub-cyan), var(--pub-blue));
    transform-origin: left;
    animation: dq-countdown 8s linear infinite;
    will-change: transform;
}
.demo-quiz__q {
    font-size: 1.4rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 22px;
    color: #fff;
}
.demo-quiz__answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.demo-quiz__a {
    background: rgba(255, 255, 255, 0.07);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: background .2s, border-color .2s, box-shadow .2s;
}
.demo-quiz__letter {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}
.demo-quiz__a.is-correct {
    animation: dq-correct 8s linear infinite;
}
@keyframes dq-countdown {
    /* GPU-friendly : on anime transform plutôt que width.
       L'effet visuel est identique (barre qui rétrécit vers la gauche). */
    0%, 70%   { transform: scaleX(1);    background: linear-gradient(90deg, var(--pub-cyan), var(--pub-blue)); }
    85%       { transform: scaleX(0.12); background: linear-gradient(90deg, #FBBF24, #DC2626); }
    88%, 100% { transform: scaleX(1);    background: linear-gradient(90deg, var(--pub-cyan), var(--pub-blue)); }
}
@keyframes dq-correct {
    0%, 84%   { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.12); box-shadow: none; }
    87%, 100% { background: rgba(34, 197, 94, 0.22); border-color: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }
}
@media (prefers-reduced-motion: reduce) {
    /* Global : on coupe toutes les animations/transitions décoratives
       pour les utilisateurs ayant activé « Réduire les animations ». */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    /* Démo Live Quiz : on coupe les animations ET on force l'état final
       (bonne réponse en vert) pour que la démo reste lisible. */
    .demo-quiz__timer-bar,
    .demo-quiz__a.is-correct { animation: none !important; }
    .demo-quiz__a.is-correct {
        background: rgba(34, 197, 94, 0.22);
        border-color: #22c55e;
    }
}
@media (max-width: 600px) {
    .demo-quiz { padding: 18px 16px; }
    .demo-quiz__q { font-size: 1.05rem; }
    .demo-quiz__a { font-size: 0.85rem; padding: 11px 12px; }
    .demo-quiz__answers { gap: 8px; }
    .demo-quiz__bar { font-size: 0.72rem; gap: 8px; }
    .demo-quiz__letter { width: 24px; height: 24px; font-size: 0.75rem; }
}

/* ─── Sections ─── */
.pub-section { padding: 70px 5%; }
.pub-section--alt { background: var(--pub-soft); }
.pub-wrap { max-width: 1000px; margin: 0 auto; }
.pub-wrap--narrow { max-width: 800px; margin: 0 auto; }

.pub-h2 {
    font-family: var(--pub-font-title);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.18;
    color: var(--pub-ink);
    text-align: center;
    margin: 0 0 38px;
}

/* ─── Contenu éditorial (prose) ─── */
.pub-prose h2 {
    font-family: var(--pub-font-title);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--pub-ink);
    margin: 40px 0 14px;
}
.pub-prose h2:first-child { margin-top: 0; }
.pub-prose p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--pub-text);
    margin: 0 0 16px;
}

/* ─── Grille de cartes ─── */
.pub-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.pub-card {
    /* Fond bleuté + voile blanc en haut = effet glossy doux
       (même traitement que .tool-card sur l'accueil). */
    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.55) 0%,
            rgba(255, 255, 255, 0) 50%),
        linear-gradient(160deg, #F4F8FF 0%, #E8F0FF 100%);
    border: 1px solid #DCE6F5;
    border-radius: var(--pub-radius);
    padding: 24px 22px;
    text-decoration: none;
    color: inherit;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 1px 3px rgba(10, 14, 26, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
}
/* Reflet horizontal en haut (effet "moiré" subtil) */
.pub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.9) 50%,
        transparent 100%);
    pointer-events: none;
}
a.pub-card:hover {
    transform: translateY(-3px);
    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.65) 0%,
            rgba(255, 255, 255, 0) 50%),
        linear-gradient(160deg, #EAF1FE 0%, #D9E5FB 100%);
    border-color: rgba(0, 85, 255, 0.30);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 16px 36px rgba(0, 85, 255, 0.12);
}
.pub-card__ic {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: var(--pub-blue-soft);
    color: var(--pub-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 13px;
}
.pub-card__ic .pub-ic { width: 22px; height: 22px; }
.pub-card__title {
    font-family: var(--pub-font-title);
    font-size: 1.04rem;
    font-weight: 700;
    color: var(--pub-ink);
    margin: 0 0 7px;
}
.pub-card__text { font-size: 0.9rem; color: var(--pub-muted); line-height: 1.55; margin: 0; }
.pub-card__more {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--pub-blue);
}

/* ─── Liste de cas d'usage ─── */
.pub-uses {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}
.pub-uses li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    background: #fff;
    border: 1px solid var(--pub-border);
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--pub-text);
}
.pub-uses li .pub-check { margin-top: 1px; }

/* ─── FAQ ─── */
.pub-faq { display: flex; flex-direction: column; gap: 14px; }
.pub-faq__item {
    background: #fff;
    border: 1px solid var(--pub-border);
    border-radius: 14px;
    overflow: hidden;
}
.pub-faq__item[open] { border-color: var(--pub-blue); }
.pub-faq__q {
    font-family: var(--pub-font-title);
    font-size: 1rem;
    font-weight: 700;
    color: var(--pub-ink);
    padding: 18px 22px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.pub-faq__q::-webkit-details-marker { display: none; }
.pub-faq__q::after {
    content: '+';
    color: var(--pub-blue);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}
.pub-faq__item[open] .pub-faq__q::after { content: '\2212'; }
.pub-faq__a { padding: 0 22px 20px; color: var(--pub-text); line-height: 1.65; font-size: 0.95rem; }

/* ─── Cartes "pages liées" ─── */
.pub-related {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.pub-related__card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--pub-border);
    border-radius: 14px;
    padding: 18px 20px;
    text-decoration: none;
    color: var(--pub-ink);
    font-weight: 700;
    font-family: var(--pub-font-title);
    transition: border-color 0.15s, transform 0.15s, color 0.15s;
}
.pub-related__card:hover { border-color: var(--pub-blue); transform: translateY(-2px); color: var(--pub-blue); }
.pub-related__emoji { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.pub-links-line { text-align: center; margin-top: 24px; font-size: 0.95rem; color: var(--pub-muted); }
.pub-links-line a { color: var(--pub-blue); text-decoration: none; font-weight: 600; }
.pub-links-line a:hover { text-decoration: underline; }

/* ─── CTA finale ─── */
.pub-cta {
    padding: 80px 5%;
    background: linear-gradient(135deg, var(--pub-blue), var(--pub-blue-bright));
    color: #fff;
    text-align: center;
}
.pub-cta h2 {
    font-family: var(--pub-font-title);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    margin: 0 0 16px;
}
.pub-cta p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 540px;
    margin: 0 auto 28px;
    font-size: 1rem;
    line-height: 1.6;
}

/* ─── Tableau comparatif ─── */
.pub-table-wrap { overflow-x: auto; }
.pub-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--pub-shadow);
    font-size: 0.94rem;
}
.pub-table th, .pub-table td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--pub-border);
}
.pub-table thead th {
    font-family: var(--pub-font-title);
    font-size: 0.9rem;
    background: var(--pub-ink);
    color: #fff;
}
.pub-table thead th.is-edu { background: var(--pub-blue); }
.pub-table td.is-edu { background: var(--pub-blue-soft); font-weight: 700; }
.pub-table tbody tr:last-child td { border-bottom: none; }
.pub-table td:first-child { font-weight: 600; color: var(--pub-ink); }
.pub-table .cell { display: inline-flex; align-items: center; gap: 7px; }
.pub-table .cell .sym { font-weight: 700; font-size: 0.95rem; }
.pub-cell-yes { color: #15803d; }
.pub-cell-no { color: #b91c1c; }
.pub-cell-neutral { color: var(--pub-muted); }
.pub-disclaimer {
    font-size: 0.82rem;
    color: var(--pub-muted);
    text-align: center;
    margin-top: 16px;
    line-height: 1.5;
}

/* ─── Encadré "positionnement" (comparatifs) ─── */
.pub-callout {
    background: var(--pub-blue-soft);
    border-left: 4px solid var(--pub-blue);
    border-radius: 8px;
    padding: 18px 22px;
    font-size: 0.97rem;
    line-height: 1.65;
    color: var(--pub-ink);
    margin-top: 28px;
}

/* ─── Liste d'avantages (pages profils) ─── */
.pub-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.pub-benefit {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid var(--pub-border);
}
.pub-benefit .pub-check { margin-top: 1px; }
.pub-benefit span { font-size: 0.95rem; color: var(--pub-text); line-height: 1.5; }

/* ─── Tarifs (pages profils) ─── */
.pub-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 44px;
}
.pub-plan {
    background: #fff;
    border: 2px solid var(--pub-border);
    border-radius: 18px;
    padding: 32px 28px;
    transition: border-color 0.15s, transform 0.15s;
    /* Carte en flex column : le CTA reçoit margin-top:auto pour rester
       aligné en bas, peu importe le nombre de lignes de features. */
    display: flex;
    flex-direction: column;
}
.pub-plan:hover { transform: translateY(-3px); border-color: var(--pub-blue); }
.pub-plan__name {
    font-family: var(--pub-font-title);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--pub-blue);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.pub-plan__price {
    font-family: var(--pub-font-title);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--pub-ink);
}
.pub-plan__period { color: var(--pub-muted); font-size: 0.85rem; margin-bottom: 22px; }
.pub-plan__features {
    list-style: none;
    padding: 0;
    margin: 0 0 26px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pub-plan__features li {
    display: flex;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--pub-text);
}
.pub-plan__features li::before { content: '\2713'; color: #16a34a; font-weight: 700; }
.pub-plan__cta {
    display: block;
    text-align: center;
    background: var(--pub-blue);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    /* Aligne le bouton en bas de la carte flex (.pub-plan). */
    margin-top: auto;
    padding: 12px;
    border-radius: 10px;
    transition: background 0.15s;
}
.pub-plan__cta:hover { background: var(--pub-blue-dark); }
.pub-no-plan { text-align: center; color: var(--pub-muted); padding: 40px; font-size: 0.95rem; }

/* ─── Lead de section centré ─── */
.pub-section-lead {
    text-align: center;
    color: var(--pub-muted);
    max-width: 640px;
    margin: -22px auto 44px;
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .pub-hero { padding: 46px 5% 56px; }
    .pub-section, .pub-cta { padding: 52px 5%; }
}

/* ─── Galerie illustrée (feature page) ───
 * Alternance gauche/droite, image + texte courts, optimisé SEO via figure/figcaption.
 */
.pub-showcase-section { background: var(--pub-soft); }
.pub-showcase__lead {
    text-align: center;
    color: var(--pub-muted);
    max-width: 640px;
    margin: -10px auto 50px;
    font-size: 1rem;
    line-height: 1.6;
}
.pub-showcase {
    display: flex;
    flex-direction: column;
    gap: 60px;
}
.pub-showcase__item {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: center;
    margin: 0;
}
.pub-showcase__item--reverse { grid-template-columns: 1fr 1.15fr; }
.pub-showcase__item--reverse .pub-showcase__media { order: 2; }
.pub-showcase__item--reverse .pub-showcase__text  { order: 1; }

/* Button qui enveloppe l'image — clic = ouvre la lightbox */
.pub-showcase__media {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: white;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .06),
        0 12px 32px rgba(15, 23, 42, .10);
    transition: transform .3s ease, box-shadow .3s ease;
    /* reset button */
    border: none;
    padding: 0;
    margin: 0;
    cursor: zoom-in;
    display: block;
    width: 100%;
    font: inherit;
    color: inherit;
}
.pub-showcase__media:hover {
    transform: translateY(-3px);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .06),
        0 18px 40px rgba(15, 23, 42, .15);
}
.pub-showcase__media:hover .pub-showcase__zoom {
    opacity: 1;
    transform: scale(1);
}
.pub-showcase__media:focus-visible {
    outline: 3px solid var(--pub-blue);
    outline-offset: 3px;
}
.pub-showcase__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}
.pub-showcase__zoom {
    position: absolute;
    top: 12px; right: 12px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(15, 23, 42, .75);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    transform: scale(.85);
    transition: opacity .25s, transform .25s;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* ─── Lightbox ─── */
.pub-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 60px;
    animation: pubLbFade .2s ease-out;
}
.pub-lightbox[hidden] { display: none; }
@keyframes pubLbFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.pub-lightbox__figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.pub-lightbox__figure img {
    max-width: 100%;
    max-height: calc(100vh - 160px);
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    background: white;
    animation: pubLbZoom .25s cubic-bezier(.2, .8, .3, 1);
}
@keyframes pubLbZoom {
    from { opacity: 0; transform: scale(.95); }
    to   { opacity: 1; transform: scale(1); }
}
.pub-lightbox__caption {
    color: white;
    text-align: center;
    max-width: 720px;
    font-size: .95rem;
    line-height: 1.5;
    padding: 0 20px;
    opacity: .92;
}
.pub-lightbox__caption strong {
    color: white;
    margin-right: 4px;
}

.pub-lightbox__close,
.pub-lightbox__nav {
    position: absolute;
    background: rgba(255, 255, 255, .12);
    color: white;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: background .15s, transform .15s;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.pub-lightbox__close:hover,
.pub-lightbox__nav:hover {
    background: rgba(255, 255, 255, .25);
    transform: scale(1.05);
}
.pub-lightbox__close:active,
.pub-lightbox__nav:active { transform: scale(.95); }
.pub-lightbox__close:focus-visible,
.pub-lightbox__nav:focus-visible {
    outline: 2px solid white;
    outline-offset: 3px;
}
.pub-lightbox__close { top: 20px; right: 20px; font-size: 1.7rem; }
.pub-lightbox__nav { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 2rem; }
.pub-lightbox__nav:hover { transform: translateY(-50%) scale(1.05); }
.pub-lightbox__nav:active { transform: translateY(-50%) scale(.95); }
.pub-lightbox__nav--prev { left: 20px; }
.pub-lightbox__nav--next { right: 20px; }
.pub-lightbox__nav:disabled { opacity: 0; pointer-events: none; }

.pub-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: .85rem;
    background: rgba(0, 0, 0, .5);
    padding: 4px 12px;
    border-radius: 999px;
    opacity: .85;
}

@media (max-width: 640px) {
    .pub-lightbox { padding: 16px 8px; }
    .pub-lightbox__figure img { max-height: calc(100vh - 200px); }
    .pub-lightbox__caption { font-size: .85rem; padding: 0 10px; }
    .pub-lightbox__nav { width: 44px; height: 44px; font-size: 1.6rem; }
    .pub-lightbox__nav--prev { left: 8px; }
    .pub-lightbox__nav--next { right: 8px; }
    .pub-lightbox__close { top: 12px; right: 12px; width: 40px; height: 40px; font-size: 1.5rem; }
    .pub-showcase__zoom { width: 32px; height: 32px; font-size: .9rem; }
}

.pub-showcase__text { padding: 8px 0; }
.pub-showcase__heading {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--pub-blue-dark);
    margin: 0 0 14px;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.pub-showcase__text p {
    color: var(--pub-muted);
    font-size: 1.02rem;
    line-height: 1.65;
    margin: 0;
}

@media (max-width: 860px) {
    .pub-showcase { gap: 48px; }
    .pub-showcase__item,
    .pub-showcase__item--reverse {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .pub-showcase__item--reverse .pub-showcase__media,
    .pub-showcase__item--reverse .pub-showcase__text { order: initial; }
    .pub-showcase__heading { font-size: 1.25rem; }
}

@media (max-width: 600px) {
    .pub-showcase__lead { margin: -4px auto 32px; font-size: .95rem; }
    .pub-showcase { gap: 36px; }
}

/* ============================================================
   Mode PAYSAGE mobile / petite tablette (viewport COURT) :
   hero des sous-pages en 2 colonnes compactes, image plafonnée
   en hauteur (même logique que la page d'accueil).
   ============================================================ */
@media (orientation: landscape) and (max-height: 600px) {
    .pub-hero--split .pub-hero__layout {
        grid-template-columns: 1fr 1fr;
        gap: 26px;
        align-items: center;
        padding-left: 0;
    }
    .pub-hero__carousel,
    .pub-hero__photo {
        height: auto;
        aspect-ratio: 16 / 10;
        max-height: 64vh;
        border-radius: 16px;
    }
}
