/* Page /compatibilite (#151). Préfixe de fichier install- : routé vers Next.js par nginx. */
.cp {
  --cp-navy: #455763;
  --cp-ink: #2b3840;
  --cp-sand: #F0EBE4;
  --cp-mist: #f6f8f9;
  --cp-line: rgba(69,87,99,.14);
  --cp-white: #ffffff;
  --cp-green: #1f9d55;
  --cp-red: #b03a2e;
  --cp-red-soft: #f8e3e0;
  --cp-ease: cubic-bezier(0.23, 1, 0.32, 1);
  color: var(--cp-navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.cp-wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.cp h1, .cp h2, .cp h3 { color: var(--cp-ink); text-wrap: balance; margin: 0; }
.cp h2 { font-size: 1.875rem; line-height: 1.2; margin-bottom: .75rem; }
.cp h3 { font-size: 1.05rem; }
.cp p { margin: 0; line-height: 1.6; }

.cp-hero { background: var(--cp-sand); padding: 4.5rem 0 3.5rem; }
.cp-hero-inner { max-width: 48rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.cp-eyebrow { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: rgba(69,87,99,.75); }
.cp h1 { font-size: 2.75rem; line-height: 1.1; }
.cp-lede { font-size: 1.125rem; color: rgba(69,87,99,.85); max-width: 40rem; }
.cp-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: .5rem; }

.cp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.4rem; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; transition: transform .2s var(--cp-ease), box-shadow .2s var(--cp-ease); }
.cp-btn:active { transform: scale(0.97); }
.cp-btn:focus-visible { outline: 2px solid var(--cp-navy); outline-offset: 3px; }
.cp-btn-primary { background: var(--cp-navy); color: var(--cp-white); }
.cp-btn-ghost { border: 1.5px solid var(--cp-navy); color: var(--cp-navy); background: transparent; }

.cp-section { padding: 4rem 0; }
.cp-section-alt { background: var(--cp-mist); }
.cp-section-lede { color: rgba(69,87,99,.8); max-width: 44rem; margin-bottom: 2rem; }

.cp-steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.cp-step { display: flex; gap: 1rem; background: var(--cp-white); border: 1px solid var(--cp-line); border-radius: 14px; padding: 1.25rem; min-width: 0; }
.cp-step-n { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--cp-navy); color: var(--cp-white); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.cp-step h3 { margin-bottom: .35rem; }
.cp-step p { font-size: .92rem; color: rgba(69,87,99,.85); }

.cp-adapters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.cp-adapter-group { background: var(--cp-white); border: 1px solid var(--cp-line); border-radius: 14px; padding: 1.5rem; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.cp-adapter-group p { font-size: .92rem; color: rgba(69,87,99,.85); }
.cp-chips { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.cp-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .7rem .4rem; border: 1px solid var(--cp-line); border-radius: 10px; background: var(--cp-mist); }
.cp-chip-mm { font-weight: 700; font-size: 1.05rem; color: var(--cp-ink); font-variant-numeric: tabular-nums; }
.cp-chip-code { font-size: .72rem; letter-spacing: .03em; color: rgba(69,87,99,.65); }

.cp-incompat { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.cp-incompat-item { display: flex; gap: .9rem; padding: 1.1rem 1.25rem; border: 1px solid var(--cp-line); border-radius: 14px; background: var(--cp-white); min-width: 0; }
.cp-incompat-icon { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--cp-mist); color: var(--cp-navy); display: flex; align-items: center; justify-content: center; }
.cp-incompat-item h3 { margin-bottom: .25rem; }
.cp-incompat-item p { font-size: .92rem; color: rgba(69,87,99,.85); }
.cp-note { margin-top: 1.25rem; font-size: .92rem; color: rgba(69,87,99,.8); }

.cp-faq { display: flex; flex-direction: column; gap: .75rem; max-width: 48rem; margin-top: 1.5rem; }
.cp-faq details { background: var(--cp-white); border: 1px solid var(--cp-line); border-radius: 12px; padding: .25rem 1.25rem; }
.cp-faq summary { cursor: pointer; font-weight: 600; color: var(--cp-ink); padding: .9rem 0; min-height: 44px; }
.cp-faq details p { padding-bottom: 1rem; font-size: .95rem; color: rgba(69,87,99,.85); }

.cp-cta { background: var(--cp-navy); padding: 4rem 0; }
.cp-cta-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.cp-cta h2, .cp-cta p { color: var(--cp-white); }
.cp-cta .cp-btn-primary { background: var(--cp-white); color: var(--cp-navy); }
.cp-cta .cp-btn-ghost { border-color: var(--cp-white); color: var(--cp-white); }

@media (max-width: 1279px) {
  .cp h1 { font-size: 2.5rem; }
}
@media (max-width: 1023px) {
  .cp-steps { grid-template-columns: 1fr; }
  .cp-adapters { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .cp-hero { padding: 3rem 0 2.5rem; }
  .cp h1 { font-size: 2rem; }
  .cp h2 { font-size: 1.5rem; }
  .cp-section { padding: 2.75rem 0; }
  .cp-incompat { grid-template-columns: 1fr; }
  .cp-hero-actions .cp-btn { width: 100%; }
}
@media (max-width: 480px) {
  .cp-wrap { padding: 0 1rem; }
  .cp h1 { font-size: 1.75rem; }
  .cp-chips { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .cp-btn { transition: none; }
}

/* Assistant de compatibilité */
.cp-wizard-section { padding-top: 3rem; }
.cpw { background: var(--cp-white); border: 1px solid var(--cp-line); border-radius: 18px; padding: 2rem; box-shadow: 0 10px 30px rgba(69,87,99,.08); max-width: 52rem; display: flex; flex-direction: column; gap: 1.25rem; }
.cpw h3 { font-size: 1.3rem; }
.cpw-progress { display: flex; gap: .4rem; }
.cpw-dot { flex: 1; height: 4px; border-radius: 4px; background: var(--cp-line); transition: background .3s var(--cp-ease); }
.cpw-dot.on { background: var(--cp-navy); }
.cpw-step { display: flex; flex-direction: column; gap: 1rem; }
.cpw-help { color: rgba(69,87,99,.8); font-size: .95rem; }
.cpw-shapes { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; }
.cpw-shape, .cpw-choice, .cpw-circle-btn { font: inherit; color: var(--cp-navy); background: var(--cp-white); border: 1.5px solid var(--cp-line); border-radius: 14px; cursor: pointer; transition: border-color .2s var(--cp-ease), transform .2s var(--cp-ease), box-shadow .2s var(--cp-ease); }
.cpw-shape:hover, .cpw-choice:hover, .cpw-circle-btn:hover { border-color: var(--cp-navy); box-shadow: 0 4px 14px rgba(69,87,99,.1); }
.cpw-shape:active, .cpw-choice:active, .cpw-circle-btn:active { transform: scale(0.97); }
.cpw-shape:focus-visible, .cpw-choice:focus-visible, .cpw-circle-btn:focus-visible, .cpw-link-btn:focus-visible { outline: 2px solid var(--cp-navy); outline-offset: 2px; }
.cpw-shape { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem .5rem; font-size: .85rem; font-weight: 600; text-align: center; }
.cpw-shape svg, .cpw-thread-icon { width: 56px; height: 56px; fill: none; stroke: var(--cp-navy); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cpw-thread-icon { width: 72px; height: 45px; }
.cpw-choices { display: flex; flex-wrap: wrap; gap: .75rem; }
.cpw-choice { min-height: 48px; padding: .8rem 1.4rem; font-weight: 600; }
.cpw-choices-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.cpw-choice-tall { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1.2rem; text-align: center; }
.cpw-choice-tall span { font-weight: 400; font-size: .85rem; color: rgba(69,87,99,.8); }
.cpw-calib { background: var(--cp-mist); border-radius: 14px; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; overflow: hidden; }
.cpw-calib-title { font-size: .9rem; font-weight: 600; }
.cpw-card { box-sizing: border-box; max-width: 100%; height: 72px; border-radius: 10px 10px 0 0; border-bottom: none !important; border: 2px dashed var(--cp-navy); background: linear-gradient(135deg, rgba(69,87,99,.06), rgba(69,87,99,.14)); display: flex; align-items: flex-end; padding: .6rem; font-size: .75rem; color: rgba(69,87,99,.75); }
.cpw-calib-label { font-size: .82rem; color: rgba(69,87,99,.8); }
.cpw-calib input[type="range"] { width: 100%; accent-color: var(--cp-navy); min-height: 32px; }
.cpw-circles { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.cpw-circle-btn { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .5rem; padding: .9rem .9rem .7rem; min-width: 96px; }
.cpw-circle { display: block; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--cp-navy); background: rgba(69,87,99,.06); }
.cpw-circle-label { font-weight: 700; font-variant-numeric: tabular-nums; }
.cpw-link-btn { font: inherit; background: none; border: none; padding: .5rem 0; color: var(--cp-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: flex-start; min-height: 44px; }
.cpw-nav { display: flex; justify-content: space-between; }
.cpw-result { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.cpw-result-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; color: var(--cp-white); }
.cpw-result-ok .cpw-result-icon { background: var(--cp-green); }
.cpw-result-no .cpw-result-icon { background: var(--cp-navy); }
.cpw-result-doubt .cpw-result-icon { background: var(--cp-navy); }
.cpw-result-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

@media (max-width: 1023px) {
  .cpw-shapes { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .cpw { padding: 1.25rem; }
  .cpw-choices-2 { grid-template-columns: 1fr; }
  .cpw-result-actions .cp-btn { width: 100%; }
}
@media (max-width: 480px) {
  .cpw-shapes { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .cpw-dot, .cpw-shape, .cpw-choice, .cpw-circle-btn { transition: none; }
}
.cpw-adapters { display: flex; flex-wrap: wrap; gap: 1rem; }
.cpw-adapter { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .75rem 1rem; border: 1px solid var(--cp-line); border-radius: 14px; background: var(--cp-mist); }
.cpw-adapter figcaption { font-weight: 700; font-size: .85rem; letter-spacing: .03em; color: var(--cp-ink); }
.cp-chip svg { display: block; }
.cpw-shape img { width: 100%; max-width: 140px; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: #fff; }
.cpw-choice-tall img { width: 100%; max-width: 200px; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.cpw-media { display: flex; gap: 1.25rem; align-items: center; }
.cpw-media img { width: 180px; max-width: 40%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 14px; flex-shrink: 0; }
@media (max-width: 480px) {
  .cpw-media { flex-direction: column; align-items: stretch; }
  .cpw-media img { width: 100%; max-width: 100%; }
}
.cp-incompat-img { flex-shrink: 0; width: 88px; height: 88px; object-fit: cover; border-radius: 10px; background: #fff; border: 1px solid var(--cp-line); }
button.cp-btn { border: none; font: inherit; font-weight: 600; cursor: pointer; }

/* Fenêtre de l'assistant sur la fiche produit */
.cpm-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(43, 56, 64, .55); display: flex; align-items: center; justify-content: center; padding: 1.5rem; animation: cpmFade .2s var(--cp-ease, ease); }
.cpm-panel { position: relative; width: 100%; max-width: 820px; max-height: calc(100vh - 3rem); overflow-y: auto; background: #f6f8f9; border-radius: 20px; padding: 1.5rem; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.cpm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.cpm-head h2 { font-size: 1.4rem; margin: 0; color: #2b3840; }
.cpm-close { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(69,87,99,.2); background: #fff; color: #455763; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.cpm-close:focus-visible { outline: 2px solid #455763; outline-offset: 2px; }
.cpm-panel .cpw { max-width: none; box-shadow: none; }
@keyframes cpmFade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 768px) {
  .cpm-overlay { padding: 0; align-items: stretch; }
  .cpm-panel { max-width: none; max-height: none; height: 100%; border-radius: 0; padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .cpm-overlay { animation: none; } }

/* Alignement sur le style des autres pages */
.cp h1, .cp h2 { font-weight: 800; letter-spacing: -0.01em; }
.cp h3 { font-weight: 700; }
.cp-wizard-section .cp-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cp-wizard-section .cpw { width: 100%; margin: 0 auto; text-align: left; }
.cp-faq { margin-left: auto; margin-right: auto; }
.cp-section > .cp-wrap > h2 { text-align: center; }
.cp-section > .cp-wrap > .cp-section-lede { margin-left: auto; margin-right: auto; text-align: center; }
.cp-faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cp-faq summary::-webkit-details-marker { display: none; }
.cp-faq summary::after { content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--cp-navy); transition: transform .2s var(--cp-ease); }
.cp-faq details[open] summary::after { transform: rotate(45deg); }
