/* ============================================================
   Cookie Consent — Mentorat et Cie
   Loi 25 (Québec) + LPRPDE + RGPD conforme — pas de dark pattern
   Couleurs via variables CSS Astra (héritées automatiquement du thème)
     --ast-global-color-0 = #eb008b  (accent rose/magenta)
     --ast-global-color-2 = #0F172A  (fond sombre)
     --ast-global-color-3 = #454F5E  (texte secondaire)
     --ast-global-color-4 = #ffffff  (fond clair)
   ============================================================ */

/* ── Bannière ────────────────────────────────────────────── */
#mc-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: var(--ast-global-color-2, #0F172A);
  color: #fff;
  box-shadow: 0 -4px 32px rgba(0,0,0,.35);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

#mc-cookie-banner[aria-hidden="true"] { display: none; }

.mc-cb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.mc-cb-text {
  flex: 1;
  min-width: 260px;
  color: rgba(255,255,255,.88);
  margin: 0;
  font-size: 13.5px;
}

.mc-cb-text a {
  color: var(--ast-global-color-0, #eb008b);
  text-decoration: underline;
}

.mc-cb-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Boutons ─────────────────────────────────────────────── */
.mc-btn {
  padding: 9px 22px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: opacity .15s, transform .1s;
  line-height: 1.4;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.mc-btn:hover  { opacity: .82; }
.mc-btn:active { transform: scale(.97); }
.mc-btn:focus-visible {
  outline: 2px solid var(--ast-global-color-0, #eb008b);
  outline-offset: 3px;
}

/* Personnaliser */
.mc-btn-prefs {
  background: transparent;
  color: rgba(255,255,255,.75);
  border: 1px solid rgba(255,255,255,.3) !important;
}
.mc-btn-prefs:hover { color: #fff; border-color: rgba(255,255,255,.6) !important; }

/* Refuser — même poids visuel que Accepter, couleur neutre */
.mc-btn-refuse {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2) !important;
}
.mc-btn-refuse:hover { background: rgba(255,255,255,.2); }

/* Accepter — couleur accent du thème */
.mc-btn-accept {
  background: var(--ast-global-color-0, #eb008b);
  color: #fff;
  border: 1px solid transparent !important;
}

/* ── Panneau de préférences ────────────────────────────────── */
#mc-cookie-panel {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15,23,42,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#mc-cookie-panel[aria-hidden="true"] { display: none; }

.mc-panel-inner {
  background: var(--ast-global-color-4, #ffffff);
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  color: var(--ast-global-color-2, #0F172A);
  font-size: 14px;
  line-height: 1.55;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}

.mc-panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--ast-global-color-3, #454F5E);
  opacity: .7;
  padding: 6px 8px;
  border-radius: 6px;
  line-height: 1;
  font-family: inherit;
}
.mc-panel-close:hover { opacity: 1; background: rgba(15,23,42,.06); }

.mc-panel-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ast-global-color-2, #0F172A);
  margin: 0 0 8px;
  padding-right: 36px;
}

.mc-panel-desc {
  color: var(--ast-global-color-3, #454F5E);
  margin: 0 0 20px;
  font-size: 13px;
}

/* Catégories */
.mc-category {
  border: 1px solid rgba(15,23,42,.1);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.mc-cat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.mc-cat-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mc-cat-info strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ast-global-color-2, #0F172A);
}

.mc-cat-info span {
  font-size: 12px;
  color: var(--ast-global-color-3, #454F5E);
}

.mc-toggle-always {
  font-size: 11px;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Toggle */
.mc-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.mc-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }

.mc-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.2);
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s;
}
.mc-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.mc-toggle input:checked + .mc-toggle-slider { background: var(--ast-global-color-0, #eb008b); }
.mc-toggle input:checked + .mc-toggle-slider::before { transform: translateX(20px); }
.mc-toggle input:focus-visible + .mc-toggle-slider {
  outline: 2px solid var(--ast-global-color-0, #eb008b);
  outline-offset: 2px;
}

/* Liste cookies */
.mc-cookie-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: var(--ast-global-color-3, #454F5E);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mc-cookie-list code {
  background: rgba(15,23,42,.07);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  color: var(--ast-global-color-2, #0F172A);
}

/* Actions panneau */
.mc-panel-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}

.mc-panel-actions .mc-btn {
  text-transform: uppercase;
  font-size: 12px;
}

.mc-panel-actions .mc-btn-refuse {
  background: rgba(15,23,42,.07);
  color: var(--ast-global-color-2, #0F172A);
  border: 1px solid rgba(15,23,42,.12) !important;
}
.mc-panel-actions .mc-btn-refuse:hover { background: rgba(15,23,42,.12); }

.mc-panel-actions .mc-btn-accept {
  background: var(--ast-global-color-0, #eb008b);
  color: #fff;
}

/* ── Responsive bannière ───────────────────────────────────── */
@media (max-width: 640px) {
  .mc-cb-inner { padding: 14px 16px; flex-direction: column; gap: 12px; }
  .mc-cb-buttons { width: 100%; justify-content: flex-end; }
  .mc-panel-inner { padding: 20px 16px; }
  .mc-panel-actions { flex-direction: column-reverse; }
  .mc-panel-actions .mc-btn { width: 100%; text-align: center; }
}

/* ============================================================
   Timeline parcours professionnel — [mc_parcours]
   Hérite des variables CSS Astra (couleurs du site)
   ============================================================ */

.mc-timeline-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  font-family: inherit;
}

.mc-timeline-section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--ast-global-color-2, #0F172A);
  margin: 0 0 8px;
  letter-spacing: -.4px;
}

.mc-timeline-section-sub {
  text-align: center;
  font-size: 1rem;
  color: var(--ast-global-color-3, #454F5E);
  margin: 0 0 32px;
  line-height: 1.5;
}

.mc-timeline-intro {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ast-global-color-3, #454F5E);
  margin-bottom: 32px;
  border-left: 3px solid var(--ast-global-color-0, #eb008b);
  padding-left: 14px;
}

/* Ligne verticale */
.mc-timeline {
  position: relative;
  padding-left: 60px;
}

.mc-timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 6px;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    var(--ast-global-color-0, #eb008b) 0%,
    rgba(235, 0, 139, .7) 40%,
    rgba(235, 0, 139, .25) 75%,
    transparent 100%
  );
}

/* Entrée */
.mc-tl-item {
  position: relative;
  margin-bottom: 28px;
}

.mc-tl-item:last-child {
  margin-bottom: 0;
}

/* Point sur la ligne */
.mc-tl-marker {
  position: absolute;
  left: -49px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ast-global-color-0, #eb008b);
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  z-index: 1;
}

.mc-tl-item:hover .mc-tl-marker {
  background: var(--ast-global-color-0, #eb008b);
  transform: scale(1.25);
  box-shadow: 0 0 0 4px rgba(235, 0, 139, .2), 0 0 0 8px rgba(235, 0, 139, .08);
}

.mc-tl-item.mc-tl-current .mc-tl-marker {
  background: var(--ast-global-color-0, #eb008b);
  width: 16px;
  height: 16px;
  left: -50px;
  top: 7px;
  animation: mc-pulse 3s ease-in-out infinite;
}

@keyframes mc-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(235, 0, 139, .25), 0 0 0 8px rgba(235, 0, 139, .1); }
  50%       { box-shadow: 0 0 0 7px rgba(235, 0, 139, .15), 0 0 0 14px rgba(235, 0, 139, .05); }
}

/* Contenu */
.mc-tl-content {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-left: 3px solid transparent;
  border-radius: 10px;
  padding: 18px 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.mc-tl-item:hover .mc-tl-content {
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(235, 0, 139, .12);
  border-left-color: var(--ast-global-color-0, #eb008b);
  border-color: rgba(235, 0, 139, .15);
}

.mc-tl-item.mc-tl-current .mc-tl-content {
  border-left-color: var(--ast-global-color-0, #eb008b);
  box-shadow: 0 4px 16px rgba(235, 0, 139, .1);
}

/* Date — badge pill */
.mc-tl-date {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ast-global-color-0, #eb008b);
  background: rgba(235, 0, 139, .08);
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 7px;
}

/* Titre poste */
.mc-tl-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ast-global-color-2, #0F172A);
  margin: 0 0 6px;
  line-height: 1.3;
}

/* Description */
.mc-tl-content p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ast-global-color-3, #454F5E);
  margin: 0 0 10px;
}

/* Tag secteur */
.mc-tl-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ast-global-color-0, #eb008b);
  background: rgba(235, 0, 139, .08);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .02em;
}

/* ── Responsive timeline ───────────────────────────────────── */
@media (max-width: 768px) {
  .mc-timeline { padding-left: 36px; }
  .mc-timeline::before { left: 10px; }
  .mc-tl-marker { left: -31px; top: 8px; width: 12px; height: 12px; }
  .mc-tl-item.mc-tl-current .mc-tl-marker { left: -32px; top: 7px; width: 14px; height: 14px; }
  .mc-tl-content { padding: 14px 16px; }
  .mc-tl-content h3 { font-size: 14px; }
  .mc-timeline-wrapper { padding: 30px 16px 40px; }
}

@media (max-width: 480px) {
  .mc-timeline { padding-left: 28px; }
  .mc-timeline::before { left: 7px; }
  .mc-tl-marker { left: -24px; top: 8px; width: 10px; height: 10px; }
  .mc-tl-item.mc-tl-current .mc-tl-marker { left: -25px; top: 7px; width: 12px; height: 12px; }
  .mc-tl-content { padding: 12px 14px; }
  .mc-tl-content h3 { font-size: 13.5px; }
  .mc-tl-item { margin-bottom: 20px; }
  .mc-timeline-wrapper { padding: 24px 12px 32px; }
}

/* ── Animations scroll (Intersection Observer) ─────────────── */
/* Activées uniquement quand JS ajoute .mc-animate au wrapper  */
.mc-timeline.mc-animate .mc-tl-item {
  opacity: 0;
  transform: translateY(24px);
}

.mc-tl-item.mc-is-visible {
  animation: mcFadeIn .55s cubic-bezier(.4, 0, .2, 1) forwards;
}

.mc-tl-item:nth-child(1).mc-is-visible  { animation-delay: .0s; }
.mc-tl-item:nth-child(2).mc-is-visible  { animation-delay: .08s; }
.mc-tl-item:nth-child(3).mc-is-visible  { animation-delay: .16s; }
.mc-tl-item:nth-child(4).mc-is-visible  { animation-delay: .24s; }
.mc-tl-item:nth-child(5).mc-is-visible  { animation-delay: .32s; }
.mc-tl-item:nth-child(6).mc-is-visible  { animation-delay: .40s; }
.mc-tl-item:nth-child(7).mc-is-visible  { animation-delay: .48s; }
.mc-tl-item:nth-child(8).mc-is-visible  { animation-delay: .56s; }
.mc-tl-item:nth-child(9).mc-is-visible  { animation-delay: .64s; }

@keyframes mcFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Reduced motion — respecter les préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
  .mc-timeline.mc-animate .mc-tl-item { opacity: 1; transform: none; }
  .mc-tl-item.mc-is-visible { animation: none; }
  .mc-tl-item.mc-tl-current .mc-tl-marker { animation: none; }
  .mc-tl-item:hover .mc-tl-content { transform: none; }
}
