/*
 * IA & Marketing Editorial Blocks
 * Cartes éditoriales : iam_cards et iam_card.
 */

.iam-cards,
.iam-cards *,
.iam-card,
.iam-card * {
  box-sizing: border-box;
}

/*
 * Grilles.
 */
.iam-cards {
  display: grid;
  gap: 1.125rem;
  margin: 2rem 0;
}

.iam-cards--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.iam-cards--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.iam-cards--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.iam-cards--compact {
  gap: 0.85rem;
}

/*
 * Carte commune.
 */
.iam-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid #e4e8ed;
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18);
  color: #1f2024 !important;
}

.iam-card,
.iam-card h1,
.iam-card h2,
.iam-card h3,
.iam-card h4,
.iam-card h5,
.iam-card h6,
.iam-card p,
.iam-card li,
.iam-card strong,
.iam-card em,
.iam-card span,
.iam-card a {
  color: #1f2024 !important;
}

.iam-card--blue {
  border-color: #dbeaf7;
  background: #f7fbff;
}

.iam-card--green {
  border-color: #dcebdc;
  background: #f7fcf7;
}

.iam-card--orange {
  border-color: #f2dccd;
  background: #fff8f3;
}

.iam-card--red {
  border-color: #f1d2cf;
  background: #fff6f4;
}

.iam-card--neutral {
  border-color: #dfe5ea;
  background: #f4f6f8;
}

/*
 * Carte mise en avant.
 */
.iam-card--featured {
  transform: translateY(-4px);
  border-width: 2px;
}

.iam-card--blue.iam-card--featured {
  border-color: #2878b9;
}

.iam-card--green.iam-card--featured {
  border-color: #498a4b;
}

.iam-card--orange.iam-card--featured {
  border-color: #b95c23;
}

.iam-card--red.iam-card--featured {
  border-color: #b23a2d;
}

.iam-card--neutral.iam-card--featured {
  border-color: #46515d;
}

/*
 * Icône.
 */
.iam-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0 0 1rem;
  border-radius: 10px;
  font-size: 1.15rem;
  line-height: 1;
}

.iam-card__icon i {
  color: inherit !important;
  line-height: 1;
}

.iam-card--blue .iam-card__icon {
  background: rgba(40, 120, 185, 0.12);
  color: #2878b9 !important;
}

.iam-card--green .iam-card__icon {
  background: rgba(73, 138, 75, 0.12);
  color: #498a4b !important;
}

.iam-card--orange .iam-card__icon {
  background: rgba(185, 92, 35, 0.12);
  color: #b95c23 !important;
}

.iam-card--red .iam-card__icon {
  background: rgba(178, 58, 45, 0.12);
  color: #b23a2d !important;
}

.iam-card--neutral .iam-card__icon {
  background: rgba(70, 81, 93, 0.12);
  color: #46515d !important;
}

/*
 * Libellé et titre.
 */
.iam-card__eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.iam-card--blue .iam-card__eyebrow {
  color: #2878b9 !important;
}

.iam-card--green .iam-card__eyebrow {
  color: #498a4b !important;
}

.iam-card--orange .iam-card__eyebrow {
  color: #b95c23 !important;
}

.iam-card--red .iam-card__eyebrow {
  color: #b23a2d !important;
}

.iam-card--neutral .iam-card__eyebrow {
  color: #46515d !important;
}

.iam-card__title {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  line-height: 1.3;
}

/*
 * Contenu.
 */
.iam-card__content > :first-child {
  margin-top: 0;
}

.iam-card__content > :last-child {
  margin-bottom: 0;
}

.iam-card__content ul,
.iam-card__content ol {
  margin: 1rem 0;
  padding-left: 1.25rem;
}

.iam-card__content li + li {
  margin-top: 0.45rem;
}

.iam-card__content a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/*
 * Ligne de contrôle.
 */
.iam-card__control {
  margin: auto 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(31, 32, 36, 0.14);
  font-size: 0.94rem;
  line-height: 1.55;
}

/*
 * Responsive.
 */
@media (max-width: 1024px) {
  .iam-cards--4,
  .iam-cards--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .iam-cards,
  .iam-cards--2,
  .iam-cards--3,
  .iam-cards--4 {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    margin: 1.5rem 0;
  }

  .iam-card {
    padding: 1.125rem;
  }

  .iam-card--featured {
    transform: none;
  }

  .iam-card__title {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .iam-card,
  .iam-card * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}