/**
 * ============================================================
 * STYLES — Chronologie des événements
 * ============================================================
 * Fichier : chron-style.css
 * À placer dans : /wp-content/themes/VOTRE-THEME/assets/css/
 *
 * Puis enqueuer dans functions.php :
 *
 *   add_action( 'wp_enqueue_scripts', function() {
 *       if ( is_page_template( 'page-chronologie.php' ) ) {
 *           wp_enqueue_style(
 *               'chron-style',
 *               get_template_directory_uri() . '/assets/css/chron-style.css',
 *               [],
 *               '1.0.0'
 *           );
 *       }
 *   });
 */

/* ── CONTENEUR ─────────────────────────────────────────────── */
#chron-main {
  padding: 2.5rem 0 4rem;
  min-width: 100%;
}

.chron-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── FORMULAIRE ─────────────────────────────────────────────── */
.chron-form {
  margin-bottom: 0;
}

.chron-search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.chron-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 80px 90px;
  gap: 10px;
}

.chron-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chron-filter-label {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #888;
  font-weight: 400;
}

/* Champs de saisie */
.chron-input {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #222;
  background: #fff;
  width: 100%;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.chron-input:focus {
  outline: none;
  border-color: #aaa;
}

.chron-input--full {
  flex: 1;
}

select.chron-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

/* Bouton valider */
.chron-btn-submit {
  height: 38px;
  padding: 0 1.25rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.chron-btn-submit:hover {
  background: #f5f5f5;
  border-color: #aaa;
}

/* ── SÉPARATEUR ─────────────────────────────────────────────── */
.chron-sep {
  border: none;
  border-top: 1px solid #ebebeb;
  margin: 2rem 0 1.5rem;
}

/* ── MÉTA RÉSULTATS ─────────────────────────────────────────── */
.chron-results-meta {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  margin-bottom: 1.75rem;
}

.chron-results-count {
  font-size: 13px;
  color: #888;
}

.chron-results-count strong {
  color: #222;
  font-weight: 500;
}

.chron-results-pages {
  font-size: 12px;
  color: #aaa;
}

/* ── LISTE D'ÉVÉNEMENTS ─────────────────────────────────────── */
.chron-list {
  display: flex;
  flex-direction: column;
}

.chron-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid #f0f0f0;
}

.chron-item:last-child {
  border-bottom: 1px solid #f0f0f0;
}

/* Colonne date */
.chron-date-col {
  padding-top: 2px;
}

.chron-date-debut {
  font-size: 13px;
  font-weight: 500;
  color: #222;
  line-height: 1.5;
  margin-bottom: 0;
}

.chron-date-fin {
  font-size: 12px;
  color: #3f3f3f;
  margin-top: 3px;
  line-height: 1.4;
}

/* Colonne info */
.chron-info-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chron-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  color: #888;
  border: 1px solid #e8e8e8;
  border-radius: 3px;
  padding: 1px 7px;
  letter-spacing: 0.02em;
  line-height: 1.8;
}

.chron-info {
  font-size: 14px;
  color: #333;
  line-height: 1.75;
}

/* Surlignage du mot-clé */
.chron-hl {
  background: transparent;
  color: #dd3333;
  font-weight: bold;
  padding: 0;
}

/* ── PAGINATION ─────────────────────────────────────────────── */
.chron-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.chron-page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  transition:
    background 0.12s,
    border-color 0.12s;
}

.chron-page-btn:hover {
  background: #f5f5f5;
  border-color: #e0e0e0;
  color: #222;
}

.chron-page-btn.is-active {
  border-color: #ccc;
  color: #222;
  font-weight: 500;
}

.chron-page-dots {
  font-size: 13px;
  color: #bbb;
  padding: 0 4px;
  line-height: 32px;
}

/* ── ÉTAT VIDE ──────────────────────────────────────────────── */
.chron-no-results {
  padding: 2rem 0;
  text-align: center;
}

.chron-no-results p {
  font-size: 14px;
  color: #888;
  margin-bottom: 0.75rem;
}

.chron-no-results a {
  font-size: 13px;
  color: #555;
  text-decoration: underline;
}

.chron-intro {
  font-size: 14px;
  color: #aaa;
  padding: 1.5rem 0;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .chron-filters {
    grid-template-columns: 1fr 1fr;
  }

  .chron-item {
    grid-template-columns: 1fr;
    gap: 0.4rem 0;
  }

  .chron-date-col {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
  }

  .chron-date-fin::before {
    content: "→ ";
  }
}

@media (max-width: 420px) {
  .chron-filters {
    grid-template-columns: 1fr;
  }
}
