/* ============================================================
   Backoffice pzcms : le classeur.
   À gauche les intercalaires (une couleur franche par famille d'écrans), à droite la
   feuille ouverte ; chaque bloc d'une page est une fiche à onglet.
   Couleurs choisies pour un daltonien : bleu, jaune, noir, gris, rouge réservé au danger,
   jamais de vert ; un état n'est jamais porté par la couleur seule.
   Police : Atkinson Hyperlegible Next (OFL, fonts/OFL-atkinson-hyperlegible-next.txt).
   ============================================================ */

@font-face {
    font-family: "Atkinson Hyperlegible Next";
    src: url("../fonts/atkinson-hyperlegible-next.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;

    --ink: #1d2731;
    --ink-2: #4a5866;
    --ink-3: #56616c;
    --board: #dce3ea;
    --board-2: #c9d3dd;
    --ground: #eef2f6;
    --sheet: #ffffff;
    --rule: #d3dbe3;
    --rule-2: #e5eaef;
    --field: #aebbc8;

    --blue: #0057d9;
    --blue-ink: #0047b3;
    --blue-tint: #e6effc;
    --yellow: #f2a900;
    --yellow-ink: #6b4a00;
    --yellow-tint: #fff3d1;
    --black: #2b2b2b;
    --grey: #c4ccd4;
    /* Gris de la famille Administration quand il doit se voir sur le fond (3,8:1) : le
       gris clair des onglets faisait 1,44:1 en bord de feuille, invisible. */
    --grey-ink: #6f7b88;
    --red: #e3000f;
    --red-ink: #b0000b;
    --red-tint: #fde8e9;

    --group: var(--blue);
    --group-ink: #ffffff;
    --group-mark: var(--blue);

    --radius: 6px;
    --radius-lg: 10px;
    --shadow-1: 0 1px 2px rgba(20, 35, 50, 0.06), 0 2px 8px rgba(20, 35, 50, 0.05);
    --shadow-2: 0 8px 24px rgba(20, 35, 50, 0.14);
    --focus: 0 0 0 3px rgba(0, 87, 217, 0.28);
    --hatch: repeating-linear-gradient(135deg, transparent 0 6px, rgba(43, 43, 43, 0.08) 6px 7px);

    /* Ancienne palette : encore lue par des gabarits de la console. */
    --pz-dark: var(--black);
    --pz-ink: var(--ink);
    --pz-muted: var(--ink-3);
    --pz-accent: var(--blue);
    --pz-line: var(--rule);
    --pz-border: var(--rule);
    --pz-bg: var(--ground);
    --pz-card: var(--sheet);
}

/* Couleur de l'intercalaire ouvert : elle marque la feuille, l'onglet actif et ses icônes. */
.pz-g-contenu        { --group: var(--blue);   --group-ink: #fff;        --group-mark: var(--blue); }
.pz-g-activite       { --group: var(--yellow); --group-ink: var(--black); --group-mark: var(--yellow-ink); }
.pz-g-site           { --group: var(--black);  --group-ink: #fff;        --group-mark: var(--black); }
.pz-g-administration { --group: var(--grey-ink); --group-ink: #fff;       --group-mark: var(--ink-2); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--field) var(--ground); }
body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--ground);
    caret-color: var(--blue);
    accent-color: var(--blue);
    -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(0, 87, 217, 0.2); color: var(--ink); }
a { color: var(--blue-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:not(.pz-btn):hover { text-decoration: underline; }
a { text-decoration: none; }
:focus-visible { outline: 3px solid rgba(0, 87, 217, 0.55); outline-offset: 2px; }
h1 { font-size: 1.95rem; line-height: 1.15; font-weight: 780; letter-spacing: -0.015em; }
h2 { font-size: 1.15rem; line-height: 1.3; font-weight: 720; }
h3 { font-size: 1rem; line-height: 1.35; font-weight: 700; margin-bottom: 10px; }
table, .pz-queue-when { font-variant-numeric: tabular-nums; }

.pz-i {
    width: 18px; height: 18px; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round;
}
.pz-sr {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.pz-skip {
    position: absolute; left: 12px; top: -60px; z-index: 300;
    background: var(--black); color: #fff; padding: 10px 14px; border-radius: var(--radius);
}
.pz-skip:focus { top: 12px; }
.pz-muted { color: var(--ink-3); font-size: 0.9rem; }
.pz-small { font-size: 0.875rem; }
.pz-empty { color: var(--ink-2); padding: 22px 4px; max-width: 62ch; }
.pz-inline { display: inline; }
.pz-h2 { margin: 30px 0 4px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pz-h2-note { font-size: 0.875rem; font-weight: 400; color: var(--ink-2); }

/* ============================================================
   Structure : le classeur
   ============================================================ */

.pz-app {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    min-height: 100vh;
}
.pz-topbar { display: none; }
/* La planche d'icônes porte l'attribut hidden, qu'un élément SVG n'honore pas toujours. */
svg[hidden] { display: none; }
.pz-app > .pz-rail { grid-column: 1; grid-row: 1; }
.pz-app > .pz-main { grid-column: 2; grid-row: 1; }

.pz-rail {
    position: sticky; top: 0; height: 100vh; overflow: hidden;
    display: flex; flex-direction: column;
    background: var(--board);
    /* Bord du classeur en filet intérieur : l'onglet actif, au fond de la feuille, le
       recouvre, si bien qu'aucun trait ne le sépare de la page ouverte. */
    box-shadow: inset -1px 0 0 var(--board-2);
}
/* Seuls les intercalaires défilent : l'adresse et la Déconnexion restent en bas de l'écran
   quelle que soit sa hauteur (avec la couche opérateur, elles passaient sous le pli). */
.pz-rail-head, .pz-rail-foot { flex: 0 0 auto; }
.pz-rail-close { display: none; }
.pz-rail-head { padding: 22px 20px 6px; }
.pz-rail-site {
    display: block; color: var(--ink); font-size: 1.05rem; font-weight: 750; line-height: 1.25;
}
.pz-rail-view {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
    font-size: 0.875rem; color: var(--ink-2);
}
.pz-rail-view .pz-i { width: 15px; height: 15px; }
.pz-rail-state {
    margin-top: 10px; padding: 6px 10px; border-radius: var(--radius);
    background: var(--yellow-tint); color: var(--yellow-ink);
    font-size: 0.8125rem; font-weight: 600; line-height: 1.35;
}

/* Un intercalaire : son bord de couleur traverse le classeur, son onglet en pend. */
.pz-dividers {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-bottom: 4px;
    scrollbar-width: thin; scrollbar-color: var(--board-2) transparent;
}
.pz-divider { --d: var(--blue); --d-ink: #fff; margin-top: 20px; border-top: 3px solid var(--d); }
.pz-divider-contenu        { --d: var(--blue); }
.pz-divider-activite       { --d: var(--yellow); --d-ink: var(--black); }
.pz-divider-site           { --d: var(--black); }
.pz-divider-administration { --d: var(--grey); --d-ink: var(--black); }
.pz-divider-tab {
    display: inline-block; margin: 0 0 8px;
    padding: 4px 18px 6px 20px;
    background: var(--d); color: var(--d-ink);
    border-radius: 0 0 10px 0;
    box-shadow: 0 2px 4px rgba(20, 35, 50, 0.12);
    font-size: 0.875rem; font-weight: 780; letter-spacing: 0.01em;
}
.pz-divider ul { list-style: none; }
.pz-divider a {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 16px 8px 20px;
    color: var(--ink-2); font-size: 0.97rem; font-weight: 550;
    border-radius: 0;
    transition: background 0.15s, color 0.15s;
}
.pz-divider a:hover { background: rgba(255, 255, 255, 0.55); color: var(--ink); text-decoration: none; }
.pz-divider a .pz-i { color: var(--ink-3); }
/* L'onglet ouvert est tiré jusqu'à la feuille : même fond qu'elle, sans bord entre les deux. */
.pz-divider a.is-active {
    background: var(--ground); color: var(--ink); font-weight: 750;
    box-shadow: inset 0 1px 0 var(--board-2), inset 0 -1px 0 var(--board-2);
}
.pz-divider a.is-active .pz-i { color: var(--group-mark); }
.pz-count-pill {
    margin-left: auto; min-width: 24px; padding: 1px 8px;
    background: var(--yellow); color: var(--black);
    border-radius: 999px; font-size: 0.8125rem; font-weight: 800; text-align: center;
}

/* Couche réservée à l'opérateur : hachurée et nommée, jamais mêlée aux écrans du client. */
.pz-layer-operator {
    margin: 10px 12px 0 14px; padding: 6px 0 4px;
    background-image: var(--hatch);
    border: 1px dashed var(--field); border-radius: var(--radius);
}
.pz-layer-label {
    padding: 0 10px 2px; font-size: 0.75rem; font-weight: 750; color: var(--ink-2);
}
.pz-layer-operator a { padding-left: 10px; border-radius: 4px; margin: 0 4px; }

.pz-rail-foot {
    padding: 14px 20px 18px;
    border-top: 1px solid var(--board-2);
}
.pz-rail-user {
    font-size: 0.8125rem; color: var(--ink-2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pz-rail-logout {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 6px;
    background: none; border: 0; padding: 4px 0; cursor: pointer;
    font: 600 0.9rem var(--font); color: var(--ink-2);
}
.pz-rail-logout:hover { color: var(--ink); }
.pz-scrim { display: none; }

/* La feuille ouverte : son bord haut porte la couleur de l'intercalaire. */
.pz-main {
    min-width: 0; outline: none;
    padding: 30px clamp(20px, 3.2vw, 44px) 96px;
    border-top: 4px solid var(--group);
}
.pz-main > * { max-width: 1180px; }

.pz-sheet-head, .pz-page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px 20px; flex-wrap: wrap; margin-bottom: 24px;
}
.pz-page-head { align-items: center; }
.pz-page-head h1 { flex: 1; min-width: 220px; }
.pz-sheet-sub {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
    margin-top: 8px; color: var(--ink-2); font-size: 0.95rem;
}
.pz-back {
    display: inline-flex; align-items: center; gap: 6px; margin: -4px 0 10px -6px;
    padding: 4px 8px; border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 650; color: var(--ink-2);
}
.pz-back:hover { background: rgba(29, 39, 49, 0.06); color: var(--ink); text-decoration: none; }
.pz-back .pz-i { width: 16px; height: 16px; }

/* ============================================================
   Fiches (panneaux)
   ============================================================ */

.pz-fiche, .pz-panel {
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    padding: 20px 22px;
    margin-bottom: 18px;
}
.pz-fiche-flush { padding: 0; overflow: hidden; }
/* Fiche à onglet : le nom de la section est écrit sur l'onglet, à la couleur de
   l'intercalaire dont elle relève (Activité jaune, Contenu bleu, Site noir). */
.pz-fiche-tabbed {
    --t: var(--blue); --t-ink: #fff;
    position: relative; margin-top: 40px;
    border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
}
.pz-tab-activite { --t: var(--yellow); --t-ink: var(--black); }
.pz-tab-contenu  { --t: var(--blue);   --t-ink: #fff; }
.pz-tab-site     { --t: var(--black);  --t-ink: #fff; }
.pz-fiche-tab {
    position: absolute; left: -1px; bottom: 100%;
    display: inline-flex; align-items: center; gap: 9px;
    padding: 6px 18px 5px 14px;
    background: var(--t); color: var(--t-ink);
    border-radius: 9px 9px 0 0;
    font-size: 1rem; font-weight: 780;
}
.pz-fiche-tab .pz-i { width: 18px; height: 18px; }
.pz-fiche-tabbed > .pz-link-more { position: absolute; right: 2px; bottom: calc(100% + 7px); }
.pz-link-more { font-size: 0.9rem; font-weight: 650; white-space: nowrap; }
.pz-fiche-title { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin-bottom: 12px; }
.pz-todo { list-style: none; }
.pz-todo a {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 10px; margin: 0 -10px;
    border-top: 1px solid var(--rule-2); border-radius: var(--radius);
    color: var(--ink); font-weight: 650;
}
.pz-todo li:first-child a { border-top: 0; }
.pz-todo a:hover { background: var(--ground); text-decoration: none; }
.pz-todo .pz-i { color: var(--ink-2); }
.pz-panel > h3 { font-size: 1.02rem; }
/* Couche Position Zero hors du classeur : un seul traitement pour tout panneau réservé à
   l'opérateur (Réglages, Apparence, Référencement) et pour le résumé que voit le client
   (« Réglé par Position Zero ») : même hachure et mêmes tirets que la couche du classeur,
   et, côté opérateur, le même libellé écrit « Réservé à Position Zero » (.pz-layer-label). */
.pz-reserved, .pz-panel-operator {
    background-color: #f6f8fa; background-image: var(--hatch);
    border: 1px dashed var(--field); box-shadow: none;
}
.pz-panel-operator > .pz-layer-label,
.pz-panel-operator > summary > .pz-layer-label { display: block; padding: 0; margin-bottom: 6px; }
.pz-panel-operator > summary { cursor: pointer; }
.pz-reserved > h3 { display: flex; align-items: center; gap: 8px; }
.pz-reserved > h3 .pz-i { color: var(--ink-2); }
.pz-reserved-list { list-style: none; margin-bottom: 8px; }
.pz-reserved-list li { padding: 3px 0; }
.pz-danger-zone { border-color: #f2c4c7; }
.pz-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }

/* ---- Tableau de bord ---- */
.pz-desk { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0 22px; align-items: start; }
.pz-desk .pz-fiche-tabbed:first-child { margin-top: 30px; }
.pz-queue { list-style: none; }
.pz-queue a {
    display: grid; grid-template-columns: 104px minmax(120px, 190px) minmax(0, 1fr); gap: 4px 16px;
    align-items: baseline; padding: 13px 8px; margin: 0 -8px;
    border-top: 1px solid var(--rule-2); border-radius: var(--radius); color: var(--ink);
}
.pz-queue li:first-child a { border-top: 0; }
.pz-queue a:hover { background: var(--ground); text-decoration: none; }
.pz-queue-when { font-size: 0.875rem; color: var(--ink-2); }
.pz-queue-who { font-weight: 700; }
.pz-queue-what { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pz-rows { list-style: none; }
.pz-rows li {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px 16px;
    align-items: center; padding: 11px 0; border-top: 1px solid var(--rule-2);
}
.pz-rows li:first-child { border-top: 0; }
.pz-rows-title { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-rows-kind, .pz-rows-when { font-size: 0.875rem; color: var(--ink-3); }
.pz-rows-when { text-align: right; white-space: nowrap; min-width: 128px; }

/* ============================================================
   Boutons
   ============================================================ */

.pz-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 8px 16px;
    background: var(--sheet); color: var(--ink);
    border: 1px solid var(--field); border-radius: var(--radius);
    font: 650 0.94rem/1.2 var(--font); text-decoration: none; white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.pz-btn:hover { background: #f5f8fb; border-color: #8f9eac; text-decoration: none; }
.pz-btn:active { transform: translateY(1px); }
.pz-btn:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--blue); }
.pz-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.pz-btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.pz-btn-primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); color: #fff; }
.pz-btn-ghost { background: var(--sheet); }
.pz-btn-quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.pz-btn-quiet:hover { background: rgba(29, 39, 49, 0.06); border-color: transparent; color: var(--ink); }
.pz-btn-danger { color: var(--red-ink); border-color: #eeb3b7; }
.pz-btn-danger:hover { background: var(--red-tint); border-color: var(--red); color: var(--red-ink); }
.pz-btn-sm { min-height: 32px; padding: 5px 11px; font-size: 0.875rem; gap: 6px; }
.pz-btn-sm .pz-i { width: 16px; height: 16px; }
.pz-btn-block { width: 100%; margin-bottom: 8px; }
.pz-btn-block:last-child { margin-bottom: 0; }

/* ============================================================
   Champs
   ============================================================ */

.pz-field { margin-bottom: 16px; }
.pz-field > label, .pz-label {
    display: block; margin-bottom: 6px;
    font-size: 0.9rem; font-weight: 700; color: var(--ink);
}
.pz-field input[type="text"], .pz-field input[type="email"], .pz-field input[type="password"],
.pz-field input[type="number"], .pz-field input[type="tel"], .pz-field input[type="url"],
.pz-field input[type="datetime-local"], .pz-field input[type="date"],
.pz-field textarea, .pz-field select, .pz-input,
.pz-newform input, .pz-newform select, .pz-add-block select {
    width: 100%; min-height: 42px; padding: 9px 12px;
    background: var(--sheet); color: var(--ink);
    border: 1px solid var(--field); border-radius: var(--radius);
    font: 400 0.97rem/1.4 var(--font);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pz-field textarea { resize: vertical; line-height: 1.5; }
.pz-field input:focus, .pz-field textarea:focus, .pz-field select:focus,
.pz-input:focus, .pz-newform input:focus {
    outline: none; border-color: var(--blue); box-shadow: var(--focus);
}
.pz-field input:disabled, .pz-field textarea:disabled, .pz-field select:disabled {
    background: #f1f4f7; color: var(--ink-3); border-color: var(--rule);
}
::placeholder { color: #7b8794; opacity: 1; }
.pz-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem !important; }
.pz-check {
    display: flex; align-items: center; gap: 10px; min-height: 32px;
    font-size: 0.95rem; margin-bottom: 8px; cursor: pointer;
}
.pz-check input { width: 18px; height: 18px; flex-shrink: 0; }
.pz-count { color: var(--ink-3); font-weight: 400; }
.pz-count.over { color: var(--red-ink); font-weight: 700; }
.pz-field:has(.pz-ruler:not([hidden])) .pz-count { display: none; }
.pz-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.pz-inline-pair { display: flex; gap: 8px; }
.pz-copy {
    width: 100%; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius);
    background: var(--ground); color: var(--ink-2);
    font: 0.8125rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Réglette : la longueur du texte face à la zone que Google affiche en entier. */
.pz-ruler { margin-top: 8px; }
.pz-ruler-track {
    position: relative; display: block; height: 12px; overflow: hidden;
    background-color: #edf1f4; border-radius: 3px;
    background-image: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(29, 39, 49, 0.16) calc(10% - 1px) 10%);
}
.pz-ruler-zone {
    position: absolute; top: 0; bottom: 0;
    background: rgba(0, 87, 217, 0.14);
    box-shadow: inset 2px 0 0 var(--blue), inset -2px 0 0 var(--blue);
}
.pz-ruler-fill {
    position: absolute; left: 0; top: 4px; height: 4px; width: 100%; border-radius: 2px;
    background: var(--ink-3); transform: scaleX(0); transform-origin: left center;
    transition: transform 0.12s ease-out;
}
.pz-ruler[data-state="ok"] .pz-ruler-fill { background: var(--blue); }
.pz-ruler[data-state="long"] .pz-ruler-fill { background: var(--red); }
.pz-ruler-text { display: block; margin-top: 5px; font-size: 0.8125rem; color: var(--ink-2); }
.pz-ruler[data-state="long"] .pz-ruler-text { color: var(--red-ink); font-weight: 700; }

/* ============================================================
   États, messages
   ============================================================ */

.pz-status, .pz-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 10px 2px 8px; border-radius: 999px;
    font-size: 0.8125rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
    background: #edf0f3; color: var(--ink-2);
}
.pz-badge { padding: 2px 10px; }
.pz-status-mark { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.pz-status .pz-i { width: 14px; height: 14px; }
.pz-status-published, .pz-badge-published { background: var(--blue-tint); color: var(--blue-ink); }
.pz-status-published .pz-status-mark { background: var(--blue); }
.pz-status-draft .pz-status-mark { border: 2px solid #7d8996; }
.pz-status-scheduled, .pz-badge-scheduled { background: var(--yellow-tint); color: var(--yellow-ink); }
/* Préproduction, accueil non publiée : jaune pâle et encre foncée, comme l'état du classeur. */
.pz-status-attention, .pz-badge-attention { background: var(--yellow-tint); color: var(--yellow-ink); }
.pz-status-attention .pz-status-mark { border: 2px solid var(--yellow-ink); }
.pz-badge-draft { background: #edf0f3; color: var(--ink-2); }

.pz-flash {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; margin-bottom: 16px;
    border: 1px solid; border-radius: var(--radius);
    font-weight: 650;
}
.pz-flash .pz-i { margin-top: 2px; }
.pz-flash-ok { background: var(--blue-tint); color: var(--blue-ink); border-color: #b9cff3; }
.pz-flash-err { background: var(--red-tint); color: var(--red-ink); border-color: #f2b8bc; }
.pz-alert {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 18px; margin-bottom: 20px;
    background: var(--yellow-tint); color: #3d2b00;
    border: 1px solid #e8cf86; border-radius: var(--radius-lg);
}
.pz-alert > .pz-i { color: var(--yellow-ink); margin-top: 2px; }
.pz-alert a { color: var(--blue-ink); font-weight: 650; }
.pz-alert ul { margin: 8px 0 0; padding-left: 20px; }
.pz-note {
    padding: 12px 16px; margin-bottom: 20px; font-size: 0.94rem;
    background: var(--blue-tint); border: 1px solid #c9daf6; border-radius: var(--radius);
}
/* Information neutre : ni réussite (bleu) ni attention (jaune). */
.pz-note-neutral {
    display: flex; gap: 10px; align-items: flex-start;
    background: #edf0f3; border-color: var(--rule); color: var(--ink);
}
.pz-note-neutral > .pz-i { color: var(--ink-2); margin-top: 2px; flex-shrink: 0; }
.pz-locked-note {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 12px; margin-bottom: 14px;
    background-color: #f3f5f7; background-image: var(--hatch);
    border: 1px dashed var(--field); border-radius: var(--radius);
    font-size: 0.9rem; color: var(--ink);
}
/* Pastilles d'état du parc (console) : bleu, jaune, rouge, gris, jamais de vert. */
.pz-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.pz-dot-ok      { background: var(--blue); }
.pz-dot-warn    { background: var(--yellow); }
.pz-dot-bad     { background: var(--red); }
.pz-dot-unknown { background: var(--grey); }

/* ============================================================
   Tableaux
   ============================================================ */

.pz-table {
    width: 100%; border-collapse: collapse; background: var(--sheet);
    border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-1); font-size: 0.94rem;
}
.pz-fiche-flush > .pz-table { border: 0; border-radius: 0; box-shadow: none; }
.pz-table th {
    text-align: left; padding: 11px 16px;
    font-size: 0.75rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--ink-3); background: #f7f9fb; border-bottom: 1px solid var(--rule);
}
.pz-table td { padding: 12px 16px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
.pz-table tr:last-child td { border-bottom: 0; }
.pz-table tbody tr:hover td { background: #f8fafc; }
/* Cellule d'actions : reste une cellule (sinon la ligne perd sa bordure), boutons espacés. */
td.pz-row-actions { text-align: right; white-space: nowrap; }
td.pz-row-actions > * + * { margin-left: 6px; }
div.pz-row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pz-child-mark { color: var(--ink-3); }
.pz-cell-title a { display: block; font-weight: 700; color: var(--ink); }
.pz-cell-title a:hover { color: var(--blue-ink); }
.pz-cell-path { display: block; font-size: 0.8125rem; color: var(--ink-3); overflow-wrap: anywhere; }
.pz-sheet-sub .pz-cell-path { display: inline; }
.pz-cell-muted { color: var(--ink-2); font-size: 0.875rem; white-space: nowrap; }
/* Sous-pages : rattachées à leur rubrique par un trait d'arborescence. */
.pz-table-contents .pz-depth-1 .pz-cell-title { padding-left: 46px; position: relative; }
.pz-table-contents .pz-depth-2 .pz-cell-title { padding-left: 74px; position: relative; }
.pz-table-contents .pz-depth-1 .pz-cell-title::before,
.pz-table-contents .pz-depth-2 .pz-cell-title::before {
    content: ""; position: absolute; top: 0; height: 24px; width: 14px;
    border-left: 2px solid var(--board-2); border-bottom: 2px solid var(--board-2);
    border-bottom-left-radius: 6px;
}
.pz-table-contents .pz-depth-1 .pz-cell-title::before { left: 24px; }
.pz-table-contents .pz-depth-2 .pz-cell-title::before { left: 52px; }

/* ---- Création rapide ---- */
.pz-newform { display: flex; gap: 8px; align-items: center; }
.pz-newform input[type="text"], .pz-newform input[type="email"], .pz-newform input[type="password"] {
    min-width: 240px; width: auto; flex: 1;
}
.pz-newform-wrap { flex-wrap: wrap; }

/* ---- Création libellée (classement) : champs libellés au-dessus, bouton aligné en bas ---- */
.pz-createform { display: flex; align-items: flex-end; gap: 0 12px; flex-wrap: wrap; margin: 12px 0 6px; }
.pz-createform .pz-field { margin-bottom: 12px; }
.pz-createform-name { flex: 1 1 260px; }
.pz-createform-lang select { width: auto; }
.pz-createform .pz-btn { min-height: 42px; }

/* ---- Utilisateurs : lien d'invitation à copier ---- */
.pz-optional { font-weight: 400; color: var(--ink-3); }
.pz-invite { border-color: #b9cff3; }
.pz-copy-row { display: flex; gap: 8px; align-items: stretch; margin-top: 12px; }
.pz-copy-row .pz-copy { flex: 1 1 auto; min-width: 0; min-height: 42px; }
.pz-copy-row .pz-btn { min-height: 42px; }
.pz-copy-status { margin-top: 8px; font-size: 0.9rem; font-weight: 650; color: var(--blue-ink); }
.pz-copy-status:empty { display: none; }

/* ---- Classement : ligne en lecture, formulaire de modification déplié dessous ---- */
.pz-term-name { font-weight: 700; }
.pz-table-terms .pz-badge { margin: 0 4px 2px 0; }
.pz-js .pz-term-edit:not(.is-open) { display: none; }
html:not(.pz-js) [data-row-toggle] { display: none; }
.pz-table tbody tr.pz-term-edit, .pz-table tbody tr.pz-term-edit td, .pz-table tbody tr.pz-term-edit:hover td { background: #f7f9fb; }
.pz-term-form { padding: 4px 0 2px; }
.pz-term-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.pz-term-fields .pz-muted { margin-top: 5px; font-size: 0.8125rem; }
.pz-term-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.pz-term-buttons .pz-btn { min-height: 42px; }

/* ---- Diagnostic de référencement : une ligne de note, puis la liste des points ---- */
.pz-diag-score { font-size: 1.1rem; margin-bottom: 2px; }
.pz-diag-score strong { font-weight: 780; font-variant-numeric: tabular-nums; }
.pz-diag-group { margin-top: 18px; }
.pz-diag-group h4 {
    display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
    font-size: 0.97rem; font-weight: 750;
}
.pz-diag-group h4 .pz-i { width: 18px; height: 18px; flex-shrink: 0; }
.pz-diag-count { font-weight: 400; color: var(--ink-3); }
.pz-diag-grave h4 .pz-i { color: var(--yellow-ink); }
.pz-diag-moyen h4 .pz-i, .pz-diag-settings h4 .pz-i { color: var(--ink-2); }
.pz-diag-mineur h4 .pz-i, .pz-diag-hors h4 .pz-i { color: var(--ink-3); }
.pz-diag-list { list-style: none; }
.pz-diag-list li { padding: 9px 0; border-top: 1px solid var(--rule-2); }
.pz-diag-list li:first-child { border-top: 0; }
.pz-diag-list li > p.pz-muted { margin-top: 2px; max-width: 72ch; }
.pz-diag-what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.pz-diag-path { font-size: 0.875rem; overflow-wrap: anywhere; }
.pz-diag-note { font-size: 0.8125rem; color: var(--ink-3); }
.pz-diag-settings .pz-diag-what { flex-wrap: nowrap; align-items: flex-start; }
.pz-diag-settings .pz-diag-what .pz-i { width: 16px; height: 16px; margin-top: 3px; flex-shrink: 0; }
.pz-diag-settings .is-ok .pz-i { color: var(--blue); }
.pz-diag-settings .is-missing .pz-i { color: var(--yellow-ink); }
.pz-diag-settings .is-missing { color: var(--ink-2); }
.pz-diag-ok { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; color: var(--ink-2); }
.pz-diag-ok .pz-i { color: var(--blue); margin-top: 2px; flex-shrink: 0; }

/* ============================================================
   Éditeur : chaque bloc est une fiche à onglet
   ============================================================ */

.pz-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.pz-editor-side .pz-panel { padding: 16px 18px; }
.pz-sticky { position: sticky; top: 20px; z-index: 10; }
/* Les panneaux suivants défilent SOUS le panneau d'actions : deux bandes de la couleur du
   fond, au-dessus et en dessous, masquent leur texte au lieu de le laisser dépasser coupé
   au milieu d'une phrase (recette du 14/10/2026) ; le fondu du dessous dit qu'ils passent dessous. */
.pz-editor-side .pz-sticky::before,
.pz-editor-side .pz-sticky::after {
    content: ""; position: absolute; left: -1px; right: -1px; pointer-events: none;
}
.pz-editor-side .pz-sticky::before { bottom: 100%; height: 21px; background: var(--ground); }
.pz-editor-side .pz-sticky::after {
    top: 100%; height: 26px;
    background: linear-gradient(var(--ground) 30%, rgba(238, 242, 246, 0));
}
.pz-check .pz-child-mark { display: inline-flex; }
.pz-check .pz-child-mark .pz-i { width: 15px; height: 15px; }
.pz-arrow-item .pz-i { width: 15px; height: 15px; vertical-align: -3px; color: var(--ink-3); }

#pzBlocks { padding-top: 6px; }
.pz-block {
    position: relative; margin: 34px 0 0;
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-1);
    scroll-margin-top: 60px;
}
.pz-block-tab {
    position: absolute; left: -1px; bottom: 100%;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 14px 3px 8px;
    background: var(--board); color: var(--ink-2);
    border: 1px solid var(--rule); border-bottom: 0;
    border-radius: 8px 8px 0 0;
    font-size: 0.8125rem; font-weight: 750; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.pz-block.open .pz-block-tab, .pz-block:focus-within .pz-block-tab {
    background: var(--blue); border-color: var(--blue); color: #fff;
}
.pz-block-head { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 16px; }
.pz-bh-toggle {
    flex: 1; min-width: 0; min-height: 42px;
    display: flex; align-items: center; gap: 10px;
    background: none; border: 0; padding: 0; text-align: left; cursor: pointer;
    font: 650 1.02rem/1.3 var(--font); color: var(--ink);
}
.pz-bh-toggle:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.pz-bh-summary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-bh-summary.is-label { color: var(--ink-3); font-weight: 500; }
.pz-bh-chevron { color: var(--ink-3); transition: transform 0.2s ease-out; }
.pz-block.open .pz-bh-chevron { transform: rotate(180deg); }
.pz-bh-actions { position: relative; display: flex; gap: 2px; }
.pz-bh-menu { display: flex; gap: 2px; }
.pz-bh-actions .pz-bh-more { display: none; }
.pz-bh-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.pz-bh-actions button {
    display: grid; place-items: center; width: 38px; height: 38px;
    background: none; border: 1px solid transparent; border-radius: var(--radius);
    color: var(--ink-3); cursor: pointer;
}
.pz-bh-actions button:hover { background: var(--ground); color: var(--ink); }
.pz-bh-actions button:focus-visible { outline: none; box-shadow: var(--focus); }
.pz-bh-actions .pz-bh-del:hover { background: var(--red-tint); color: var(--red-ink); }
/* Seul le corps d'une fiche de bloc se replie : l'écran Apparence réutilise la classe pour
   ses champs, qui restaient invisibles tant que la règle visait toute .pz-block-body. */
.pz-block > .pz-block-body { display: none; padding: 18px 20px 20px; border-top: 1px solid var(--rule-2); }
.pz-block.open > .pz-block-body { display: block; }
.pz-block-locked { background-image: var(--hatch); background-color: #fafbfc; border-style: dashed; }
.pz-block.is-new { animation: pz-arrive 0.9s ease-out; }
@keyframes pz-arrive {
    from { box-shadow: 0 0 0 5px rgba(0, 87, 217, 0.35), var(--shadow-1); }
    to   { box-shadow: 0 0 0 0 rgba(0, 87, 217, 0), var(--shadow-1); }
}

/* Vignettes des blocs : un schéma de la mise en page, même format, même fond. */
.pz-glyph { display: block; width: 100%; height: auto; }
.pz-glyph-sm { width: 26px; height: 20px; }
.pz-glyph .g-photo { fill: #b9c8d7; }
.pz-glyph .g-ink { fill: #3a4957; }
.pz-glyph .g-line { fill: #95a3b1; stroke: #95a3b1; }
.pz-glyph .g-act { fill: var(--blue); }
.pz-glyph .g-frame { fill: #fff; stroke: #95a3b1; stroke-width: 1; }
.pz-glyph .g-band { fill: #d6e2f5; }
.pz-glyph .g-ink-stroke { stroke: #3a4957; }
.pz-block.open .pz-block-tab .g-photo,
.pz-block:focus-within .pz-block-tab .g-photo { fill: rgba(255, 255, 255, 0.45); }
.pz-block.open .pz-block-tab .g-ink,
.pz-block:focus-within .pz-block-tab .g-ink { fill: #fff; }
.pz-block.open .pz-block-tab .g-line,
.pz-block:focus-within .pz-block-tab .g-line { fill: rgba(255, 255, 255, 0.7); stroke: rgba(255, 255, 255, 0.7); }
.pz-block.open .pz-block-tab .g-act,
.pz-block:focus-within .pz-block-tab .g-act { fill: var(--yellow); }
.pz-block.open .pz-block-tab .g-frame,
.pz-block:focus-within .pz-block-tab .g-frame { fill: transparent; stroke: #fff; }
.pz-block.open .pz-block-tab .g-band,
.pz-block:focus-within .pz-block-tab .g-band { fill: rgba(255, 255, 255, 0.3); }
.pz-block.open .pz-block-tab .g-ink-stroke,
.pz-block:focus-within .pz-block-tab .g-ink-stroke { stroke: #fff; }

/* Ajouter un bloc : un tiroir de fiches vierges, chacune montre sa forme. */
.pz-add-block { margin-top: 28px; }
.pz-btn-add {
    width: 100%; min-height: 58px; font-size: 1rem;
    background: transparent; color: var(--ink-2);
    border: 2px dashed var(--field); border-radius: var(--radius-lg);
}
.pz-btn-add:hover, .pz-btn-add[aria-expanded="true"] {
    background: var(--blue-tint); border-color: var(--blue); color: var(--blue-ink);
}
.pz-drawer {
    margin-top: 12px; padding: 18px; scroll-margin-top: 16px;
    background: var(--board); border: 1px solid var(--board-2); border-radius: var(--radius-lg);
}
.pz-drawer-intro { margin-bottom: 14px; color: var(--ink-2); font-size: 0.94rem; }
.pz-drawer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.pz-tile {
    display: flex; flex-direction: column; gap: 3px;
    padding: 10px 10px 12px; text-align: left; cursor: pointer;
    background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius);
    font-family: var(--font); color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.pz-tile .pz-glyph {
    aspect-ratio: 4 / 3; margin-bottom: 8px; padding: 8px;
    background: #f1f5f8; border-radius: 4px;
}
.pz-tile strong { font-size: 0.97rem; font-weight: 750; }
.pz-tile span { font-size: 0.8125rem; line-height: 1.35; color: var(--ink-2); }
.pz-tile:hover { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 87, 217, 0.14); transform: translateY(-1px); }
.pz-tile:focus-visible { outline: none; border-color: var(--blue); box-shadow: var(--focus); }
/* Bloc réservé à l'opérateur : même hachure que dans le classeur, et le dit en toutes lettres. */
.pz-tile-operator { background-color: #f6f8fa; background-image: var(--hatch); border-style: dashed; }
.pz-tile-operator em { font-style: normal; font-size: 0.75rem; font-weight: 750; color: var(--ink-2); }
.pz-drawer:not([hidden]) { animation: pz-drawer-in 0.18s ease-out; }
@keyframes pz-drawer-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Listes répétables */
.pz-field-list > label { margin-bottom: 8px; }
.pz-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.pz-item {
    display: flex; gap: 10px; padding: 12px 10px 4px 14px;
    background: #f7f9fb; border: 1px solid var(--rule); border-radius: var(--radius);
}
.pz-item-fields { flex: 1; min-width: 0; }
.pz-item-fields .pz-field { margin-bottom: 10px; }
.pz-item-actions { display: flex; flex-direction: column; gap: 4px; }
.pz-item-actions button {
    display: grid; place-items: center; width: 32px; height: 32px;
    background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius);
    color: var(--ink-3); cursor: pointer;
}
.pz-item-actions button .pz-i { width: 16px; height: 16px; }
.pz-item-actions button:hover { border-color: var(--field); color: var(--ink); }
.pz-item-actions .pz-item-del:hover { border-color: var(--red); color: var(--red-ink); background: var(--red-tint); }
.pz-list-add { margin-top: 2px; }

/* Champ média */
.pz-media-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pz-media-thumb {
    width: 76px; height: 57px; flex-shrink: 0; border-radius: var(--radius);
    background: #f1f5f8 center / cover no-repeat;
    border: 1px dashed var(--field);
}
.pz-media-thumb.has-media { border: 1px solid var(--rule); }

/* Barre de mise en forme */
.pz-rich-bar { display: flex; gap: 4px; margin-bottom: 6px; }
.pz-rich-btn {
    display: grid; place-items: center; width: 34px; height: 32px;
    background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius);
    font: 0.9rem var(--font); color: var(--ink); cursor: pointer;
}
.pz-rich-btn .pz-i { width: 16px; height: 16px; }
.pz-rich-btn:hover { border-color: var(--blue); background: var(--blue-tint); }
.pz-rich-hint { margin-top: 5px; font-size: 0.8125rem; color: var(--ink-3); }

/* ============================================================
   Médiathèque et sélecteur
   ============================================================ */

.pz-upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Zone d'ajout : un libellé qui enveloppe le champ fichier. Cliquée, elle ouvre le choix
   des fichiers ; au clavier, le champ (masqué à l'œil seulement) prend le focus et la zone
   le montre ; sans script, le bouton « Envoyer » reste là. */
.pz-dropzone-form { margin-bottom: 22px; }
.pz-dropzone {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 26px 20px; text-align: center; cursor: pointer;
    background: var(--sheet); color: var(--ink);
    border: 2px dashed var(--field); border-radius: var(--radius-lg);
    transition: background 0.15s, border-color 0.15s;
}
.pz-dropzone:hover, .pz-dropzone.is-over { background: var(--blue-tint); border-color: var(--blue); }
.pz-dropzone:focus-within { border-color: var(--blue); box-shadow: var(--focus); }
.pz-dropzone-icon { width: 28px; height: 28px; color: var(--blue); }
.pz-dropzone-title { font-size: 1.05rem; font-weight: 750; }
.pz-dropzone-help { max-width: 60ch; font-size: 0.875rem; color: var(--ink-2); }
.pz-dropzone-input {
    position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0;
    clip: rect(0 0 0 0); clip-path: inset(50%);
}
.pz-dropzone-status { margin: 8px 0 0; font-size: 0.9rem; font-weight: 650; color: var(--ink-2); }
.pz-dropzone-status:empty { display: none; }
.pz-dropzone-form .pz-btn { margin-top: 10px; }
.pz-js .pz-dropzone-form [data-upload-submit] { display: none; }

.pz-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pz-media-item {
    background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-1);
}
.pz-media-item > img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; background: #f1f5f8; }
/* PNG (logos, transparence) : montré en entier, jamais recadré. */
/* Damier de transparence : un logo blanc (fait pour un en-tête sombre) disparaissait sur un
   fond clair uni. Les cases foncées font lire le blanc, les claires font lire le noir. */
.pz-media-item > img.is-contain {
    object-fit: contain; padding: 10px;
    background: repeating-conic-gradient(#9aa5b1 0% 25%, #d0d6dc 0% 50%) 50% / 16px 16px;
}
.pz-media-body { padding: 12px 12px 10px; }
.pz-media-usage { font-size: 0.875rem; font-weight: 700; color: var(--blue-ink); margin-bottom: 10px; }
.pz-media-usage.is-free { color: var(--ink-2); font-weight: 600; }
.pz-media-alt .pz-field { margin-bottom: 8px; }
.pz-media-help { margin-top: 4px; font-size: 0.8125rem; color: var(--ink-3); }
.pz-media-alt .pz-btn { min-height: 40px; }
.pz-media-meta {
    display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule-2);
}
.pz-media-blocker { flex: 1 1 100%; font-size: 0.8125rem; color: var(--ink-2); }

.pz-modal {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(20, 30, 40, 0.5);
}
.pz-modal[hidden] { display: none; }
.pz-modal-box {
    display: flex; flex-direction: column; overflow: hidden;
    width: 100%; max-width: 760px; max-height: 82vh;
    background: var(--sheet); border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
}
.pz-modal-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; border-bottom: 1px solid var(--rule);
}
.pz-modal-close {
    display: grid; place-items: center; width: 38px; height: 38px;
    background: none; border: 0; border-radius: var(--radius); color: var(--ink-2); cursor: pointer;
}
.pz-modal-close:hover { background: var(--ground); color: var(--ink); }
.pz-modal-body { padding: 16px; overflow-y: auto; }
.pz-modal-tools {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
    padding: 12px 18px; border-bottom: 1px solid var(--rule-2);
}
.pz-modal-status { flex: 1 1 100%; font-size: 0.875rem; font-weight: 650; color: var(--ink-2); }
.pz-modal-status:empty { display: none; }
.pz-modal-status.is-error { color: var(--red-ink); }
.pz-picker-item.is-selected { border-color: var(--blue); box-shadow: var(--focus); }
.pz-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.pz-picker-item {
    height: 92px; padding: 0; overflow: hidden; cursor: pointer;
    background: #f1f5f8; border: 2px solid var(--rule); border-radius: var(--radius);
}
.pz-picker-item:hover, .pz-picker-item:focus-visible { border-color: var(--blue); outline: none; }
.pz-picker-item img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Aperçu en direct : volet plein écran au-dessus de l'éditeur. Plein écran et non panneau
   latéral, parce qu'une page jugée dans 300 px de large ne dit rien de la vraie page. */
.pz-live { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; background: #fff; }
.pz-live[hidden] { display: none; }
/* Enfant de .pz-main : sans cette exception, la largeur du contenu (1180 px) bornait le volet. */
.pz-main > .pz-live { max-width: none; }
.pz-live-bar {
    display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
    padding: 10px 16px; background: var(--board); border-bottom: 1px solid var(--board-2);
}
.pz-live-bar .pz-muted { flex: 1 1 auto; font-size: 0.8125rem; }
.pz-live iframe { flex: 1 1 auto; width: 100%; border: 0; }

/* ============================================================
   Connexion : une fiche posée sur le carton
   ============================================================ */

.pz-login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px 16px; background: var(--board);
    background-image: repeating-linear-gradient(0deg, transparent 0 31px, rgba(29, 39, 49, 0.035) 31px 32px);
}
.pz-login-card {
    position: relative; width: 100%; max-width: 400px; margin-top: 26px;
    padding: 34px 32px 26px;
    background: var(--sheet); border: 1px solid var(--rule);
    border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-2);
}
.pz-login-card::before {
    content: ""; position: absolute; left: -1px; bottom: 100%;
    width: 132px; height: 22px; background: var(--blue); border-radius: 8px 8px 0 0;
}
.pz-brand-dot-lg { display: none; }
/* Onglet nommé : il recouvre l'onglet muet de ::before (gardé pour la console). */
.pz-login-tab {
    position: absolute; left: -1px; bottom: 100%; z-index: 1;
    min-width: 132px; padding: 3px 18px 3px 14px;
    background: var(--blue); color: #fff; border-radius: 8px 8px 0 0;
    font-size: 0.875rem; font-weight: 780; line-height: 20px;
}
/* Console : l'onglet prend le noir de sa famille (en-tête de la console), pas le bleu du backoffice. */
.pz-login-console::before, .pz-login-console .pz-login-tab { background: var(--black); }
.pz-login-intro { margin-bottom: 18px; }
.pz-login-card h1 { font-size: 1.4rem; margin-bottom: 2px; }
.pz-login-sub { color: var(--ink-2); margin-bottom: 22px; }
.pz-login-card form { text-align: left; }
.pz-login-card .pz-btn-block { min-height: 46px; margin-top: 6px; }
.pz-login-foot { margin-top: 16px; color: var(--ink-3); font-size: 0.875rem; }

/* ============================================================
   Console opérateur (en-tête horizontal conservé)
   ============================================================ */

.pz-header { position: sticky; top: 0; z-index: 50; background: var(--black); color: #fff; }
.pz-header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 16px;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap; min-height: 56px;
}
.pz-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 1rem; }
.pz-brand-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--blue); flex-shrink: 0; }
.pz-tabs { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.pz-tabs a {
    color: rgba(255, 255, 255, 0.78); padding: 17px 12px 15px; font-size: 0.9rem; font-weight: 650;
    border-bottom: 3px solid transparent;
}
.pz-tabs a:hover { color: #fff; text-decoration: none; }
.pz-tabs a.active { color: #fff; border-bottom-color: var(--yellow); }
.pz-header-right { display: flex; gap: 8px; align-items: center; }
.pz-header-right .pz-btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.pz-header ~ .pz-main { border-top: 0; max-width: 1200px; margin: 0 auto; }
.pz-settings > .pz-btn { margin-top: 4px; }
/* Fiche d'un site : la ligne d'état du parc, en tête. */
.pz-site-state {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px;
    list-style: none; margin: -12px 0 22px; color: var(--ink-2); font-size: 0.94rem;
}
.pz-site-state .pz-dot { margin-right: 4px; }
.pz-purge { margin-top: 22px; max-width: 62ch; }
.pz-purge .pz-muted { margin-top: 6px; }

/* ============================================================
   Écrans moyens et téléphone
   ============================================================ */

@media (max-width: 1180px) {
    .pz-desk { grid-template-columns: 1fr; }
}

@media (max-width: 899px) {
    .pz-app { display: block; }
    .pz-topbar {
        position: sticky; top: 0; z-index: 60;
        display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 8px;
        background: var(--board); border-bottom: 3px solid var(--group);
    }
    .pz-topbar-menu {
        display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
        background: var(--sheet); border: 1px solid var(--field); border-radius: var(--radius);
        font: 650 0.94rem var(--font); color: var(--ink); cursor: pointer;
    }
    .pz-topbar-site { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.97rem; }
    .pz-topbar-view { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink-2); }

    /* Sans script, le classeur reste affiché en haut de page : rien n'est inaccessible. */
    .pz-rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--board-2); }
    .pz-js .pz-rail {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 80;
        width: min(86vw, 320px); height: auto;
        transform: translateX(-102%); transition: transform 0.22s ease-out;
        box-shadow: var(--shadow-2);
    }
    .pz-nav-open .pz-rail { transform: none; }
    /* Fermé, le tiroir sort aussi de l'ordre du clavier (visibility), après son glissement. */
    .pz-js .pz-rail { visibility: hidden; transition: transform 0.22s ease-out, visibility 0s linear 0.22s; }
    .pz-nav-open .pz-rail { visibility: visible; transition: transform 0.22s ease-out; }
    .pz-js .pz-rail-close {
        display: flex; align-items: center; gap: 6px; width: max-content;
        min-height: 44px; margin: -12px -8px 10px auto; padding: 0 14px;
        background: var(--sheet); border: 1px solid var(--field); border-radius: var(--radius);
        font: 650 0.94rem var(--font); color: var(--ink); cursor: pointer;
    }
    .pz-rail-close:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--blue); }
    .pz-scrim { position: fixed; inset: 0; z-index: 70; display: block; background: rgba(20, 30, 40, 0.45); }
    .pz-scrim[hidden] { display: none; }
    .pz-divider a { padding-top: 11px; padding-bottom: 11px; }
    .pz-divider a.is-active { margin-right: 10px; border-radius: 0 var(--radius) var(--radius) 0; }

    .pz-main { padding: 20px 16px 120px; border-top: 0; }
    h1 { font-size: 1.45rem; }
    .pz-fiche, .pz-panel { padding: 16px; }
    .pz-grid-2 { grid-template-columns: 1fr; }
    .pz-newform { width: 100%; }
    .pz-newform input[type="text"] { min-width: 0; }

    .pz-queue a { grid-template-columns: 1fr auto; }
    .pz-queue-when { order: 2; }
    .pz-queue-what { grid-column: 1 / -1; white-space: normal; }
    .pz-rows li { grid-template-columns: minmax(0, 1fr) auto; }
    .pz-rows-kind { display: none; }
    .pz-rows-when { grid-column: 1 / -1; text-align: left; }

    /* Liste des pages : une ligne devient une petite fiche. */
    .pz-table-contents thead { display: none; }
    .pz-table-contents tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--rule-2); }
    .pz-table-contents tr:last-child { border-bottom: 0; }
    .pz-table-contents td { border: 0; padding: 4px 14px; }
    .pz-table-contents .pz-cell-title { grid-column: 1 / -1; padding-top: 12px; }
    .pz-table-contents .pz-cell-muted { display: none; }
    .pz-table-contents .pz-row-actions { padding-bottom: 12px; }
    .pz-table-contents td:nth-child(2) { padding-bottom: 12px; }
    .pz-table-contents .pz-depth-1 .pz-cell-title { padding-left: 40px; }
    .pz-table-contents .pz-depth-2 .pz-cell-title { padding-left: 62px; }
    .pz-table-contents .pz-depth-1 .pz-cell-title::before { left: 18px; }
    .pz-table-contents .pz-depth-2 .pz-cell-title::before { left: 40px; }

    /* Éditeur : Enregistrer reste sous le pouce, en bas de l'écran. */
    .pz-editor-grid { grid-template-columns: minmax(0, 1fr); }
    .pz-editor-side .pz-sticky {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60;
        display: flex; gap: 8px; margin: 0; padding: 10px 12px;
        border-radius: 0; border-width: 1px 0 0; box-shadow: 0 -4px 16px rgba(20, 35, 50, 0.1);
    }
    .pz-editor-side .pz-sticky .pz-btn-block { flex: 1; margin: 0; }
    .pz-editor-side .pz-sticky .pz-btn-quiet { display: none; }
    .pz-editor-side .pz-sticky::before, .pz-editor-side .pz-sticky::after { content: none; }
    .pz-block-head { padding-left: 12px; }
    .pz-block > .pz-block-body { padding: 16px 14px 18px; }
    .pz-drawer { padding: 12px; scroll-margin-top: 72px; }   /* sous la barre haute collante */
    .pz-drawer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .pz-tile span { display: none; }
    .pz-tile .pz-glyph { padding: 5px; margin-bottom: 4px; }
}

/* Tableaux au téléphone : une ligne devient une fiche, chaque valeur précédée de son
   intitulé (attribut data-label), les actions regroupées en bas de fiche. Même motif que
   la liste des pages, pour tous les autres tableaux (utilisateurs, corbeille, classement,
   redirections, versions, parc de la console). */
@media (max-width: 719px) {
    .pz-table-cards, .pz-table-cards tbody, .pz-table-cards tr, .pz-table-cards td { display: block; }
    .pz-table-cards thead { display: none; }
    .pz-table-cards tr { padding: 12px 14px; border-bottom: 1px solid var(--rule-2); }
    .pz-table-cards tr:last-child { border-bottom: 0; }
    .pz-table-cards tbody tr:hover td { background: none; }
    .pz-table-cards td { padding: 3px 0; border: 0; overflow-wrap: anywhere; }
    .pz-table-cards td[data-label]::before {
        content: attr(data-label); display: block;
        font-size: 0.8125rem; font-weight: 700; color: var(--ink-2);
    }
    .pz-table-cards td.pz-row-actions {
        display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px;
        text-align: left; white-space: normal;
    }
    .pz-table-cards td.pz-row-actions > * + * { margin-left: 0; }
    .pz-table-cards .pz-row-actions .pz-btn { min-height: 42px; padding: 8px 14px; }
    .pz-table-cards td.pz-empty { padding: 10px 0; }

    .pz-createform { flex-direction: column; align-items: stretch; }
    .pz-createform-name { flex: 0 0 auto; }
    .pz-createform-lang, .pz-createform-submit { align-self: flex-start; }
}

/* Console entre 720 et 1024 px : le tableau du parc reste un tableau mais doit tenir dans
   la largeur (il dépassait de 6 px à 768 px) : cellules resserrées, domaines coupables. */
@media (min-width: 720px) and (max-width: 1024px) {
    .pz-header ~ .pz-main .pz-table-cards th,
    .pz-header ~ .pz-main .pz-table-cards td { padding-left: 10px; padding-right: 10px; }
    .pz-header ~ .pz-main .pz-table-cards td { overflow-wrap: anywhere; }
}

/* Téléphone étroit : les actions d'une fiche passent derrière « Actions », pour laisser
   au résumé la largeur de la fiche ; la barre de l'aperçu garde son titre et ses boutons. */
@media (max-width: 599px) {
    .pz-js .pz-bh-actions .pz-bh-more { display: grid; }
    .pz-js .pz-bh-menu {
        display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 30;
        flex-direction: column; gap: 2px; min-width: 210px; padding: 6px;
        background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius);
        box-shadow: var(--shadow-2);
    }
    .pz-js .pz-bh-menu.is-open { display: flex; }
    .pz-js .pz-bh-menu button {
        display: flex; align-items: center; justify-content: flex-start; gap: 10px;
        width: 100%; height: 44px; padding: 0 12px;
        font: 650 0.94rem var(--font); color: var(--ink); text-align: left;
    }
    .pz-js .pz-bh-menu .pz-bh-text {
        position: static; width: auto; height: auto; overflow: visible;
        clip: auto; clip-path: none;
    }
    .pz-js .pz-bh-menu .pz-bh-del { color: var(--red-ink); }
    .pz-live-bar { gap: 8px; padding: 8px 10px; }
    .pz-live-bar strong { flex: 1 1 auto; white-space: nowrap; }
    .pz-live-bar .pz-muted { display: none; }
    .pz-copy-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Filtres par état (écran Signalements). */
.pz-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
