/* Comparer deux PDF : deux zones de dépôt, rapport texte (mots supprimés/ajoutés) ou visuel (pixels). */

.cmp-zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.cmp-zone { padding: 1.2rem 1rem; gap: .35rem; }
.cmp-zone.cmp-choisie { border-style: solid; border-color: var(--accent); background: var(--teinte-accent); }
.cmp-etiquette {
  display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
  letter-spacing: .02em; text-transform: uppercase;
}
.cmp-etiquette-a { background: #FDE2E2; color: #7F1D1D; }
.cmp-etiquette-b { background: #DCFCE7; color: #14532D; }
.cmp-nom { font-weight: 600; color: var(--texte); word-break: break-word; }
.cmp-inverser { min-height: 44px; }
.cmp-inverser:disabled, .cmp-rapport .bouton-secondaire:disabled { opacity: .4; cursor: default; }
.cmp-note { margin: 0; font-size: .85rem; color: var(--texte-doux); }

.cmp-rapport { display: grid; gap: .9rem; min-width: 0; padding-top: .4rem; border-top: 1px solid var(--bord); }
.cmp-entete-rapport { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.cmp-entete-rapport .bouton-secondaire { min-height: 44px; }
.cmp-resume { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.cmp-resume a, .cmp-lien-page { color: var(--accent-texte); font-weight: 600; }
.cmp-lien-page {
  background: none; border: 0; padding: .1rem .2rem; font: inherit; text-decoration: underline; cursor: pointer;
  min-width: 28px; min-height: 28px;
}
.cmp-legende { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .9rem; }

/* Mots supprimés : rouge + barré ; ajoutés : vert + souligné (jamais la couleur seule). */
.cmp-rapport del, .cmp-rapport ins { border-radius: 3px; padding: 0 .15em; color: var(--texte); }
.cmp-rapport del { background: rgba(220, 38, 38, .16); text-decoration: line-through 2px rgba(220, 38, 38, .9); }
.cmp-rapport ins { background: rgba(22, 163, 74, .18); text-decoration: underline 2px rgba(22, 163, 74, .95); text-underline-offset: 3px; }
:root:not([data-theme="clair"]) .cmp-rapport del { background: rgba(248, 113, 113, .22); text-decoration-color: #F87171; }
:root:not([data-theme="clair"]) .cmp-rapport ins { background: rgba(74, 222, 128, .2); text-decoration-color: #4ADE80; }
/* Annonce des modifications aux lecteurs d'écran (textes traduits posés par le script). */
.cmp-diff del::before, .cmp-diff ins::before, .cmp-diff del::after, .cmp-diff ins::after {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.cmp-diff del::before { content: var(--sr-debut-supp, ''); }
.cmp-diff ins::before { content: var(--sr-debut-ajout, ''); }
.cmp-diff del::after, .cmp-diff ins::after { content: var(--sr-fin, ''); }

.cmp-vue { display: grid; gap: .8rem; min-width: 0; }
.cmp-options { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem 1.5rem; }
.cmp-options legend { font-weight: 650; margin-bottom: .4rem; }
.cmp-vue fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.cmp-vue legend { font-weight: 650; margin-bottom: .4rem; padding: 0; }
.cmp-diff { display: grid; gap: .8rem; }
.cmp-page { border: 1px solid var(--bord); border-radius: 10px; padding: .7rem .9rem; background: var(--fond-champ); min-width: 0; }
.cmp-page.cmp-modifiee { border-left: 4px solid var(--accent); }
.cmp-page h3 { margin: 0 0 .5rem; font-size: 1rem; }
.cmp-anciennes { font-weight: 400; color: var(--texte-doux); font-size: .88rem; }
.cmp-badge { font-weight: 600; font-size: .78rem; color: var(--texte-doux); border: 1px solid var(--bord-fort); border-radius: 999px; padding: 0 .5rem; }
.cmp-texte { margin: 0; line-height: 1.7; overflow-wrap: anywhere; }
.cmp-vide { margin: 0; color: var(--texte-doux); font-style: italic; }
.cmp-cote { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.cmp-colonne { min-width: 0; }
.cmp-titre-colonne { margin: 0 0 .3rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; color: var(--texte-doux); }
@media (max-width: 600px) {
  .cmp-cote { grid-template-columns: 1fr; }
}

.cmp-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.cmp-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.cmp-nav .bouton-icone { width: 44px; height: 44px; font-size: 1.5rem; line-height: 1; }
.cmp-nav .bouton-secondaire { min-height: 44px; }
.cmp-numero { min-width: 7.5em; text-align: center; font-variant-numeric: tabular-nums; color: var(--texte-doux); }
.cmp-info { margin: 0; font-weight: 600; }
.cmp-scene { display: grid; justify-items: center; min-width: 0; }
.cmp-canvas { display: block; max-width: 100%; height: auto; background: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .3); }

.cmp-puce::before { content: ''; display: inline-block; width: .9em; height: .9em; margin-right: .35em; vertical-align: -.1em; border-radius: 2px; }
.cmp-puce-a::before { background: rgb(200, 30, 30); }
.cmp-puce-b::before { background: rgb(25, 100, 210); }
.cmp-puce-m::before { background: rgb(230, 120, 0); }
.cmp-puce-cadre::before { border: 2px dashed #E8590C; background: transparent; box-sizing: border-box; }

/* Groupes de choix (comme Image en PDF). */
.groupe-choix { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: .5rem; }
.groupe-choix legend { font-weight: 650; padding: 0; margin-bottom: .5rem; }
.groupe-choix .choix > label { min-height: 44px; box-sizing: border-box; }
