/* ===========================
   Thème global beige / clair
   =========================== */

:root {
  --am-bg: #f7f0e6;
  --am-surface: #fdfaf5;
  --am-surface-strong: #f4e4ce;

  --am-border-subtle: #e4d5c1;
  --am-border-strong: #c9a982;

  --am-accent: #c8893c;
  --am-accent-soft: #f1e0c7;
  --am-accent-soft-strong: #e2c095;

  --am-text: #231811;
  --am-text-soft: #6f5a45;
  --am-text-softer: #9a856d;

  --am-radius-card: 14px;
  --am-radius-pill: 999px;
  --am-shadow-soft: 0 10px 30px rgba(32, 25, 16, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #fdf7ef 0, #f7f0e6 45%, #f3ebdf 100%);
  color: var(--am-text);
}

/* ===========================
   Mise en page générale
   =========================== */

.am-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

/* Intro / hero */

.am-hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.am-hero-inner {
  display: inline-block;
  max-width: 720px;
  text-align: left;
}

.am-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--am-text-softer);
  margin: 0 0 0.35rem;
}

.am-hero h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.am-hero-lead {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--am-text-soft);
}

.am-hero-meta {
  margin: 0;
  font-size: 0.86rem;
  color: var(--am-text-softer);
}

/* Barre de séparation */

.am-divider {
  border: 0;
  border-top: 1px solid var(--am-border-subtle);
  margin: 1.5rem auto 1.8rem;
  max-width: 720px;
}

/* Main */

.am-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ===========================
   Toolbar : filtres + bouton
   =========================== */

.am-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.am-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.am-toolbar-right {
  display: flex;
  align-items: center;
}

.am-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.am-field-label {
  color: var(--am-text-soft);
}

.am-select {
  min-width: 160px;
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--am-border-subtle);
  background: var(--am-surface);
  font-size: 0.84rem;
  color: var(--am-text);
  outline: none;
}



.am-select:focus {
  border-color: var(--am-accent);
  box-shadow: 0 0 0 1px rgba(200, 137, 60, 0.35);
}

.am-button-secondary {
  border-radius: 999px;
  border: 1px solid var(--am-border-subtle);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.45rem 0.9rem;
  font-size: 1rem;
  color: var(--am-text-soft);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.05s ease;
}

.am-button-secondary:hover {
  background: #f6ecdd;
  border-color: var(--am-border-strong);
}

.am-button-secondary:active {
  transform: translateY(1px);
}

/* ===========================
   Meta : compteur + statut
   =========================== */

.am-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
}

.am-count-text {
  margin: 0;
  color: var(--am-text-soft);
}

.am-count-text span {
  font-weight: 600;
  color: var(--am-text);
}

.am-status-text {
  margin: 0;
  color: var(--am-text-softer);
}

/* ===========================
   Résultats / cartes
   =========================== */

.am-results-wrapper {
  margin-top: 0.3rem;
  padding: 0 40px;
}

.am-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}


/* Carte */

.am-card {
  background: var(--am-surface);
  border-radius: var(--am-radius-card);
  border: 1px solid rgba(228, 213, 193, 0.9);
  box-shadow: var(--am-shadow-soft);
  padding: 0.85rem 0.9rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.am-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem;
}

.am-card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.am-card-title a {
  color: var(--am-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.am-card-title a:hover {
  border-bottom-color: rgba(35, 24, 17, 0.25);
}

.am-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

/* Badges de base */

.am-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.65rem;
  border-radius: var(--am-radius-pill);
  font-size: 0.72rem;
  line-height: 1.1;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* Type : ex Instagram, Podcast... */
.am-pill-type {
  background: rgba(200, 137, 60, 0.12);
  color: #5a351a;
  border-color: rgba(200, 137, 60, 0.4);
}

/* Pays */
.am-pill-country {
  background: rgba(12, 90, 160, 0.09);
  color: #10436a;
  border-color: rgba(12, 90, 160, 0.4);
}

/* Langue(s) */
.am-pill-lang {
  background: rgba(36, 132, 81, 0.11);
  color: #155637;
  border-color: rgba(36, 132, 81, 0.5);
}

/* Lien cliquable pour un badge (utilisé sur type) */
.am-pill-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.am-pill-link:hover {
  filter: brightness(0.96);
}

/* Description */

.am-card-desc {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--am-text-soft);
}

/* ===========================
   Messages (chargement / erreur)
   =========================== */

.am-message {
  grid-column: 1 / -1;
  padding: 0.75rem 1rem;
  background: #fff9e0;
  border-radius: var(--am-radius-card);
  border: 1px solid #f0d37a;
  font-size: 0.9rem;
  color: #6d5a26;
}

.am-message-error {
  background: #ffefef;
  border-color: #e36a6a;
  color: #7f2020;
}

/* Responsive léger */

@media (max-width: 640px) {
  .am-page {
    padding: 1.8rem 1.1rem 2.2rem;
  }

  .am-hero-inner {
    text-align: left;
  }
}

/* Centrage de l'intro */

.am-hero.am-hero--center {
  text-align: center;
}

.am-hero.am-hero--center .am-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

/* Optionnel : joli espacement */

.am-hero-title {
  margin-bottom: 0.75rem;
}

.am-hero-lead {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* === Overrides forts pour les couleurs de badges === */

.am-pill {
  ...
}

/* TYPE : ex. Instagram, Podcast… (orange) */
.am-pill-type {
  ...
}

/* PAYS (bleu) */
.am-pill-country {
  ...
}

/* LANGUE(S) (vert) */
.am-pill-lang {
  ...
}

/* Si le type est cliquable (lien) */
.am-pill-link {
  ...
}
