/* ===========================
   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);
}

/* ═══════════════════════════════════════════════════════
   MENU NAVIGATION
   ═══════════════════════════════════════════════════════ */

.am-nav {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
}

.am-menu-btn {
  background: var(--am-cream, #fdf7ef);
  border: 2px solid var(--am-border, #e0d5c7);
  border-radius: 50px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--am-text, #3d3a35);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.am-menu-btn:hover {
  background: var(--am-sand, #f0e6d8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.am-menu-btn.active {
  background: var(--am-accent, #c45a3b);
  color: #fff;
  border-color: var(--am-accent, #c45a3b);
}

.am-menu-icon {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.am-menu-btn.active .am-menu-icon {
  transform: rotate(90deg);
}

.am-nav-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: var(--am-cream, #fdf7ef);
  border: 2px solid var(--am-border, #e0d5c7);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.25s ease;
}

.am-nav-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.am-nav-link {
  display: block;
  color: var(--am-text, #3d3a35);
  text-decoration: none;
  font-weight: 500;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  transition: all 0.15s ease;
  font-size: 0.9rem;
}

.am-nav-link:hover {
  background: var(--am-sand, #f0e6d8);
  padding-left: 1.3rem;
}

.am-nav-link.active {
  background: var(--am-accent, #c45a3b);
  color: #fff;
}

.am-nav-link.active:hover {
  background: #a84830;
  padding-left: 1.3rem;
}

.am-nav-separator {
  height: 1px;
  background: var(--am-border, #e0d5c7);
  margin: 0.4rem 0.5rem;
}

/* ===========================
   MODAL ZOOM CARTE
   =========================== */

#card-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.92);
  z-index: 99998;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

#card-modal.active {
  display: flex;
}

#card-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

#card-modal-body {
  background: transparent;
}

/* Carte style appli dans le modal */
#card-modal-body .am-card {
  max-width: 420px;
  width: 90vw;
  margin: 0 auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  border-radius: 16px;
  overflow: hidden;
}

#card-modal-body .am-card-visual {
  display: none;
}

#card-modal-body .am-card-body {
  width: 100%;
  padding: 2rem 1.5rem;
}

#card-modal-body .am-card-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

#card-modal-body .am-card-description {
  display: block;
  -webkit-line-clamp: unset;
  max-height: none;
  font-size: 1rem;
  line-height: 1.6;
}

#card-modal-body .am-card-tags {
  margin-top: 1.25rem;
}

#card-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  background: white;
  color: #333;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  z-index: 99999;
  display: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#card-modal-close:hover {
  background: #f0f0f0;
}

#card-modal.active #card-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile */
@media (max-width: 640px) {
  #card-modal-body .am-card {
    max-width: 95vw;
  }
  
  #card-modal-body .am-card-body {
    padding: 1.5rem 1rem;
  }
  
  #card-modal-body .am-card-title {
    font-size: 1.2rem;
  }
  
  #card-modal-close {
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
}
@media (max-width: 768px) {
  .am-menu-btn {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .am-menu-icon {
    font-size: 18px;
  }
}


/* ===========================
   CURSEUR PERSONNALISÉ
   =========================== */

html, body, * {
  cursor: none !important;
}

#custom-cursor {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #000;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: background-color 0.15s ease, width 0.15s ease, height 0.15s ease;
  will-change: left, top;
}

#custom-cursor.hovering {
  background-color: #444;
  width: 32px;
  height: 32px;
}

#custom-cursor.hovering-link {
  background-color: #e63946;
  width: 32px;
  height: 32px;
}

#custom-cursor.hidden {
  opacity: 0;
}

/* Désactiver curseur personnalisé sur appareils tactiles */
@media (hover: none) and (pointer: coarse) {
  #custom-cursor {
    display: none !important;
    visibility: hidden !important;
  }
  
  html, body, *, a, button, input, textarea {
    cursor: auto !important;
  }
}

/* ===========================
   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;
}

.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;
}

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

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

/* ===========================
  PAGE RESSOURCES
   =========================== */

<style> 
.am-card-actions { 
   display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; 
}

.am-btn { 
   display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.38rem 0.7rem; border-radius: 999px; font-size: 0.85rem; text-decoration: none; border: 1px solid var(--am-border-subtle);
   background: var(--am-surface-strong); color: var(--am-text); transition: transform 0.08s ease, box-shadow 0.12s ease; } 

.am-btn:hover { 
   transform: translateY(-2px); box-shadow: 0 6px 18px rgba(32,25,16,0.06); 
} 
.am-btn.primary { 
   background: var(--am-accent); color: #fff; border-color: var(--am-accent); 
} .am-btn.secondary { 
   background: var(--am-accent-soft); color: #5a351a; border-color: var(--am-accent-soft-strong); 
} 

/* Petite zone "tagline" pour chaque category */ 
am-category-legend { 
   margin: 0 0 0.6rem; color: var(--am-text-softer); font-size: 0.92rem;
} 

/* Fiche détaillée (utilise modal existant) : lien brochure */ 

.am-brochure-link { 
   display: inline-block; margin-top: 0.6rem; color: var(--am-text); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; 
                  } 

/* Petite icône visuelle pour carte (optionnel) */ 
.am-card-visual { 
   width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, rgba(200,137,60,0.12), rgba(226,192,149,0.12)); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--am-accent); margin-right: 0.5rem; 
} </style> 

    <style> 
/* -- minimal pour nouveaux éléments et pastilles de lien -- */ 
.am-filters { 
   display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin: 0.6rem 0 1rem; 
} 
.am-filters select, .am-filters 
.am-clear { 
   padding: 0.45rem 0.6rem; border-radius: 10px; border: 1px solid var(--am-border-subtle); background: var(--am-surface-strong); color: var(--am-text); font-weight: 600; 
}

/* Icone initiales séparée */
.am-card-left {
  display:flex;
  align-items:center;
  gap:0.5rem;
}
.am-card-visual {
  width:48px;
  height:48px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:var(--am-accent);
  background: linear-gradient(135deg, rgba(200,137,60,0.08), rgba(226,192,149,0.06));
  flex-shrink:0;
}

/* Déplacer titre sur une ligne à part */
.am-card-title {
  margin: 0;
  font-size: 1rem;
}

/* Pastilles de liens (gris, pas de doublons avec titre) */
.am-card-links {
  margin-top: 0.6rem;
  display:flex;
  gap:0.45rem;
  flex-wrap:wrap;
}
.am-card-links .am-pill-link {
  background: rgba(60,60,60,0.06);
  color: var(--am-text);
  border-color: rgba(60,60,60,0.06);
  font-size:0.78rem;
  padding:0.26rem 0.6rem;
  border-radius:999px;
  text-decoration:none;
}

/* Pastilles "clicables" filtre (type/lang) : pointer */
.am-pill.filterable { cursor: pointer; }

/* état actif filtre */
.am-pill.active-filter {
  background: var(--am-accent);
  color: #fff;
  border-color: var(--am-accent);
}

/* Petit bouton clear */
.am-clear {
  background: transparent;
  border: 1px dashed var(--am-border-subtle);
  color: var(--am-text-softer);
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  cursor: pointer;
}
</style>
