/* specialty_detail.html — page-specific styles (tokens/navbar/footer live in pages' css/base.css) */
#detail-hero {
  background: var(--navy) center/cover no-repeat;
  position: relative;
  overflow: hidden;
  padding: 56px 0 90px;
}
#detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 70% at 25% 20%,
    rgba(245, 158, 11, 0.1) 0%,
    transparent 70%
  );
}
#detail-hero.has-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.88),
    rgba(15, 23, 42, 0.94)
  );
}

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.main-photo {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--body-bg);
}
.main-photo img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}
.crumb {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  margin-bottom: 14px;
}
.crumb a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}
.hero-code {
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 6px;
  padding: 4px 12px;
  direction: ltr;
}
#detail-hero h1 {
  color: #fff;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  margin: 14px 0 6px;
}
.hero-sub {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14.5px;
}
.stars {
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 2px;
}

/* See subscribe.css for why align-self:center replaces margin:auto here
   (auto margins opt a flex item out of cross-axis stretch, so it
   shrink-wraps to content instead of filling up to max-width). */
.wrap {
  max-width: 900px;
  align-self: center;
  width: 100%;
  margin: -46px 0 0;
  padding: 0 16px 88px;
  position: relative;
  z-index: 2;
}
.panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.info-box {
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.18s;
}
.info-box:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.info-box iconify-icon {
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 6px;
}
.info-box .label {
  color: var(--muted);
  font-size: 11.5px;
}
.info-box .value {
  color: var(--text);
  font-weight: 800;
  font-size: 1.05rem;
  margin-top: 2px;
}

.section-h {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-h iconify-icon {
  color: var(--accent);
  font-size: 20px;
}
p,
li {
  color: var(--text);
  line-height: 1.9;
}
ul.tasks {
  padding-inline-start: 20px;
}
ul.tasks li {
  margin-bottom: 6px;
}
ul.tasks li::marker {
  color: var(--accent);
}

.seats-bar {
  height: 9px;
  background: var(--body-bg);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 8px;
}
.seats-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-enroll {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  text-decoration: none;
  background: var(--accent);
  color: var(--navy);
  font-weight: 800;
  font-family: inherit;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  padding: 13px 30px;
  border-radius: 9px;
  transition: all 0.18s;
}
.btn-enroll:hover {
  background: var(--accent-dark);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}
.btn-enroll.full {
  background: var(--body-bg);
  color: var(--muted);
  border: 1px solid var(--card-border);
}
.btn-enroll.outline {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--accent-dark);
}
.btn-enroll.outline:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: none;
}

.related-card {
  display: block;
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}
.related-card:hover {
  border-color: var(--accent);
  background: #fff;
  color: inherit;
}
.related-card .code {
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
  color: var(--accent);
}
.related-card .title {
  font-weight: 700;
  font-size: 0.92rem;
  margin-top: 2px;
}

/* Formateur mini-card */
.formateur-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.formateur-card:hover {
  color: inherit;
}
.formateur-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--card-border);
}
.formateur-card:hover .formateur-avatar {
  border-color: var(--accent);
}
.formateur-name {
  font-weight: 800;
  font-size: 0.95rem;
}
.formateur-title {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Comments */
.comment-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--body-bg);
}
.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.comment-name {
  font-weight: 800;
  font-size: 0.92rem;
}
.comment-date {
  font-size: 11.5px;
  color: var(--muted);
}
.comment-text {
  font-size: 0.9rem;
  color: var(--text);
}
.empty-note {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 18px;
}

form .form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 5px;
}
form .form-control,
form .form-select {
  border-radius: 8px;
  border: 1px solid var(--card-border);
  padding: 9px 12px;
  font-family: var(--font-head);
}
form .form-control:focus,
form .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn-submit-mini {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  transition: all 0.18s;
}
.btn-submit-mini:hover {
  background: var(--accent);
  color: var(--navy);
}

.rating-select-stars {
  display: flex;
  gap: 4px;
}

.alert-eems {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.alert-eems.success {
  background: rgba(16, 185, 129, 0.1);
  color: #0d7a5f;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.alert-eems.warning {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Primary fiche technique document (auto-generated print page OR custom upload) */
.fiche-primary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(
    135deg,
    var(--accent-soft),
    rgba(245, 158, 11, 0.04)
  );
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 16px 20px;
  margin-top: 14px;
  transition: all 0.18s;
}
.fiche-primary-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.fiche-primary-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.fiche-primary-info {
  flex: 1;
  min-width: 0;
}
.fiche-primary-title {
  font-weight: 800;
  font-size: 1rem;
}
.fiche-primary-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}
.fiche-primary-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent-dark);
  white-space: nowrap;
  flex-shrink: 0;
}
.fiche-primary-cta iconify-icon {
  font-size: 18px;
}
.attachments-subhead {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin: 18px 0 8px;
}

/* Attachments ("fiche technique" pieces jointes / formateur certificates) —
   this component is reused by formateur_detail.html, which loads this
   stylesheet alongside its own for that purpose. */
.attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.attachment-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}
.attachment-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.attachment-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.attachment-icon.pdf {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}
.attachment-icon.image {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}
.attachment-info {
  flex: 1;
  min-width: 0;
}
.attachment-title {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attachment-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.attachment-dl {
  font-size: 17px;
  color: var(--muted);
  flex-shrink: 0;
}
.attachment-card:hover .attachment-dl {
  color: var(--accent);
}

/* Gallery / lightbox for secondary images */
.gallery-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gallery-thumb {
  flex: 0 0 110px;
  height: 78px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumb:hover {
  border-color: var(--accent);
}
#gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
#gallery-lightbox.open {
  display: flex;
}
#gallery-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}
#gallery-lightbox .lb-close,
#gallery-lightbox .lb-prev,
#gallery-lightbox .lb-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s;
}
#gallery-lightbox .lb-close:hover,
#gallery-lightbox .lb-prev:hover,
#gallery-lightbox .lb-next:hover {
  background: var(--accent);
  color: var(--navy);
}
#gallery-lightbox .lb-close {
  top: 20px;
  left: 20px;
}
#gallery-lightbox .lb-prev {
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}
#gallery-lightbox .lb-next {
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
}
