/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Éditeur de texte enrichi (Lexxy, D161) aux couleurs de la charte. Les jetons `--lexxy-*` pilotent la gem. */
:root {
  --lexxy-color-ink: #1f2933;
  --lexxy-color-ink-medium: #3e4c59;
  --lexxy-color-accent-dark: #255b70;
  --lexxy-color-link: #255b70;
  --lexxy-color-selected: #eef3c8;
  --lexxy-color-selected-hover: #e2ea9b;
}

/* Sans JavaScript l'éditeur n'est pas défini : on n'affiche que le champ de repli. Avec JavaScript, l'inverse. */
lexxy-toolbar:not(:defined), lexxy-editor:not(:defined) { display: none; }
.rich-text-fallback { display: block; }
.rich-text-label-js { display: none; }
.rich-text-field:has(lexxy-editor:defined) .rich-text-label-js { display: block; }
.rich-text-field:has(lexxy-editor:defined) .rich-text-label-nojs { display: none; }
lexxy-editor:defined ~ .rich-text-fallback { display: none; }
.rich-text-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
/* Barre d'outils plus légère que les boutons du formulaire : un outil d'écriture, pas une action. */
.rich-text-button {
  min-height: 2.75rem; padding: 0.25rem 0.75rem; border: 1px solid #64748b; border-radius: 0.25rem;
  background: #f8fafc; color: #1e293b; cursor: pointer;
}
.rich-text-button:hover { background: #eef3c8; }
.rich-text-button:focus-visible { outline: 2px solid #255b70; outline-offset: 2px; }
.rich-text-editor:defined { display: block; margin-top: 0.5rem; min-height: 12rem; border: 2px solid #52606d; border-radius: 0.25rem; padding: 0.5rem 0.75rem; }
.rich-text-editor:focus-within { outline: 2px solid #255b70; outline-offset: 2px; }
.rich-text-editor .lexxy-editor__content { min-height: 10rem; overflow-wrap: anywhere; }
