/* Habillage du CFA du Beaujolais (lot M3, docs/decisions/2026-12-02-m3-theme.md) : servi après la feuille du moteur
   (public/assets/site.css). Polices Poppins et Unbounded, couleurs de la plaquette UFA, losanges, étoiles et motifs.
   Les couleurs et polices de l'écran « Thème » de l'admin passent encore après (gabarit layouts.site). Règles reprises
   telles quelles de l'ancienne site.css, dans leur ordre. */

@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Unbounded";
  src: url("fonts/Unbounded/Unbounded-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Unbounded";
  src: url("fonts/Unbounded/Unbounded-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --petrol: #006886;
  --ink: #2d3a42;
  --violet: #812990;
  --blue: #029ee2;
  --coral: #ff6b35;
  --ice: #ebf5fc;
  --title-font: "Unbounded", system-ui, sans-serif;
  --body-font: "Poppins", system-ui, sans-serif;
  --surface: #f2f6fd;
  --card-line: #dce8f5;
  --lilac: #e6dcee;
  --pill-bg: #ebf1fb;
  --diamond-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='170'%3E%3Cg fill='white' fill-opacity='.8'%3E%3Crect x='-30' y='-30' width='60' height='60' rx='14' transform='translate(42 42) rotate(45)'/%3E%3Crect x='-30' y='-30' width='60' height='60' rx='14' transform='translate(127 127) rotate(45)'/%3E%3C/g%3E%3C/svg%3E");
  --diamond-pattern-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='170'%3E%3Cg fill='white' fill-opacity='.07'%3E%3Crect x='-30' y='-30' width='60' height='60' rx='14' transform='translate(42 42) rotate(45)'/%3E%3Crect x='-30' y='-30' width='60' height='60' rx='14' transform='translate(127 127) rotate(45)'/%3E%3C/g%3E%3C/svg%3E");
}

.theme-a .hero-home::before,
.theme-a .directory-hero::before {
  content: "";
  position: absolute;
  top: -130px;
  right: -70px;
  width: 310px;
  aspect-ratio: 1;
  transform: rotate(45deg);
  pointer-events: none;
  border-radius: 64px;
  background: var(--violet);
  opacity: 0.07;
}

.formation-card::before {
  content: "";
  position: absolute;
  background: var(--brand-gradient);
  inset: -13px 26px auto auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  transform: rotate(45deg);
}

.theme-a .hero-home,
.theme-a .directory-hero {
  background: var(--diamond-pattern) center top / 170px 170px, var(--surface);
}

/* Fiche formation : en-tête à losanges et bandeau d'infos en dégradé. */
.theme-a .formation-detail .formation-hero {
  background: var(--diamond-pattern) center top / 170px 170px, var(--surface);
}

.deco-diamond {
  position: absolute;
  z-index: 3;
  width: 74px;
  aspect-ratio: 1;
  border: 4px solid var(--white);
  border-radius: 20px;
  background: var(--brand-gradient);
  box-shadow: var(--shadow);
  transform: rotate(45deg);
  pointer-events: none;
}

.deco-diamond--hero {
  top: -26px;
  right: -18px;
}

.deco-diamond--catalogue {
  bottom: 6px;
  left: -22px;
  width: 58px;
  border-radius: 16px;
}

.deco-star {
  position: absolute;
  width: 34px;
  aspect-ratio: 1;
  background: url("../../assets/images/pdf/star-white.png") center / contain no-repeat;
  pointer-events: none;
}

.theme-a .hero-note::after {
  content: "";
  position: absolute;
  top: -14px;
  right: 18px;
  width: 30px;
  aspect-ratio: 1;
  background: url("../../assets/images/pdf/star-white.png") center / contain no-repeat;
  filter: drop-shadow(0 4px 10px rgba(45, 58, 66, 0.25));
}

.stat-band::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 22px;
  width: 26px;
  aspect-ratio: 1;
  background: url("../../assets/images/pdf/star-white.png") center / contain no-repeat;
  opacity: 0.9;
}

@media (max-width: 640px) {
  .deco-diamond--hero {
    top: -16px;
    right: 6px;
    width: 52px;
  }

  .deco-diamond--catalogue {
    display: none;
  }
}

@font-face {
  font-family: "Unbounded";
  src: url("fonts/Unbounded/Unbounded-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

.deco-diamond,
.formation-card::before {
  background: var(--violet);
}

/* Catalogue des formations : les losanges gardent le dégradé bleu → violet. */
.formation-card::before,
.catalogue-hero .deco-diamond {
  background: var(--brand-gradient);
}

.formation-visual .deco-star,
.formation-visual .deco-diamond {
  z-index: 3;
}

.deco-star--gradient {
  background-image: url("../../assets/images/pdf/ufa/star-gradient.png");
}

.formation-visual-star {
  top: 4%;
  left: 2%;
  width: 40px;
}

.formation-visual-diamond {
  top: 12%;
  right: -10px;
  width: 58px;
  border-radius: 16px;
  background: var(--brand-gradient);
}

.formation-visual-diamond--small {
  top: auto;
  right: 12%;
  bottom: 4px;
  width: 28px;
  border-width: 3px;
  border-radius: 8px;
  background: var(--blue);
}

@media (max-width: 640px) {
  .formation-visual-star {
    width: 30px;
  }

  .formation-visual-diamond {
    right: -6px;
    width: 44px;
  }
}

/* Pages de contenu, design du 21-22 octobre : hero de la même famille que les fiches (pastille dégradée, titre
   violet, photo en arche ou composition de losanges), colonne de texte recentrée, sections découpées aux
   intertitres avec une section sur trois en couleur pleine et texte blanc, losanges devant les intertitres et en marge. */
.theme-a .page-hero::before {
  display: none;
}

.page-hero-visual .deco-star,
.page-hero-visual .deco-diamond {
  z-index: 3;
}

.page-hero-star {
  top: 4%;
  left: 2%;
  width: 36px;
}

.page-hero-diamond {
  top: 12%;
  right: -8px;
  width: 52px;
  border-radius: 14px;
  background: var(--brand-gradient);
}

.page-hero-diamond--small {
  top: auto;
  right: 14%;
  bottom: 2px;
  width: 26px;
  border-width: 3px;
  border-radius: 8px;
  background: var(--blue);
}

/* Sans photo : composition de losanges (le petit losange bleu et le losange dégradé sont alors inutiles). */
.page-hero-grid:not(.page-hero-grid--photo) .page-hero-diamond {
  display: none;
}

.page-hero-shape {
  position: absolute;
  aspect-ratio: 1;
  transform: rotate(45deg);
}

.page-hero-shape--big {
  top: 38px;
  left: 70px;
  width: 140px;
  border: 6px solid var(--white);
  border-radius: 34px;
  background: var(--brand-gradient);
  box-shadow: var(--shadow);
}

.page-hero-shape--lilac {
  bottom: 6px;
  left: 6px;
  width: 78px;
  border-radius: 20px;
  background: var(--lilac);
}

.page-hero-shape--outline {
  top: 10px;
  right: 22px;
  width: 58px;
  border: 3px solid var(--blue);
  border-radius: 14px;
}

@media (min-width: 1180px) {
  .page-section::before,
  .page-section::after {
    content: "";
    position: absolute;
    aspect-ratio: 1;
    transform: rotate(45deg);
    pointer-events: none;
  }

  .page-section::before {
    top: 140px;
    left: calc(50% - 560px);
    width: 54px;
    border-radius: 14px;
    background: var(--lilac);
  }

  .page-section::after {
    top: 46%;
    right: calc(50% - 545px);
    width: 34px;
    border: 3px solid var(--blue);
    border-radius: 9px;
  }
}

.c-visual-diamond {
  position: absolute;
  top: 28px;
  right: -18px;
  width: 46px;
  aspect-ratio: 1;
  border: 4px solid var(--white);
  border-radius: 12px;
  background: var(--brand-gradient);
  transform: rotate(45deg);
}

.c-row--reverse .c-visual-diamond {
  right: auto;
  left: -18px;
  background: var(--blue);
}

@media (max-width: 640px) {
  .c-visual-diamond {
    right: 8px;
    width: 36px;
  }

  .c-row--reverse .c-visual-diamond {
    left: 8px;
  }
}

.cta-band-star {
  top: 24px;
  right: 28px;
  width: 30px;
}
