/* Pages Annonces récurrentes (liste, éditeur, aperçu Discord, image jointe).
   Ordre de chargement fixé dans index.html (ex-style.css découpé : ne pas le changer). */
/* =====================================================================
   Annonces récurrentes (liste, éditeur, aperçu Discord)
   ===================================================================== */
:root { --amber: #ffb020; }

.banner-warning { background: rgba(255, 176, 32, 0.1); border: 1px solid rgba(255, 176, 32, 0.4); color: #ffc95c; }
.btn-danger { color: #ff8fa3; border-color: rgba(255, 56, 96, 0.45); background: rgba(255, 56, 96, 0.1); }
.btn-danger:hover { background: rgba(255, 56, 96, 0.22); filter: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; transform: none; box-shadow: none; }

/* Teintes d'état : un seul jeu de variables partagé par la pastille, le liseré
   des cartes et les compteurs du résumé. */
.ann-badge-active, .ann-card-active, .ann-tone-active { --tone: #00e5ff; --tone-text: #00e5ff; --tone-bg: rgba(0, 229, 255, 0.13); }
.ann-badge-paused, .ann-card-paused, .ann-tone-paused { --tone: #8c93a6; --tone-text: #aab0c0; --tone-bg: rgba(140, 147, 166, 0.16); }
.ann-badge-errors, .ann-card-errors, .ann-tone-errors { --tone: #ff3860; --tone-text: #ff8fa3; --tone-bg: rgba(255, 56, 96, 0.14); }
.ann-badge-done, .ann-card-done, .ann-tone-done { --tone: #2ecc71; --tone-text: #7fe7ab; --tone-bg: rgba(46, 204, 113, 0.14); }
.ann-badge-missed, .ann-card-missed, .ann-tone-missed { --tone: #ffb020; --tone-text: #ffc95c; --tone-bg: rgba(255, 176, 32, 0.14); }

.ann-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 11px 3px 9px; border-radius: 999px;
  background: var(--tone-bg); color: var(--tone-text);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.ann-badge-dot, .ann-overview-chip .ann-badge-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--tone); box-shadow: 0 0 8px var(--tone);
}
.ann-badge-active .ann-badge-dot { animation: ann-pulse 2.4s ease-in-out infinite; }
@keyframes ann-pulse { 0%, 100% { box-shadow: 0 0 4px var(--tone); } 50% { box-shadow: 0 0 12px var(--tone), 0 0 3px var(--tone); } }

/* ---------- Liste ---------- */
.ann-header-actions { display: flex; align-items: center; gap: 12px; }
.ann-quota {
  background: var(--bg-elevated-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 12px; font-size: 13px; font-weight: 700; color: var(--text-muted);
}
.ann-notices:empty { display: none; }
.ann-notices .banner { margin-bottom: 12px; }

.ann-overview {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  margin-bottom: 18px; padding: 12px 16px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px;
}
.ann-overview-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ann-overview-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  background: var(--tone-bg); color: var(--tone-text); font-size: 13px;
}
.ann-overview-next { margin: 0; font-size: 14px; }

.ann-list { display: flex; flex-direction: column; gap: 16px; }
.ann-card {
  --tone: var(--text-muted);
  position: relative; display: flex; flex-direction: column;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 24px 18px 28px; overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ann-card::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 4px;
  background: var(--tone); box-shadow: 0 0 16px var(--tone); opacity: 0.9;
}
.ann-card:hover { border-color: #3a4054; }
.ann-card-paused::before, .ann-card-done::before { box-shadow: none; opacity: 0.55; }
.ann-card-paused .ann-card-title, .ann-card-done .ann-card-title { color: var(--text-muted); }

.ann-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.ann-tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px;
  background: var(--bg-elevated-2); border: 1px solid var(--border); color: var(--text-muted);
}
.ann-tag-channel { color: var(--text); font-weight: 700; }
.ann-tag-role { color: #c4a6ff; background: rgba(145, 70, 255, 0.14); border-color: rgba(145, 70, 255, 0.35); }
.ann-tag-warn { color: #ff8fa3; background: rgba(255, 56, 96, 0.12); border-color: rgba(255, 56, 96, 0.4); }

.ann-card-title { margin: 0 0 4px; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.ann-card-excerpt { margin: 0; color: var(--text-muted); font-size: 14px; overflow-wrap: anywhere; }
.ann-meta { margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; }
.ann-meta-item dt { margin-bottom: 2px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.ann-meta-item dd { margin: 0; font-size: 14px; }
.ann-card-error {
  margin-top: 14px; padding: 10px 14px; border-radius: 8px; font-size: 13.5px;
  background: rgba(255, 56, 96, 0.1); border: 1px solid rgba(255, 56, 96, 0.35); color: #ff8fa3;
  overflow-wrap: anywhere;
}
.ann-card-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}

/* Confirmation en deux temps, sur place (pas de confirm() natif) */
.ann-confirm { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ann-confirm.asking { padding: 3px 4px 3px 12px; border-radius: 10px; }
.ann-confirm-danger.asking { background: rgba(255, 56, 96, 0.08); border: 1px solid rgba(255, 56, 96, 0.3); }
.ann-confirm-info.asking { background: rgba(0, 229, 255, 0.07); border: 1px solid rgba(0, 229, 255, 0.28); }
.ann-confirm-question { font-size: 13px; font-weight: 700; }

/* ---------- État vide + modèles ---------- */
.ann-empty { text-align: center; padding: 40px 24px 36px; }
.ann-empty-art {
  width: 84px; height: 84px; margin: 0 auto 18px; display: grid; place-items: center;
  font-size: 38px; border-radius: 24px;
  background: radial-gradient(circle at 30% 20%, rgba(0, 229, 255, 0.22), rgba(145, 70, 255, 0.18));
  border: 1px solid rgba(0, 229, 255, 0.25); box-shadow: 0 0 40px rgba(0, 229, 255, 0.18);
}
.ann-empty h3 { font-family: var(--font-display); font-size: 17px; margin-bottom: 8px; }
.ann-empty p { max-width: 52ch; margin: 0 auto 20px; }
.ann-templates { margin-top: 28px; }
.ann-templates h4 { margin: 0 0 12px; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.ann-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ann-template {
  display: flex; flex-direction: column; gap: 4px; text-align: left; color: var(--text);
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.ann-template:hover { border-color: var(--cyan); box-shadow: 0 0 22px rgba(0, 229, 255, 0.12); transform: translateY(-2px); }
.ann-template-icon { font-size: 22px; margin-bottom: 4px; }
.ann-template-name { font-weight: 700; }
.ann-template-text { font-size: 13px; color: var(--text-muted); }

/* ---------- Éditeur ---------- */
.ann-editor-top { margin-bottom: 6px; }
.ann-back { padding-left: 0; }
.ann-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: 22px; align-items: start; }
.ann-editor-form { min-width: 0; }
.ann-editor-side {
  /* Le panneau principal a 28 px de marge en haut : la colonne se cale juste sous le bandeau. */
  position: sticky; top: 0; display: flex; flex-direction: column; gap: 18px;
  max-height: calc(100vh - 150px); overflow-y: auto; padding-bottom: 4px;
}
.ann-section { padding: 22px 24px 6px; margin-bottom: 18px; }
.ann-section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.ann-section-head h3 { margin: 0; font-size: 16px; }
.ann-section-head p { margin: 0; }
.ann-step {
  width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border-radius: 9px;
  font-family: var(--font-display); font-weight: 800; font-size: 14px; color: #0a0a0f;
  background: linear-gradient(135deg, var(--cyan), var(--violet)); box-shadow: 0 0 16px var(--glow-cyan);
}

.ann-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; min-width: 0; }
.ann-field-wide { grid-column: 1 / -1; }
.ann-label { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.ann-hint { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
.ann-hint-warn { color: var(--amber); }
.ann-hint-soft { font-style: italic; }
.ann-editor input[type="text"], .ann-editor input[type="number"], .ann-editor input[type="time"], .ann-editor input[type="date"],
.ann-editor textarea, .ann-editor select { max-width: 100%; }
.ann-editor input[type="time"], .ann-editor input[type="date"], .ann-editor input[type="number"] { max-width: 240px; }
.ann-editor input[type="time"], .ann-editor input[type="date"] {
  background: var(--bg-elevated-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; width: 100%; color-scheme: dark; transition: border-color 0.15s, box-shadow 0.15s;
}
.ann-editor input[type="time"]:focus, .ann-editor input[type="date"]:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}
.ann-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); column-gap: 24px; }
.ann-inline { display: flex; align-items: center; gap: 10px; }
.ann-inline input { max-width: 120px !important; }

/* Tuiles de choix (apparence, fréquence) */
.ann-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ann-tiles-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 1421px), (min-width: 821px) and (max-width: 1100px) {
  .ann-tiles-compact { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.ann-tile {
  display: flex; flex-direction: column; gap: 6px; text-align: left; color: var(--text);
  background: var(--bg-elevated-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.ann-tile:hover { border-color: #3d4457; }
.ann-tile[aria-pressed="true"] {
  border-color: var(--cyan);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(145, 70, 255, 0.07));
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.3), 0 0 22px rgba(0, 229, 255, 0.12);
}
.ann-tiles-compact .ann-tile { align-items: center; text-align: center; padding: 12px 8px; gap: 4px; }
.ann-tile-icon { font-size: 20px; }
.ann-tile-label { font-weight: 700; font-size: 14px; }
.ann-tile-text { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.ann-tile[aria-pressed="true"] .ann-tile-label { color: var(--cyan); }
.ann-tile-art {
  display: flex; flex-direction: column; justify-content: center; gap: 5px; height: 52px; margin-bottom: 4px;
  padding: 8px 12px; border-radius: 8px; background: #313338;
}
.ann-tile-art i { display: block; height: 5px; border-radius: 3px; background: #4e5058; }
.ann-tile-art i:nth-child(1) { width: 38%; background: #dbdee1; opacity: 0.85; }
.ann-tile-art i:nth-child(2) { width: 88%; }
.ann-tile-art i:nth-child(3) { width: 62%; }
.ann-art-embed { background: #2b2d31; border-left: 4px solid var(--cyan); border-radius: 3px 8px 8px 3px; }
.ann-art-plain i:nth-child(1) { width: 30%; }

/* Jauge de longueur */
.ann-meter { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.ann-meter-track { flex: 1; height: 4px; border-radius: 999px; background: var(--bg-elevated-2); overflow: hidden; }
.ann-meter-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width 0.15s; }
.ann-meter.warn .ann-meter-fill { background: var(--amber); }
.ann-meter.over .ann-meter-fill { background: var(--red); }
.ann-meter-label { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.ann-meter.warn .ann-meter-label { color: #ffc95c; }
.ann-meter.over .ann-meter-label { color: #ff8fa3; font-weight: 700; }

/* Barre de mise en forme */
.ann-toolbar {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 5px;
  background: var(--bg-elevated-2); border: 1px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0;
}
.ann-toolbar + textarea { border-top-left-radius: 0; border-top-right-radius: 0; min-height: 150px; }
.ann-format {
  min-width: 34px; height: 30px; padding: 0 9px; color: var(--text); font-size: 13px;
  background: none; border: 1px solid transparent; border-radius: 6px;
}
.ann-format:hover { background: var(--bg); border-color: var(--border); color: var(--cyan); }
.ann-format-bold { font-weight: 800; }
.ann-format-italic { font-style: italic; }
.ann-format-underline { text-decoration: underline; }
.ann-format-strike { text-decoration: line-through; }
.ann-format-code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 12px; }

/* Jours de la semaine et raccourcis */
.ann-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 460px; }
.ann-day {
  height: 44px; color: var(--text-muted); font-weight: 700; font-size: 13px;
  background: var(--bg-elevated-2); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}
.ann-day:hover { border-color: #3d4457; color: var(--text); }
.ann-day[aria-pressed="true"] {
  color: var(--cyan); border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.12); box-shadow: 0 0 14px rgba(0, 229, 255, 0.2);
}
.ann-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ann-chip {
  padding: 4px 12px; font-size: 12.5px; color: var(--text-muted);
  background: var(--bg-elevated-2); border: 1px solid var(--border); border-radius: 999px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.ann-chip:hover { border-color: var(--cyan); color: var(--text); }
.ann-chip[aria-pressed="true"] { color: var(--cyan); border-color: var(--cyan); background: rgba(0, 229, 255, 0.1); }

/* Colonne de droite : aperçu et prochains envois */
.ann-side-card { padding: 18px 20px 16px; }
.ann-side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ann-side-head h3 { margin: 0; font-size: 15px; }
.ann-preview-host { max-height: 54vh; overflow: auto; border-radius: 10px; margin-bottom: 10px; }
.ann-next-summary { margin: 0 0 12px; font-weight: 700; }
.ann-timeline { list-style: none; margin: 0 0 12px; padding: 0 0 0 20px; position: relative; }
.ann-timeline::before {
  content: ''; position: absolute; left: 5px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--cyan), rgba(145, 70, 255, 0.25));
}
.ann-timeline li { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; }
.ann-timeline li::before {
  content: ''; position: absolute; left: -20px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%);
  border-radius: 50%; background: var(--bg-elevated); border: 2px solid var(--violet);
}
.ann-timeline li:first-child::before { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 10px var(--glow-cyan); }
.ann-timeline-slot { font-weight: 700; font-size: 14px; }
.ann-timeline-rel { color: var(--text-muted); font-size: 12.5px; white-space: nowrap; }

/* Barre d'enregistrement flottante */
.ann-savebar {
  /* Le panneau principal réserve 100 px de marge en bas : un décalage négatif colle la barre au vrai bas de l'écran (12 px au-dessus). */
  position: sticky; bottom: calc(12px - 100px); z-index: 6; margin-top: 8px; padding: 12px 16px;
  background: rgba(22, 25, 34, 0.94); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
}
@supports (backdrop-filter: blur(8px)) { .ann-savebar { backdrop-filter: blur(8px); } }
.ann-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ann-dirty { font-size: 12.5px; color: var(--amber); }
.ann-step-alt { background: var(--bg-elevated-2); border: 1px solid var(--border); box-shadow: none; font-size: 15px; }
.ann-send { padding-bottom: 20px; }
.ann-send-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

/* ---------- Aperçu façon Discord ---------- */
.dc-preview {
  background: #313338; color: #dbdee1; border: 1px solid #1e1f22; border-radius: 10px; padding: 14px 14px 14px 12px;
  font-family: 'gg sans', 'Noto Sans', 'Inter', system-ui, sans-serif; font-size: 15px; line-height: 1.375;
}
.dc-message { display: flex; gap: 14px; }
.dc-avatar { width: 40px; height: 40px; flex-shrink: 0; margin-top: 2px; border-radius: 50%; object-fit: cover; }
.dc-body { min-width: 0; flex: 1; }
.dc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.dc-name { font-size: 16px; font-weight: 500; color: #f2f3f5; }
.dc-app {
  align-self: center; padding: 1px 5px; border-radius: 4px; background: #5865f2; color: #fff;
  font-size: 10px; font-weight: 600; line-height: 1.3;
}
.dc-time { font-size: 12px; color: #949ba4; }
.dc-line, .dc-heading, .dc-subtext, .dc-quote, .dc-item { overflow-wrap: anywhere; white-space: pre-wrap; }
.dc-line-empty { min-height: 1.375em; }
.dc-mention { padding: 0 2px; border-radius: 3px; background: rgba(88, 101, 242, 0.3); color: #c9cdfb; font-weight: 500; }
@supports (background: color-mix(in srgb, red 10%, transparent)) {
  .dc-mention-colored { background: color-mix(in srgb, var(--dc-role) 14%, transparent); color: var(--dc-role); }
}
.dc-heading { font-weight: 700; margin: 6px 0 2px; }
.dc-h1 { font-size: 1.5em; line-height: 1.2; }
.dc-h2 { font-size: 1.25em; line-height: 1.25; }
.dc-h3 { font-size: 1.1em; }
.dc-subtext { font-size: 12px; color: #949ba4; }
.dc-quote { border-left: 4px solid #4e5058; padding-left: 12px; border-radius: 2px; }
.dc-item { display: flex; gap: 8px; padding-left: 6px; }
.dc-depth-1 { padding-left: 22px; }
.dc-depth-2 { padding-left: 38px; }
.dc-marker { flex-shrink: 0; min-width: 1.1em; color: #b5bac1; }
.dc-code { padding: 1px 4px; border-radius: 3px; background: #2b2d31; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 85%; }
.dc-codeblock {
  margin: 4px 0; padding: 8px 10px; border: 1px solid #1e1f22; border-radius: 4px; background: #2b2d31;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.dc-link { color: #00a8fc; }
.dc-spoiler { border-radius: 3px; background: #1e1f22; color: transparent; cursor: pointer; user-select: none; }
.dc-spoiler.revealed { background: rgba(255, 255, 255, 0.1); color: inherit; user-select: text; }
.dc-placeholder { color: #949ba4; font-style: italic; }
.dc-embed {
  display: grid; gap: 8px; max-width: 520px; margin-top: 4px; padding: 8px 16px 14px 12px;
  background: #2b2d31; border-left: 4px solid #00e5ff; border-radius: 4px;
}
.dc-embed-author { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #f2f3f5; }
.dc-embed-icon { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.dc-embed-title { font-size: 16px; font-weight: 700; color: #f2f3f5; overflow-wrap: anywhere; }
.dc-embed-description { font-size: 14px; }
.dc-embed-footer { font-size: 12px; font-weight: 500; color: #b5bac1; }

/* ---------- Annonces : image jointe ---------- */
.ann-image { position: relative; }
.ann-image-input { display: none; }
.ann-dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 22px 16px; text-align: center;
  color: var(--text); background: var(--bg-elevated-2); border: 1.5px dashed #3d4457; border-radius: 12px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.ann-dropzone:hover, .ann-image.dragging .ann-dropzone {
  border-color: var(--cyan); background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(145, 70, 255, 0.06));
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.25), 0 0 22px rgba(0, 229, 255, 0.1);
}
.ann-dropzone:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.ann-dropzone-icon { font-size: 26px; line-height: 1; }
.ann-dropzone-title { font-weight: 700; font-size: 14px; }
.ann-dropzone-text { font-size: 12.5px; color: var(--text-muted); }
.ann-dropzone-formats { font-size: 11.5px; color: var(--text-muted); opacity: 0.85; }
.ann-dropzone-busy { flex-direction: row; justify-content: center; gap: 12px; cursor: progress; }
.ann-spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(0, 229, 255, 0.25); border-top-color: var(--cyan);
  animation: ann-spin 0.8s linear infinite;
}
@keyframes ann-spin { to { transform: rotate(360deg); } }
.ann-image-card { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--bg-elevated-2); border: 1px solid var(--border); border-radius: 12px; }
.ann-image.dragging .ann-image-card { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.25), 0 0 22px rgba(0, 229, 255, 0.1); }
.ann-image-card-missing { border-color: rgba(255, 176, 32, 0.5); }
.ann-image-thumb { width: 84px; height: 84px; flex-shrink: 0; border-radius: 8px; object-fit: cover; background: #0e1015; border: 1px solid var(--border); }
.ann-image-thumb-missing { display: grid; place-items: center; font-size: 28px; background: rgba(255, 176, 32, 0.1); border-color: rgba(255, 176, 32, 0.4); }
.ann-image-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ann-image-meta strong { font-size: 14px; }
.ann-image-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ann-hint-error { margin-top: 8px; color: #ff8fa3; font-weight: 600; }
.dc-embed-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 240px; margin-top: 2px; border-radius: 4px; }
.dc-attachment { margin-top: 4px; }
.dc-attachment-image { display: block; width: auto; height: auto; max-width: min(100%, 400px); max-height: 240px; border-radius: 8px; }
.dc-image-missing {
  padding: 18px 14px; border: 1px dashed #4e5058; border-radius: 6px; color: #949ba4; font-size: 13px; font-style: italic; text-align: center;
}

/* ---------- Annonces : écrans étroits ---------- */
@media (max-width: 1100px) {
  .ann-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .ann-editor-side { position: static; max-height: none; overflow: visible; }
  .ann-preview-host { max-height: 60vh; }
}
@media (max-width: 820px) {
  .ann-header-actions { width: 100%; justify-content: space-between; }
  .ann-card { padding: 18px 16px 16px 20px; }
  .ann-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
  .ann-meta-item:first-child { grid-column: 1 / -1; }
  .ann-tiles:not(.ann-tiles-compact) { grid-template-columns: minmax(0, 1fr); }
  .ann-tiles-compact { gap: 8px; }
  .ann-tiles-compact .ann-tile { padding: 10px 6px; }
  .ann-tiles-compact .ann-tile-label { font-size: 12.5px; }
  .ann-section { padding: 18px 16px 4px; }
  .ann-savebar { bottom: calc(8px - 100px); padding: 10px 12px; }
  .ann-actions { gap: 8px; }
  .ann-actions > .btn-primary { flex: 1 1 0; min-width: 0; }
  .ann-dirty { display: none; }
  .ann-card-actions .btn { flex: 1 1 auto; }
  .ann-confirm.asking { width: 100%; padding: 8px 10px; }
  .ann-overview { padding: 10px 12px; }
  .ann-image-card { flex-wrap: wrap; }
  .ann-image-meta { flex-basis: calc(100% - 100px); }
  .ann-image-actions { width: 100%; }
  .ann-image-actions .btn { flex: 1 1 auto; }
}

