/* Visa H-1B — France-USA-Net.Com
   Palette harmonisée realestate-guide.css / civil-war-guide.css */

body.h1b-visa-page {
  --h1b-text-on-light: #14110e;
  --h1b-text-muted-on-light: #3d3834;
  --h1b-accent: #2c5f4e;
  --h1b-accent-dark: #1a3d32;
  --h1b-employer: #1d4ed8;
  --h1b-worker: #c2410c;
  --h1b-regulatory: #78716c;
  --h1b-link-on-light: #1d4ed8;
  --h1b-link-warm: #b8703a;
  --h1b-surface-light: linear-gradient(145deg, #fdfbf8 0%, #ffffff 100%);
  --h1b-surface-panel: #f6f8fb;
}

/* Texte sur fond sombre (sections .section / .prose) */
body.h1b-visa-page .prose,
body.h1b-visa-page .cat-intro {
  color: rgba(241, 245, 249, 0.92);
}

body.h1b-visa-page .prose strong {
  color: #ffffff;
}

body.h1b-visa-page .prose a {
  color: #93c5fd;
  font-weight: 600;
}

body.h1b-visa-page .section-head h2 {
  color: #ffffff;
}

body.h1b-visa-page .section-head .cat-intro {
  color: rgba(226, 232, 240, 0.88);
}

/* Panneaux & citations */
.h1b-section-panel {
  background: var(--h1b-surface-light);
  border: 1px solid rgba(44, 95, 78, 0.2);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 16px 0;
  color: var(--h1b-text-on-light);
}

.h1b-section-panel h3 {
  margin: 0 0 10px;
  color: var(--h1b-accent);
  font-size: 1.05rem;
}

.h1b-section-panel p,
.h1b-section-panel li {
  color: var(--h1b-text-muted-on-light);
  line-height: 1.68;
  font-size: 0.95rem;
}

.h1b-section-panel a {
  color: var(--h1b-link-on-light);
  font-weight: 600;
}

.h1b-section-panel strong {
  color: var(--h1b-text-on-light);
}

.h1b-pullquote {
  border-left: 4px solid var(--h1b-accent);
  padding: 14px 18px;
  margin: 18px 0;
  background: linear-gradient(90deg, #f0f4fa 0%, #fff 100%);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: #1f334d;
  line-height: 1.65;
}

.h1b-callout--legal {
  border-left: 4px solid var(--h1b-accent);
  background: linear-gradient(135deg, #fffef6 0%, #f6f3e4 100%);
  color: #2c2610;
  padding: 14px 16px;
  border-radius: 12px;
  margin: 16px 0;
  font-size: 0.94rem;
  line-height: 1.62;
}

.h1b-callout--legal strong {
  color: var(--h1b-accent-dark);
}

/* Frise horizontale (aperçu) */
.h1b-timeline-strip {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(44, 95, 78, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f0f4fa 100%);
}

.h1b-timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 12px;
  font-size: 0.86rem;
  font-weight: 700;
}

.h1b-timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.h1b-timeline-legend span::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.h1b-timeline-legend .leg-employer { color: var(--h1b-employer); }
.h1b-timeline-legend .leg-employer::before { background: var(--h1b-employer); }
.h1b-timeline-legend .leg-worker { color: var(--h1b-worker); }
.h1b-timeline-legend .leg-worker::before { background: var(--h1b-worker); }
.h1b-timeline-legend .leg-regulatory { color: var(--h1b-regulatory); }
.h1b-timeline-legend .leg-regulatory::before { background: var(--h1b-regulatory); }

.h1b-timeline-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.h1b-timeline-rail {
  display: flex;
  gap: 12px;
  min-width: min-content;
  padding: 4px 2px 8px;
}

.h1b-timeline-mini {
  flex: 0 0 auto;
  width: min(240px, 76vw);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #c5d0e0;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 35, 60, 0.08);
}

.h1b-timeline-mini--employer { border-top: 5px solid var(--h1b-employer); }
.h1b-timeline-mini--worker { border-top: 5px solid var(--h1b-worker); }
.h1b-timeline-mini--regulatory { border-top: 5px solid var(--h1b-regulatory); }

.h1b-timeline-mini .date {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.h1b-timeline-mini h4 {
  margin: 6px 0;
  font-size: 0.95rem;
  color: #0f2744;
  line-height: 1.3;
}

.h1b-timeline-mini p {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: #384d63;
  line-height: 1.55;
}

.h1b-timeline-mini p:last-child {
  margin-bottom: 0;
}

/* Frise verticale détaillée */
.h1b-timeline-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 20px 0;
  position: relative;
}

/* Conteneurs très hauts : le seuil IntersectionObserver (15 %) de .reveal global
   n'est jamais atteint → cartes invisibles (opacity: 0) sur fond sombre. */
.h1b-timeline-detail.reveal,
.h1b-anecdotes-grid.reveal {
  opacity: 1;
  transform: none;
}

.h1b-timeline-detail::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: linear-gradient(
    180deg,
    var(--h1b-employer) 0%,
    var(--h1b-worker) 50%,
    var(--h1b-accent) 100%
  );
  border-radius: 3px;
  opacity: 0.35;
}

@media (min-width: 768px) {
  .h1b-timeline-detail::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

.h1b-event {
  position: relative;
  margin-bottom: 22px;
  padding-left: 48px;
}

@media (min-width: 768px) {
  .h1b-event {
    width: 50%;
    padding-left: 0;
    padding-right: 28px;
  }

  .h1b-event:nth-child(even) {
    margin-left: 50%;
    padding-left: 28px;
    padding-right: 0;
  }
}

.h1b-event-marker {
  position: absolute;
  left: 8px;
  top: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

@media (min-width: 768px) {
  .h1b-event-marker {
    left: auto;
    right: -39px;
  }

  .h1b-event:nth-child(even) .h1b-event-marker {
    right: auto;
    left: -39px;
  }
}

.h1b-event--employer .h1b-event-marker { background: var(--h1b-employer); }
.h1b-event--worker .h1b-event-marker { background: var(--h1b-worker); }
.h1b-event--regulatory .h1b-event-marker { background: var(--h1b-regulatory); }

.h1b-event-card {
  background: var(--h1b-surface-light);
  border: 1px solid rgba(44, 95, 78, 0.22);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 8px 24px rgba(25, 35, 30, 0.08);
  transition: transform 0.22s ease;
}

.h1b-event-card:hover {
  transform: translateY(-2px);
}

.h1b-event--employer .h1b-event-card { border-top: 4px solid var(--h1b-employer); }
.h1b-event--worker .h1b-event-card { border-top: 4px solid var(--h1b-worker); }
.h1b-event--regulatory .h1b-event-card { border-top: 4px solid var(--h1b-regulatory); }

.h1b-event-date {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.h1b-event-card h3 {
  margin: 8px 0 10px;
  font-size: 1.08rem;
  color: var(--h1b-accent-dark);
  line-height: 1.28;
}

.h1b-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.h1b-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.h1b-badge--employer {
  background: rgba(29, 78, 216, 0.15);
  color: #1e40af;
  border: 1px solid rgba(29, 78, 216, 0.35);
}

.h1b-badge--worker {
  background: rgba(194, 65, 12, 0.12);
  color: #9a3412;
  border: 1px solid rgba(194, 65, 12, 0.3);
}

.h1b-badge--regulatory {
  background: rgba(120, 113, 108, 0.15);
  color: #57534e;
  border: 1px solid rgba(120, 113, 108, 0.3);
}

.h1b-event-actors,
.h1b-event-forms {
  font-size: 0.88rem;
  margin: 8px 0;
  color: var(--h1b-text-muted-on-light);
  line-height: 1.55;
}

.h1b-event-actors strong,
.h1b-event-forms strong {
  color: var(--h1b-text-on-light);
}

.h1b-event-desc {
  margin: 0 0 10px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--h1b-text-muted-on-light);
}

.h1b-event-desc:last-of-type {
  margin-bottom: 0;
}

.h1b-event-facts {
  list-style: none;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--h1b-surface-panel);
  border: 1px solid rgba(44, 95, 78, 0.14);
}

.h1b-event-facts li {
  position: relative;
  padding: 0 0 8px 1.35rem;
  font-size: 0.86rem;
  line-height: 1.58;
  color: var(--h1b-text-muted-on-light);
}

.h1b-event-facts li:last-child {
  padding-bottom: 0;
}

.h1b-event-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--h1b-accent);
}

.h1b-event--employer .h1b-event-facts li::before { background: var(--h1b-employer); }
.h1b-event--worker .h1b-event-facts li::before { background: var(--h1b-worker); }
.h1b-event--regulatory .h1b-event-facts li::before { background: var(--h1b-regulatory); }

/* Animation individuelle sur chaque carte (pas le conteneur parent) */
.h1b-event.reveal,
.h1b-anecdote.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.7s var(--ease, ease), transform 0.7s var(--ease, ease);
}

.h1b-event.reveal.visible,
.h1b-anecdote.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Anecdotes numérotées */
.h1b-anecdotes-grid {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

@media (min-width: 520px) {
  .h1b-anecdotes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .h1b-anecdotes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.h1b-anecdote {
  background: var(--h1b-surface-light);
  border: 1px solid rgba(44, 95, 78, 0.18);
  border-radius: 12px;
  padding: 14px 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.h1b-anecdote:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(25, 35, 30, 0.1);
}

.h1b-anecdote-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 6px;
  margin-bottom: 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, var(--h1b-accent), var(--h1b-accent-dark));
}

.h1b-anecdote h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--h1b-accent-dark);
  line-height: 1.35;
}

.h1b-anecdote p {
  margin: 0 0 8px;
  font-size: 0.86rem;
  line-height: 1.58;
  color: var(--h1b-text-muted-on-light);
}

.h1b-anecdote p:last-of-type {
  margin-bottom: 0;
}

.h1b-anecdote-source {
  display: block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: #64748b;
  font-style: italic;
}

/* Liens utiles */
.h1b-links-grid {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

@media (min-width: 520px) {
  .h1b-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.h1b-links-grid a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(44, 95, 78, 0.22);
  background: var(--h1b-surface-light);
  color: var(--h1b-link-on-light);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.h1b-links-grid a:hover {
  transform: translateY(-2px);
  color: var(--h1b-accent);
}

/* Pied de page sombre : cartes liens & CTA */
body.h1b-visa-page .retirement-link-card,
body.h1b-visa-page .retirement-link-card li {
  color: var(--text-300);
}

body.h1b-visa-page .retirement-link-card h3 {
  color: var(--gold);
}

body.h1b-visa-page .retirement-link-card a {
  color: #93c5fd;
}

body.h1b-visa-page .cta-inner h2 {
  color: #ffffff;
}

body.h1b-visa-page .cta-inner p {
  color: rgba(255, 255, 255, 0.92);
}

/* Grilles & parcours — harmonie realestate-guide.css */
.h1b-topic-grid {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

@media (min-width: 640px) {
  .h1b-topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .h1b-topic-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.h1b-topic-card {
  border: 1px solid rgba(44, 95, 78, 0.2);
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(145deg, #fdfbf8 0%, #ffffff 100%);
  color: #14110e;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.h1b-topic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(25, 35, 30, 0.12);
}

.h1b-topic-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #2c5f4e;
}

.h1b-topic-card p,
.h1b-topic-card li {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.58;
  color: #3d3834;
}

.h1b-topic-card a {
  color: #1d4ed8;
  font-weight: 600;
}

.h1b-step-list {
  counter-reset: h1b-step;
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.h1b-step-list > li {
  counter-increment: h1b-step;
  position: relative;
  padding: 0 0 18px 2.85rem;
  margin-bottom: 6px;
  line-height: 1.68;
  color: rgba(241, 245, 249, 0.92);
}

.h1b-step-list > li::before {
  content: counter(h1b-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c5f4e, #1a3d32);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(44, 95, 78, 0.35);
}

.h1b-step-list > li strong {
  color: #ffffff;
}

.h1b-forms-grid {
  display: grid;
  gap: 16px;
  margin: 16px 0;
}

@media (min-width: 640px) {
  .h1b-forms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.h1b-forms-grid .h1b-panel {
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(20, 17, 14, 0.1);
  transition: transform 0.2s ease;
}

.h1b-forms-grid .h1b-panel:hover {
  transform: translateY(-2px);
}

.h1b-forms-grid .h1b-panel--light {
  background: linear-gradient(145deg, #fdfbf8 0%, #ffffff 100%);
  color: #14110e;
}

.h1b-forms-grid .h1b-panel--light h3 {
  margin-top: 0;
  color: #2c5f4e;
}

.h1b-forms-grid .h1b-panel--light li,
.h1b-forms-grid .h1b-panel--light p {
  color: #3d3834;
}

.h1b-forms-grid .h1b-panel--light a {
  color: #1d4ed8;
  font-weight: 600;
}

.h1b-forms-grid .h1b-panel--dark {
  background: linear-gradient(135deg, #2c5f4e 0%, #0b1020 100%);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.14);
}

.h1b-forms-grid .h1b-panel--dark h3 {
  margin-top: 0;
  color: #f4d58a;
}

.h1b-forms-grid .h1b-panel--dark li,
.h1b-forms-grid .h1b-panel--dark p {
  color: #e2e8f0;
}

.h1b-forms-grid .h1b-panel--dark a {
  color: #93c5fd;
  font-weight: 600;
}

.h1b-forms-grid ul {
  margin: 8px 0 0;
  padding-left: 1.2rem;
}

.h1b-journey-band {
  margin: 20px 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2c5f4e 0%, #1a3d32 55%, #0b1020 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

.h1b-journey-band h3 {
  margin: 0 0 12px;
  color: #f4d58a;
  font-size: 1.05rem;
}

.h1b-journey-band ol {
  margin: 0;
  padding-left: 1.35rem;
  line-height: 1.65;
  color: #e2e8f0;
}

.h1b-journey-band a {
  color: #93c5fd;
  font-weight: 600;
}

.h1b-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: 14px;
  border: 1px solid rgba(44, 95, 78, 0.22);
}

.h1b-table-wrap .data-table {
  margin: 0;
  background: linear-gradient(145deg, #fdfbf8 0%, #ffffff 100%);
  color: #14110e;
}

.h1b-table-wrap .data-table th {
  color: #2c5f4e;
}

.h1b-table-wrap .data-table td {
  color: #3d3834;
}

.h1b-table-wrap .data-table a {
  color: #1d4ed8;
  font-weight: 600;
}

.h1b-topic-card.reveal,
.h1b-panel.reveal,
.h1b-journey-band.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease, ease), transform 0.65s var(--ease, ease);
}

.h1b-topic-card.reveal.visible,
.h1b-panel.reveal.visible,
.h1b-journey-band.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
