/* Une seule page, trois vues. Seule la vue choisie est affichée. */
html.vues-js .vue {
  display: none;
}
html.vues-js[data-vue="accueil"] #vue-accueil {
  display: flex;
}
html.vues-js[data-vue="publicites"] #publicites,
html.vues-js[data-vue="formations"] #se-former {
  display: block;
}

/* ---------- Accueil : deux choix ---------- */
/* sur l'accueil, seul le logo rond reste en bas de page */
html.vues-js[data-vue="accueil"] .site-footer {
  display: none;
}
.choix-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 44px;
}
.choix-actions .button {
  min-width: 230px;
  padding: 19px 30px;
  font-size: 14px;
  gap: 22px;
}
@media (max-width: 700px) {
  .choix-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }
  .choix-actions .button {
    min-width: 0;
    width: 100%;
  }
}

/* ---------- Publicités ---------- */
.pubs {
  text-align: center;
}
.pubs > h1 {
  margin: 40px auto 48px;
}
.pub-offers {
  display: grid;
  gap: 28px;
  text-align: left;
}
.pub-offer {
  padding: 38px;
  position: relative;
  z-index: 1;
}
.pub-offer-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 20px;
  flex-wrap: wrap;
}
.pub-offer h2 {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.9px;
  line-height: 1.2;
  margin: 0;
}
.pub-price {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -1.5px;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
}
.pub-price.is-devis {
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--red);
}
.pub-text {
  margin: 16px 0 0;
  max-width: 620px;
  font-size: 14px;
  line-height: 1.7;
  color: #626262;
}
.pub-offer > .button {
  margin-top: 26px;
  font-size: 13px;
  padding: 16px 24px;
}

/* menu des métiers */
.cat-field {
  margin-top: 26px;
  max-width: 420px;
}
.cat-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.cat-field select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  padding: 14px 44px 14px 16px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='none' stroke='%23191919' stroke-width='2'%3E%3Cpath d='m4 7 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 16px center;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
}
.cat-field select:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
.cat-field select:disabled {
  opacity: 0.5;
  cursor: default;
}
.cat-vide {
  margin: 10px 0 0;
  font-size: 13px;
  color: #777;
}

/* aperçus des vidéos */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 2px solid #ededed;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.cat-card:hover {
  border-color: #d5d5d5;
  transform: translateY(-2px);
}
.cat-card:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
.cat-card[aria-pressed="true"] {
  border-color: var(--red);
  box-shadow: 0 8px 24px #e5231b22;
}
.cat-card video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #111;
  pointer-events: none;
}
.cat-card.is-horizontal video {
  aspect-ratio: 16 / 9;
}
.cat-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 13px 13px;
}
.cat-card-nom {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.cat-card-ref {
  font-size: 11px;
  color: #8a8a8a;
}
.cat-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
.cat-card[aria-pressed="true"] .cat-card-badge {
  opacity: 1;
  transform: none;
}

/* option logo et total */
.cat-options {
  display: grid;
  gap: 16px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid #ededed;
}
.cat-choix {
  margin: 0;
  font-size: 14px;
  color: #444;
}
.cat-choix strong {
  color: var(--ink);
}
.cat-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  padding: 14px 16px;
  border: 1px solid #ededed;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cat-logo:has(input:checked) {
  border-color: var(--red);
  background: #fff6f5;
}
.cat-logo input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1.5px solid #c4c4c4;
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-content: center;
  cursor: pointer;
}
.cat-logo input:checked {
  border-color: var(--red);
  background: var(--red);
}
.cat-logo input:checked::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.cat-logo input:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
.cat-logo-note {
  margin: -6px 0 0;
  font-size: 13px;
  color: #8a1510;
}
.cat-total {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.cat-total strong {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -1px;
  margin-left: 6px;
}
.cat-options .button {
  justify-self: start;
  font-size: 13px;
  padding: 16px 24px;
}
.cat-note {
  margin: 22px 0 0;
  font-size: 11px;
  color: #9a9a9a;
}

/* ---------- bouton de passage d'une offre à l'autre ---------- */
.vue-switch {
  display: flex;
  justify-content: center;
  margin: 10px auto 90px;
}
.vue-switch .button {
  padding: 18px 30px;
  font-size: 14px;
  gap: 22px;
}

@media (max-width: 700px) {
  .pubs > h1 {
    margin: 26px auto 32px;
  }
  .pub-offer {
    padding: 26px 20px;
  }
  .pub-offer h2 {
    font-size: 23px;
  }
  .pub-price {
    font-size: 32px;
  }
  .cat-field {
    max-width: none;
  }
  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .cat-options .button,
  .pub-offer > .button {
    justify-self: stretch;
    width: 100%;
  }
  .cat-logo {
    max-width: none;
  }
  .vue-switch {
    margin-bottom: 64px;
  }
  .vue-switch .button {
    width: 100%;
    max-width: 340px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cat-card,
  .cat-card-badge {
    transition: none;
  }
}

/* ---------- Formations : sous-titre des cartes et bloc Communauté ---------- */
.offer-content .offer-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: #626262;
}
.offer-card.offer-card-full {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}
.offer-content .offer-engagement {
  margin: -14px 0 22px;
  font-size: 13px;
}
