/* Composants réutilisables — buttons, chips, cards, accents */

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 26px;
  font-family: var(--font-titre);
  font-weight: var(--fw-medium);
  font-size: var(--fs-corps);
  line-height: 1;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.btn--primary {
  background: var(--theme-color, var(--vert-deau));
  color: var(--beige);
}
.btn--primary:hover { background: var(--vert-deau-dark); }
.theme-pro .btn--primary:hover { background: #000; }

.btn--secondary {
  background: transparent;
  color: var(--theme-color, var(--vert-deau));
  border-color: var(--theme-color, var(--vert-deau));
}
.btn--secondary:hover {
  background: var(--theme-color, var(--vert-deau));
  color: var(--beige);
}

.btn--text {
  background: transparent;
  color: var(--theme-color, var(--vert-deau));
  padding: 8px 0;
  border-radius: 0;
  font-weight: var(--fw-medium);
}
.btn .arrow {
  display: inline-block;
  transition: transform .25s ease;
}
.btn--text:hover .arrow,
.btn:hover .arrow { transform: translate(3px, -3px); }

/* ===== Chips / Badges ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  font-family: var(--font-titre);
  font-weight: var(--fw-medium);
  font-size: var(--fs-chip);
  line-height: 1.2;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  background: var(--lime);
  color: var(--foret);
  white-space: nowrap;
}

.chip--neon      { background: var(--vert-neon); color: var(--foret); }
.chip--vert-deau { background: var(--vert-deau); color: var(--beige); }
.chip--foret     { background: var(--foret);     color: var(--beige); }
.chip--brun      { background: var(--brun);      color: var(--beige); }
.chip--lime      { background: var(--lime);      color: var(--foret); }
.chip--beige     { background: var(--beige);     color: var(--foret); }

.chip--outline {
  background: transparent;
  color: var(--vert-deau);
  border: 1px solid var(--foret-15);
}

.chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* ===== Cards ===== */
.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--foret-08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  border-color: var(--vert-deau);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -16px rgba(15, 33, 9, 0.18);
}

.card__media {
  aspect-ratio: 16 / 10;
  margin: calc(var(--space-6) * -1) calc(var(--space-6) * -1) var(--space-5);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(135deg, var(--lime), color-mix(in srgb, var(--vert-neon) 35%, var(--lime)));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vert-deau);
  font-family: var(--font-notes);
  font-size: var(--fs-notes);
  overflow: hidden;
}

.card__chip {
  align-self: flex-start;
  margin-bottom: var(--space-3);
}

.card__title {
  margin-bottom: var(--space-3);
  color: var(--vert-deau);
}

.card__excerpt {
  color: var(--brun);
  margin-bottom: var(--space-5);
  flex-grow: 1;
}

.card__footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* metier-card must be positioned to accept the .badge-bientot pseudo-overlay */
.metier-card { position: relative; }

/* ===== Entry cards (section d'aperçu sur la Home) ===== */
.entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-6) var(--space-6);
  border-radius: var(--radius-xl);
  min-height: 320px;
  transition: transform .3s ease, box-shadow .3s ease;
  text-decoration: none;
}
.entry-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -20px rgba(15, 33, 9, 0.22);
}

.entry-card__chip { align-self: flex-start; margin-bottom: var(--space-2); }

.entry-card__title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  line-height: 1.15;
}

.entry-card__desc {
  opacity: 0.88;
  flex-grow: 1;
  font-size: var(--fs-corps);
  max-width: 32ch;
}

.entry-card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-titre);
  font-weight: var(--fw-medium);
  margin-top: var(--space-2);
}
.entry-card__cta .arrow { transition: transform .25s ease; }
.entry-card:hover .entry-card__cta .arrow { transform: translate(4px, -4px); }

.entry-card--decouvrir {
  background: var(--beige);
  border: 1.5px solid var(--vert-deau);
  color: var(--vert-deau);
}
.entry-card--apprenti {
  background: var(--lime);
  color: var(--vert-deau);
}
.entry-card--pro {
  background: var(--foret);
  color: var(--beige);
}

/* ===== Accents typographiques ===== */
.u-neon {
  background-image: linear-gradient(transparent 62%, var(--vert-neon) 62%, var(--vert-neon) 92%, transparent 92%);
  padding-inline: 4px;
  display: inline;
  line-height: inherit;
}

.u-lime {
  background-image: linear-gradient(transparent 62%, var(--lime) 62%, var(--lime) 92%, transparent 92%);
  padding-inline: 4px;
  display: inline;
}

.dot-neon {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--vert-neon);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== État désactivé (liens vers pages pas encore créées) ===== */
.is-disabled {
  cursor: not-allowed;
  position: relative;
}
/* On mute le contenu mais on laisse le badge-bientot intact */
.is-disabled > *:not(.badge-bientot) {
  opacity: 0.55;
  filter: grayscale(0.45);
}
.is-disabled:hover,
.is-disabled:focus-visible {
  transform: none !important;
  box-shadow: none !important;
  border-color: var(--foret-08) !important;
}
.is-disabled .arrow,
.is-disabled:hover .arrow {
  transform: none !important;
}

/* Variante "inline" pour les liens texte (nav, footer, "Lire ↗") qui n'ont pas
   de structure de carte. Le ":not()" ci-dessus ne suffit pas pour du texte nu. */
.is-disabled--inline {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}

/* Badge "Bientôt" — à placer à l'intérieur d'un .is-disabled important
   (entry-card, metier-card). Reste fully visible grâce au :not() ci-dessus. */
.badge-bientot {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--vert-neon);
  color: var(--foret);
  font-family: var(--font-titre);
  font-weight: var(--fw-medium);
  font-size: 0.6875rem;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 4px 14px -4px rgba(15, 33, 9, 0.35);
}

/* ===== Placeholder visuel pour données à fournir par OrTra
   (emails, téléphones, URLs externes à compléter) ===== */
.placeholder {
  display: inline-block;
  background: rgba(92, 75, 61, 0.12);
  color: var(--brun);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.85em;
  border: 1px dashed var(--brun-light);
  letter-spacing: 0;
}

/* ===== Icon button (header) ===== */
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--foret-15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--foret);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.icon-btn:hover {
  background: var(--lime);
  border-color: var(--vert-deau);
  color: var(--vert-deau);
}

/* === Bouton de la section campagne en état désactivé (vidéo pas encore dispo) ===
   À combiner avec .btn .btn--secondary. Le bouton reste visible mais grisé,
   non cliquable (souris + tactile), curseur "interdit", et a11y via aria-disabled. */
.btn-campagne--disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}
