/* Styles globaux des pages articles ARTIPOS.
   Extrait depuis prix-caisse-enregistreuse.html pour supprimer les doublons entre articles. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../../Content/Fonts/plus-jakarta-sans-v12-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../../Content/Fonts/plus-jakarta-sans-v12-latin-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../../Content/Fonts/inter-v20-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../../Content/Fonts/inter-v20-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --article-width: 680px;
  --article-block-gap: 28px;
  --article-section-gap: 40px;
}

/* On réinitialise les marges par défaut des navigateurs pour avoir une base propre */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* Permet un défilement fluide quand on clique sur un lien du menu */
  font-size: 16px;
  overflow-x: clip;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: #ffffff;
  color: #111110;
  overflow-x: clip; /* Empêche la page de déborder sur les côtés */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased; /* Rend le texte plus net sur Mac/iOS */
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 2000;
  padding: 12px 16px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1400;
  width: 100%;
  height: 4px;
  background: transparent;
  pointer-events: none;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #f09163 0%, var(--accent) 100%);
  box-shadow: 0 0 18px rgba(223, 101, 49, 0.5);
  transition: width 0.12s linear;
}

/* ─────────────────────────────── 4. ANIMATIONS D'APPARITION ────────────── */
/* Classes utilisées par Javascript pour faire apparaître les éléments quand on scrolle */
.js .reveal {
  opacity: 0;
  transform: translateY(28px); /* Descendu de 28px au départ */
  transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1);
}
.js .reveal.visible {
  opacity: 1;
  transform: none; /* Reprend sa place normale */
}

/* Délais pour créer un effet "cascade" ou "domino" */
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }

/* Autres types d'animations (zoom, gauche, droite) */
.js .reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1);
}
.js .reveal-scale.visible { opacity: 1; transform: scale(1); }

.js .reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1);
}
.js .reveal-left.visible { opacity: 1; transform: none; }

.js .reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity .65s cubic-bezier(.22,1,.36,1), transform .65s cubic-bezier(.22,1,.36,1);
}
.js .reveal-right.visible { opacity: 1; transform: none; }

/* Split-word animation sur les titres */
.section-title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.15;
}
.section-title .word-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform .7s cubic-bezier(.16,1,.3,1);
}
.section-title.words-visible .word-inner {
  transform: translateY(0);
}

/* Tilt 3D cards */
.tilt-card {
  transition: transform .15s ease, box-shadow .15s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Blur reveal (mockup caisse) */
.js .img-reveal {
  opacity: 0;
  filter: blur(10px);
  transform: scale(1.03);
  transition: opacity .9s ease, filter .9s ease, transform .9s ease;
}
.js .img-reveal.visible {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

/* Clip-path wipe reveal (pack equipment images) */
.js .img-wipe {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1s cubic-bezier(.16,1,.3,1);
}
.js .img-wipe.visible {
  clip-path: inset(0 0 0% 0);
}

/* Slide-up + flottement (iPhone mockup) */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.js .img-slide-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
}
.js .img-slide-up.visible {
  opacity: 1;
  transform: translateY(0);
  animation: float 4s ease-in-out infinite;
  animation-delay: .9s;
}

/* Slide-left + fade */
.js .img-slide-left {
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity .85s cubic-bezier(.16,1,.3,1), transform .85s cubic-bezier(.16,1,.3,1);
}
.js .img-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger auto sur grilles */
.js .v1-pill,
.js .callout-card,
.js .side-card,
.js .related-card,
.js .faq-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s cubic-bezier(.22,1,.36,1), transform .55s cubic-bezier(.22,1,.36,1);
}
.js .v1-pill.stagger-visible,
.js .callout-card.stagger-visible,
.js .side-card.stagger-visible,
.js .related-card.stagger-visible,
.js .faq-item.stagger-visible {
  opacity: 1;
  transform: none;
}

/* Template global pour les heros des pages articles */
.article-hero {
  position: relative;
  padding-top: var(--artipos-layout-hero-top, 160px);
  padding-bottom: calc(var(--artipos-layout-hero-top, 160px) - var(--artipos-header-height, 62px));
  isolation: isolate;
}

.article-hero::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background:
    radial-gradient(circle at 82% 18%, rgba(232, 98, 42, 0.12), transparent 28%),
    linear-gradient(180deg, #fffdfb 0%, #fbf6f1 100%);
  border-bottom: 1px solid var(--border);
}

.article-hero .hero-panel {
  position: relative;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.article-hero .hero-panel::before {
  content: none;
}

.article-hero .hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding: 0;
  align-items: start;
}

.article-hero .hero-copy h1 {
  margin: 24px 0 18px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2.45rem, 5vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.article-hero .hero-copy .lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.article-hero .hero-meta-card {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.article-hero .meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.article-hero .v1-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(17, 17, 16, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.article-hero .meta-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.article-hero .meta-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(17, 17, 16, 0.42);
  flex-shrink: 0;
}

.article-hero .meta-value {
  display: block;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

@media (max-width: 980px) {
  .article-hero {
    padding-top: var(--artipos-layout-hero-top-tablet, 120px);
    padding-bottom: calc(var(--artipos-layout-hero-top-tablet, 120px) - var(--artipos-header-height, 62px));
  }
}

@media (max-width: 720px) {
  .article-hero {
    padding-top: var(--artipos-layout-hero-top-mobile, 104px);
    padding-bottom: calc(var(--artipos-layout-hero-top-mobile, 104px) - var(--artipos-header-height, 62px));
  }

  .article-hero .hero-grid {
    padding: 0;
  }

  .article-hero .hero-copy h1 {
    font-size: clamp(2.2rem, 10vw, 3.4rem);
  }
}

/* Espacement du corps de page article */
.page-shell {
  padding-top: 0;
  padding-bottom: 96px;
}

.article-layout {
  display: grid;
  margin-top: 80px;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 150px;
  align-items: start;
}

.article-main {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.cover {
  margin: 0 0 32px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #efe5da;
}

.cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 500px;
  object-fit: cover;
}

.cover figcaption {
  padding: 14px 18px 18px;
  color: var(--muted);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.9);
}

.article-body {
  background: rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-lg);
  padding: 0;
}

.article-body > *:first-child {
  margin-top: 0;
}

.article-body > *:last-child {
  margin-bottom: 0;
}

.intro {
  margin-bottom: 28px;
  padding: 0 0 24px;
}

.intro p {
  margin: 0;
  font-size: 1.08rem;
  color: #3d352f;
}

.prose h2,
.prose h3,
.prose h4 {
  scroll-margin-top: calc(var(--artipos-header-height, 62px) + 20px);
  font-family: "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.04em;
  color: var(--text);
}

.prose h2 {
  margin: 56px 0 18px;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.prose h3 {
  margin: 34px 0 12px;
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.prose h4 {
  margin: 24px 0 8px;
  font-size: 1.05rem;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose figure,
.prose table,
.prose details {
  margin: 0 0 20px;
}

.prose p {
  color: #362f29;
  font-size: 1.03rem;
  line-height: 1.86;
}

.prose strong {
  color: #171310;
  font-weight: 600;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  color: #362f29;
}

.prose li + li {
  margin-top: 10px;
}

.prose blockquote {
  padding: 24px 26px;
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(180deg, rgba(223, 101, 49, 0.08) 0%, rgba(223, 101, 49, 0.03) 100%);
  color: #2b241f;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.55;
  letter-spacing: -0.03em;
}

.prose hr {
  margin: 34px 0;
  border: 0;
}

.prose code {
  padding: 0.15em 0.42em;
  border-radius: 8px;
  background: #f5ede3;
  font-size: 0.92em;
}

.callout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0;
}

.callout-grid.is-split {
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.callout-divider {
  width: 1px;
  background: linear-gradient(180deg, rgba(17, 17, 16, 0) 0%, rgba(17, 17, 16, 0.12) 18%, rgba(17, 17, 16, 0.12) 82%, rgba(17, 17, 16, 0) 100%);
  border-radius: 999px;
}

.callout-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 22px 24px;
}

.faq-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.faq-item {
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  padding: 0 20px 18px;
  margin: 0;
}

.article-faq-card {
  margin: var(--article-section-gap) 0 var(--article-block-gap);
}

.article-faq-card > h2 {
  margin: 0 0 14px;
}

.article-faq-card .faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0;
  max-width: none;
}

.article-faq-card .faq-item {
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.article-faq-card .faq-item:last-child {
  border-bottom: 0;
}

.article-faq-card .faq-btn {
  width: 100%;
  padding: 22px 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.4;
  text-align: left;
}

.article-faq-card .faq-btn:hover {
  color: var(--accent);
}

.article-faq-card .faq-btn-icon {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform .25s, background .25s, border-color .25s;
}

.article-faq-card .faq-item.open .faq-btn-icon {
  transform: rotate(45deg);
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.article-faq-card .faq-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height .35s cubic-bezier(.22, 1, .36, 1);
}

.article-faq-card .faq-item.open .faq-body {
  max-height: 400px;
}

.article-faq-card .faq-body-inner {
  padding-bottom: 20px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.75;
}

.article-footer {
  margin-top: 38px;
  padding-top: 26px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.author-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.92);
}

.author-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(223,101,49,0.16), rgba(223,101,49,0.04));
  color: var(--accent);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
}

.author-box h3 {
  margin: 0 0 6px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.author-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.article-sidebar {
  width: 100%;
  max-width: 320px;
  justify-self: end;
  display: grid;
  gap: 18px;
  align-self: stretch;
  align-content: start;
}

.toc-sticky {
  position: sticky;
  top: calc(var(--artipos-header-height, 62px) + 24px);
  z-index: 2;
  align-self: start;
  display: grid;
  gap: 18px;
}

.side-card {
  padding: 22px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.82);
}

.toc-sidebar-card {
  box-shadow: 0 8px 22px rgba(17, 17, 16, 0.04);
}

.toc-sidebar-card h2 {
  margin-bottom: 18px;
}

.side-card h2,
.side-card h3 {
  margin: 0 0 14px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.side-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.toc {
  list-style: disc;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  padding-left: 1.1rem;
}

.toc li {
  color: var(--accent);
}

.side-kpis {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.side-kpi {
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: #fffefc;
  border: 1px solid rgba(39, 27, 18, 0.08);
}

.side-kpi span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-kpi strong {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.side-card .actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.editor-note,
.editor-note h3,
.editor-note p,
.editor-note strong {
  color: #1d7a46 !important;
}

.editor-note {
  border-color: rgba(29, 122, 70, 0.18) !important;
  background: rgba(29, 122, 70, 0.05) !important;
}

.editor-note .meta-label,
.editor-note .side-kpi span,
.editor-note .side-kpi strong,
.editor-note .related-card span {
  color: #1d7a46 !important;
}

.editor-note .meta-label::before {
  background: #1d7a46;
}

.editor-note-tag {
  color: #1d7a46 !important;
  background: rgba(29, 122, 70, 0.08) !important;
  border-color: rgba(29, 122, 70, 0.18) !important;
}

.related {
  margin-top: 52px;
}

.related-card-thumb {
  margin: -18px -18px 14px;
  overflow: hidden;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.related-card-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.related-card:hover .related-card-thumb img {
  transform: scale(1.04);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.05em;
}

.section-heading p {
  margin: 0;
  max-width: 48ch;
  color: var(--muted);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

@media (max-width: 1120px) {
  .article-hero .hero-grid {
    grid-template-columns: 1fr;
  }

  .article-hero .hero-copy h1 {
    max-width: 100%;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-main {
    max-width: 100%;
  }

}

@media (max-width: 980px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .article-sidebar {
    display: none;
    max-width: 100%;
    justify-self: stretch;
  }

  .toc-sticky {
    position: static;
  }
}

@media (max-width: 980px) {
  .toc-sidebar-card {
    width: 100%;
    margin-bottom: 32px;
  }

  .toc a {
    font-weight: 600;
  }

  .editor-note {
    margin-top: 0;
    margin-bottom: 32px;
  }
}

@media (max-width: 720px) {
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .related {
    margin-top: 24px;
  }

  .callout-grid {
    grid-template-columns: 1fr;
  }

  .callout-grid.is-split {
    grid-template-columns: 1fr;
  }

  .callout-divider {
    display: none;
  }
  .article-body {
    padding: 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
