/* Agenda des luttes — styles publics.
   Les couleurs (--al-*) sont injectées par le plugin depuis les réglages. */

.al-wrap, .al-modal-bg { font-family: Arial, Helvetica, sans-serif; color: var(--al-text, #1a1a1a); line-height: 1.7; font-size: calc(16px * var(--al-s, 1)); }
.al-wrap *, .al-modal-bg * { box-sizing: border-box; }
.al-wrap { background: var(--al-bg, #f4f4f4); }

/* ---------- BOUTONS ---------- */
.al-wrap .al-btn, .al-modal-bg .al-btn {
  display: inline-block; background: var(--al-primary); color: var(--al-btn-text);
  font-family: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: calc(2.5px * var(--al-s, 1));
  padding: calc(24px * var(--al-s, 1)) calc(48px * var(--al-s, 1)); border: none; border-radius: 0; cursor: pointer; font-size: calc(24px * var(--al-s, 1)); line-height: 1.2;
  text-decoration: none; box-shadow: none; transition: filter .15s;
}
.al-wrap .al-btn:hover, .al-modal-bg .al-btn:hover { filter: brightness(.85); background: var(--al-primary); color: var(--al-btn-text); }
.al-wrap .al-btn:disabled, .al-modal-bg .al-btn:disabled { opacity: .6; cursor: wait; }
.al-barre { padding: calc(32px * var(--al-s, 1)) calc(32px * var(--al-s, 1)) 0; max-width: 1200px; margin: 0 auto; }

/* ---------- FILTRES ---------- */
.al-filters {
  background: var(--al-card); padding: calc(22px * var(--al-s, 1)) calc(32px * var(--al-s, 1)); display: flex; flex-wrap: wrap; gap: calc(18px * var(--al-s, 1)); align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.06); border-bottom: 3px solid #eee; margin-top: calc(32px * var(--al-s, 1));
}
.al-filters select, .al-filters input {
  font-family: inherit; padding: calc(18px * var(--al-s, 1)) calc(19px * var(--al-s, 1)); border: 2px solid #ccc; border-radius: 0; font-size: calc(21px * var(--al-s, 1));
  background: var(--al-card); color: var(--al-text); min-width: calc(220px * var(--al-s, 1)); line-height: 1.4; height: auto; margin: 0; box-shadow: none;
}
.al-filters input { flex: 1; min-width: calc(280px * var(--al-s, 1)); }
.al-filters select:focus, .al-filters input:focus { outline: none; border-color: var(--al-primary); }
.al-compteur { margin-left: auto; font-weight: 700; color: var(--al-primary); font-size: calc(21px * var(--al-s, 1)); white-space: nowrap; }

/* ---------- GRILLE ---------- */
.al-main { max-width: 1200px; margin: 0 auto; padding: calc(48px * var(--al-s, 1)) calc(32px * var(--al-s, 1)) calc(80px * var(--al-s, 1)); }
.al-grille { display: grid; grid-template-columns: repeat(2, 1fr); gap: calc(32px * var(--al-s, 1)); }

.al-carte {
  background: var(--al-card); box-shadow: 0 6px 20px rgba(0,0,0,.10); overflow: hidden; display: flex; flex-direction: column;
  border-left: 11px solid var(--c, var(--al-muted)); transition: box-shadow .15s; cursor: pointer;
}
.al-carte:hover { box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.al-carte:focus-visible { outline: 3px solid var(--al-primary); outline-offset: 2px; }
.al-carte-body { padding: calc(29px * var(--al-s, 1)); display: flex; flex-direction: column; gap: calc(14px * var(--al-s, 1)); flex: 1; }

.al-badges { display: flex; flex-wrap: wrap; gap: calc(10px * var(--al-s, 1)); }
.al-badge { font-size: calc(16px * var(--al-s, 1)); font-weight: 700; text-transform: uppercase; letter-spacing: .calc(5px * var(--al-s, 1)); padding: calc(6px * var(--al-s, 1)) calc(14px * var(--al-s, 1)); color: var(--ct, #fff); background: var(--c, var(--al-muted)); }
.al-badge.al-acteur { background: #eaeaea; color: #222; }

.al-wrap .al-carte h3 { font-size: calc(26px * var(--al-s, 1)); margin: calc(6px * var(--al-s, 1)) 0; line-height: 1.3; font-weight: 700; color: var(--al-text); }
.al-meta { font-size: calc(18px * var(--al-s, 1)); color: #444; margin: 0; }
.al-meta strong { color: var(--al-text); }
.al-description { font-size: calc(19px * var(--al-s, 1)); color: #222; flex: 1; margin: 0; white-space: pre-line; }

.al-carte-foot {
  padding: calc(19px * var(--al-s, 1)) calc(29px * var(--al-s, 1)); background: #fafafa; border-top: 2px solid #eee; display: flex; justify-content: space-between;
  align-items: center; gap: calc(13px * var(--al-s, 1)); flex-wrap: wrap;
}
.al-carte-foot a { color: var(--al-primary); font-weight: 700; text-decoration: none; font-size: calc(18px * var(--al-s, 1)); }
.al-carte-foot a:hover { text-decoration: underline; }
.al-wrap .al-signal, .al-modal-bg .al-signal {
  background: none; border: none; color: #888; cursor: pointer; font-size: calc(16px * var(--al-s, 1)); text-decoration: underline;
  font-family: inherit; padding: calc(6px * var(--al-s, 1)) calc(4px * var(--al-s, 1)); font-weight: 400; letter-spacing: 0; text-transform: none; box-shadow: none;
}
.al-wrap .al-signal:hover, .al-modal-bg .al-signal:hover { color: var(--al-primary); background: none; }

.al-vide { grid-column: 1 / -1; text-align: center; padding: calc(72px * var(--al-s, 1)) calc(16px * var(--al-s, 1)); color: var(--al-muted); font-style: italic; font-size: calc(24px * var(--al-s, 1)); }

/* ---------- MODALES ---------- */
.al-modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: center; justify-content: center; z-index: 100000; padding: calc(22px * var(--al-s, 1)); }
.al-modal-bg.al-open { display: flex; }
.al-modal { background: var(--al-card); max-width: 860px; width: 100%; max-height: 93vh; overflow-y: auto; padding: calc(51px * var(--al-s, 1)); position: relative; }
.al-modal h2 { font-family: inherit; font-size: calc(48px * var(--al-s, 1)); margin: 0 0 calc(8px * var(--al-s, 1)); text-transform: uppercase; letter-spacing: calc(1px * var(--al-s, 1)); line-height: 1; font-weight: 900; color: var(--al-text); }
.al-sous { font-size: calc(20px * var(--al-s, 1)); color: var(--al-muted); margin: 0 0 calc(35px * var(--al-s, 1)); }
.al-modal .al-fermer {
  position: absolute; top: calc(16px * var(--al-s, 1)); right: calc(22px * var(--al-s, 1)); background: none; border: none; font-size: calc(45px * var(--al-s, 1)); cursor: pointer;
  color: #999; line-height: 1; font-family: inherit; padding: 0; box-shadow: none;
}
.al-modal .al-fermer:hover { color: var(--al-primary); background: none; }

.al-champ { margin-bottom: calc(26px * var(--al-s, 1)); }
.al-champ label { display: block; font-weight: 700; font-size: calc(20px * var(--al-s, 1)); margin-bottom: calc(10px * var(--al-s, 1)); text-transform: uppercase; letter-spacing: .calc(4px * var(--al-s, 1)); }
.al-champ input, .al-champ select, .al-champ textarea {
  width: 100%; padding: calc(18px * var(--al-s, 1)) calc(19px * var(--al-s, 1)); border: 2px solid #ccc; border-radius: 0; font-family: inherit; font-size: calc(21px * var(--al-s, 1));
  color: var(--al-text); background: var(--al-card); line-height: 1.4; height: auto; margin: 0; box-shadow: none;
}
.al-champ input:focus, .al-champ select:focus, .al-champ textarea:focus { outline: none; border-color: var(--al-primary); }
.al-champ textarea { resize: vertical; min-height: calc(160px * var(--al-s, 1)); }
.al-champ.al-duo { display: grid; grid-template-columns: 1fr 1fr; gap: calc(22px * var(--al-s, 1)); }
.al-champ.al-duo > div { display: flex; flex-direction: column; }
.al-champ input::placeholder, .al-champ textarea::placeholder, .al-filters input::placeholder { color: #999; opacity: 1; }
.al-champ .al-invalid, .al-champ input:invalid.al-touched { border-color: #c00; }

.al-options { display: flex; flex-direction: column; gap: calc(11px * var(--al-s, 1)); margin: calc(16px * var(--al-s, 1)) 0 calc(22px * var(--al-s, 1)); }
.al-option, .al-check { display: flex; gap: calc(11px * var(--al-s, 1)); align-items: center; font-size: calc(18px * var(--al-s, 1)); color: #333; cursor: pointer; }
.al-check { gap: calc(14px * var(--al-s, 1)); margin: calc(29px * var(--al-s, 1)) 0 calc(19px * var(--al-s, 1)); }
.al-option input, .al-check input { transform: scale(1.2); cursor: pointer; margin: 0; flex-shrink: 0; }
.al-submit-row { display: flex; justify-content: flex-end; margin-top: calc(26px * var(--al-s, 1)); }

.al-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.al-confirmation { background: #e8f5e9; border-left: 6px solid #2a9d8f; padding: calc(21px * var(--al-s, 1)) calc(26px * var(--al-s, 1)); font-size: calc(21px * var(--al-s, 1)); margin-bottom: calc(27px * var(--al-s, 1)); display: none; color: #222; }
.al-erreur { background: #fdecea; border-left: 6px solid #c00; padding: calc(21px * var(--al-s, 1)) calc(26px * var(--al-s, 1)); font-size: calc(19px * var(--al-s, 1)); margin-bottom: calc(27px * var(--al-s, 1)); display: none; color: #222; }
.al-confirmation.al-show, .al-erreur.al-show { display: block; }

/* ---------- DÉTAIL ---------- */
.al-detail-header { border-left: 11px solid var(--c, var(--al-muted)); padding-left: calc(22px * var(--al-s, 1)); margin-bottom: calc(29px * var(--al-s, 1)); }
.al-modal .al-detail-header h2 { font-size: calc(35px * var(--al-s, 1)); text-transform: none; letter-spacing: 0; margin-top: calc(13px * var(--al-s, 1)); line-height: 1.2; }
.al-detail-meta { display: flex; flex-direction: column; gap: calc(14px * var(--al-s, 1)); margin-bottom: calc(32px * var(--al-s, 1)); }
.al-detail-meta p { font-size: calc(20px * var(--al-s, 1)); color: #333; margin: 0; }
.al-detail-meta strong { color: var(--al-text); }
.al-detail-desc { font-size: calc(21px * var(--al-s, 1)); color: #222; margin-bottom: calc(32px * var(--al-s, 1)); padding: calc(26px * var(--al-s, 1)); background: var(--al-bg); border-left: 4px solid var(--al-muted); white-space: pre-line; }
.al-detail-contact { margin-bottom: calc(32px * var(--al-s, 1)); font-size: calc(20px * var(--al-s, 1)); word-break: break-word; }
.al-detail-contact a { color: var(--al-primary); font-weight: 700; text-decoration: none; }
.al-detail-contact a:hover { text-decoration: underline; }
.al-detail-actions { display: flex; gap: calc(16px * var(--al-s, 1)); flex-wrap: wrap; margin-top: calc(32px * var(--al-s, 1)); align-items: center; }
.al-modal-bg .al-btn-secondary {
  display: inline-block; background: none; color: var(--al-text); font-family: inherit; font-weight: 700; text-transform: uppercase;
  letter-spacing: calc(2.5px * var(--al-s, 1)); padding: calc(19px * var(--al-s, 1)) calc(38px * var(--al-s, 1)); border: 2px solid #ccc; border-radius: 0; cursor: pointer; font-size: calc(19px * var(--al-s, 1)); box-shadow: none;
}
.al-modal-bg .al-btn-secondary:hover { border-color: var(--al-text); background: none; color: var(--al-text); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) { .al-grille { grid-template-columns: 1fr; } }
@media (max-width: 800px) {
  .al-barre { padding: calc(22px * var(--al-s, 1)) calc(22px * var(--al-s, 1)) 0; }
  .al-wrap .al-carte h3 { font-size: calc(29px * var(--al-s, 1)); }
  .al-description { font-size: calc(21px * var(--al-s, 1)); }
  .al-meta { font-size: calc(20px * var(--al-s, 1)); }
  .al-badge { font-size: calc(17px * var(--al-s, 1)); }
  .al-filters { padding: calc(18px * var(--al-s, 1)); }
  .al-filters select, .al-filters input { font-size: calc(22px * var(--al-s, 1)); width: 100%; min-width: 0; }
  .al-compteur { margin-left: 0; width: 100%; text-align: center; font-size: calc(22px * var(--al-s, 1)); }
  .al-champ.al-duo { grid-template-columns: 1fr; }
  .al-modal { padding: calc(35px * var(--al-s, 1)) calc(26px * var(--al-s, 1)); }
  .al-modal h2 { font-size: calc(38px * var(--al-s, 1)); }
  .al-modal .al-detail-header h2 { font-size: calc(29px * var(--al-s, 1)); }
  .al-detail-actions { flex-direction: column; align-items: stretch; }
  .al-submit-row .al-btn { width: 100%; }
  .al-wrap .al-btn, .al-modal-bg .al-btn { padding: calc(19px * var(--al-s, 1)) calc(32px * var(--al-s, 1)); font-size: calc(21px * var(--al-s, 1)); }
  .al-main { padding: calc(32px * var(--al-s, 1)) calc(18px * var(--al-s, 1)) calc(56px * var(--al-s, 1)); }
}

/* ---------- FORMULAIRE EN PAGE AUTONOME (URL dédiée) ---------- */
.al-modal-bg.al-inline { position: static; display: block; background: none; padding: 22px; width: 100%; max-width: 920px; }
.al-modal-bg.al-inline .al-modal { max-height: none; box-shadow: 0 6px 20px rgba(0,0,0,.10); }
.al-modal-bg.al-inline .al-fermer { display: none; }
.al-embed.al-solo { min-height: 0 !important; padding: 0 !important; display: block !important; }
.al-embed .al-modal-bg.al-inline { padding: 0; max-width: none; }
.al-embed .al-modal { box-shadow: none !important; }

/* Le thème souligne parfois les liens : un bouton ne doit jamais l'être */
.al-wrap a.al-btn, .al-wrap a.al-btn:hover, .al-wrap a.al-btn:focus, .al-wrap a.al-btn:visited,
.al-modal-bg a.al-btn, .al-modal-bg a.al-btn:hover { text-decoration: none !important; color: var(--al-btn-text) !important; border-bottom: 0 !important; box-shadow: none !important; }

/* --- Pièces jointes --- */
.al-pj-champ input[type=file] { width: 100%; padding: calc(10px * var(--al-s, 1)); border: 2px dashed var(--al-muted); background: var(--al-card); font-size: calc(16px * var(--al-s, 1)); cursor: pointer; box-sizing: border-box; }
.al-pj-help { margin: calc(8px * var(--al-s, 1)) 0 0; font-size: calc(15px * var(--al-s, 1)); color: var(--al-muted); }
.al-pj-liste, .al-pj-dl { list-style: none; margin: calc(8px * var(--al-s, 1)) 0 0; padding: 0; }
.al-pj-liste li, .al-pj-dl li { margin: calc(4px * var(--al-s, 1)) 0; font-size: calc(17px * var(--al-s, 1)); word-break: break-word; }
.al-pj-size { color: var(--al-muted); font-size: .9em; }
.al-detail-pj { margin-bottom: calc(32px * var(--al-s, 1)); font-size: calc(20px * var(--al-s, 1)); }
.al-detail-pj a { color: var(--al-primary); font-weight: 700; text-decoration: none; }
.al-detail-pj a:hover { text-decoration: underline; }
.al-pj-count { font-size: calc(16px * var(--al-s, 1)); color: var(--al-muted); white-space: nowrap; }
