.ap-page,
.ap-product,
.ap-links {
    --ap-ink: #060E26;
    --ap-violet: #7E6AF4;
    --ap-rose: #EE285F;
    --ap-copy: #0E0E0E;
    --ap-muted: #5C5C5C;
    --ap-rule: #d9d7e2;
    --ap-paper: #f7f6fe;
    color: var(--ap-copy);
}
.ap-page {
    width: min(100% - 32px, 1260px);
    max-width: 1260px;
    min-height: 50vh;
    margin: 0 auto;
    padding: clamp(18px, 4vw, 56px) 0 clamp(48px, 7vw, 100px);
    font-size: 17px;
    line-height: 1.6;
}
.ap-page :is(h1,h2,h3),
.ap-product h2 {
    color: var(--ap-ink);
    line-height: 1.15;
    text-wrap: pretty;
}
.ap-page h1 { font-size: clamp(34px, 5vw, 62px); margin: 0 0 16px; letter-spacing: -.035em; }
.ap-page h2 { font-size: clamp(21px, 2vw, 30px); margin: 0 0 .55em; }
.ap-page h3 { font-size: clamp(17px, 1.7vw, 21px); margin: 0 0 .5em; }
.ap-page-header {
    max-width: 64ch;
    margin: clamp(24px, 5vw, 72px) 0 36px;
    padding-inline-start: clamp(14px, 2.4vw, 32px);
    border-inline-start: 4px solid var(--ap-rose);
}
.ap-page-header p { font-size: clamp(17px, 2vw, 21px); margin: 0; }
.ap-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 5px 18px;
    margin: 12px 0 24px;
}
.home .ap-links {
    width: min(1320px, calc(100% - clamp(28px, 6vw, 112px)));
    margin: -20px auto clamp(30px, 4vw, 58px);
}
.ap-links a,
.ap-page a:not(.ap-button),
.ap-product a:not(.ap-button) {
    color: var(--ap-ink);
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--ap-violet);
}
.ap-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
.ap-page a:hover,
.ap-product a:hover,
.ap-links a:hover { text-decoration-color: var(--ap-rose); }
.ap-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}
.ap-button,
.ap-page a.ap-button,
.ap-product a.ap-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 14px;
    min-height: 44px;
    color: #fff;
    background: var(--ap-ink);
    border: 1px solid var(--ap-ink);
    border-radius: 7px;
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.3;
    text-transform: none;
    text-decoration: none;
    cursor: pointer;
}
.ap-button.ap-secondary { background: #fff; color: var(--ap-ink); }
.ap-button:hover,
.ap-page a.ap-button:hover,
.ap-product a.ap-button:hover { background: var(--ap-violet); color: var(--ap-ink); }
.ap-button[aria-disabled="true"] { background: #eae7f2; color: var(--ap-muted); border-color: var(--ap-rule); }
.ap-field {
    display: grid;
    align-content: start;
    gap: 5px;
    min-width: 0;
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    color: var(--ap-ink);
}
.ap-field small { font-size: 13px; font-weight: 400; color: var(--ap-muted); }
.ap-field :is(input,select,textarea) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 1px solid #82808f;
    border-radius: 6px;
    background-color: #fff;
    color: var(--ap-copy);
    font: inherit;
    font-size: 16px;
    font-weight: 400;
}
.ap-field select:disabled,
.ap-field :read-only:not(select):not([type="file"]) { background-color: var(--ap-paper); }
.ap-field input[type="file"] { height: auto; padding-block: 6px; }
.ap-muted,
.ap-feedback { font-size: 15px; color: var(--ap-muted); margin: 0 0 14px; }
.ap-feedback:empty { display: none; }
.ap-panel,
.ap-product {
    border: 1px solid var(--ap-rule);
    border-radius: 12px;
    padding: clamp(14px, 2.8vw, 26px);
    background: #fff;
    min-width: 0;
}
.ap-product { margin: 18px 0; font-size: 16px; }
.ap-product h2 { font-size: 22px; margin: 0 0 14px; }
.ap-product-preview {
    margin: 14px 0 0;
    background: var(--ap-paper);
    border: 1px solid var(--ap-rule);
    border-radius: 6px;
    overflow: hidden;
}
.ap-product-preview img { width: 100%; max-height: 380px; object-fit: contain; display: block; }
.ap-product-preview figcaption { padding: .6em 1em; color: var(--ap-muted); }
.ap-details { margin-block: 12px; border-top: 1px solid var(--ap-rule); padding-block: 9px; }
.ap-details summary { min-height: 40px; padding: 8px 2px; cursor: pointer; color: var(--ap-ink); font-weight: 650; }
.ap-facts { display: grid; grid-template-columns: minmax(105px, 1fr) minmax(0, 1.45fr); margin: 8px 0 15px; }
.ap-facts dt, .ap-facts dd { padding: 8px; margin: 0; border-bottom: 1px solid var(--ap-rule); overflow-wrap: anywhere; }
.ap-facts dt { font-weight: 650; }
.ap-facts + .ap-button { margin-bottom: 14px; }
.ap-docs { margin-top: 12px; }
.ap-filter-grid,
.ap-line-fields,
.ap-guide-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}
.ap-guide-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 20px; }
.ap-photo-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin: 16px 0;
    background: var(--ap-paper);
}
.ap-photo-tools p { grid-column: 1 / -1; margin: 0; }
.ap-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
    gap: 15px;
    margin-bottom: 18px;
}
.ap-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--ap-rule);
    border-radius: 12px;
    overflow: hidden;
}
.ap-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; background: var(--ap-paper); }
.ap-card-body { display: grid; align-content: start; justify-items: start; gap: 8px; padding: 14px; }
.ap-card-body h2 { font-size: 18px; overflow-wrap: anywhere; margin: 0; }
.ap-card-body p { margin: 0; }
.ap-project-head { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; align-items: end; }
.ap-project-head p, .ap-project-head label:has(textarea) { grid-column: 1 / -1; margin: 0; }
.ap-project-items, .ap-logistics { margin-top: 22px; }
.ap-area { margin: 22px 0; }
.ap-line { margin-bottom: 12px; }
.ap-line p.ap-muted { margin-bottom: 12px; }
.ap-line .ap-button { margin: 5px 8px 0 0; }
.ap-line textarea { margin-top: 2px; }
.ap-line .ap-details .ap-field:has(textarea) { margin-top: 12px; }
.ap-calculated { margin: 12px 0 0; font-weight: 650; color: var(--ap-ink); }
.ap-logistics .ap-field { max-width: 320px; }
.ap-logistics progress { width: 100%; height: 12px; accent-color: var(--ap-violet); }
.ap-percentage { display: block; font-size: 14px; color: var(--ap-muted); }
.ap-print { display: none; }
@media (max-width: 580px) {
    .ap-project-head, .ap-photo-tools { grid-template-columns: minmax(0,1fr); }
    .ap-results { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
    .ap-card-body { padding: 10px; }
    .ap-card-body h2 { font-size: 16px; }
    .ap-card-body .ap-button { width: 100%; font-size: 14px; }
    .home .ap-links { margin-top: -16px; }
}
@media print {
    body:has(> .ap-print) > :not(.ap-print) { display: none !important; }
    body:has(> .ap-print) { padding: 0 !important; background: #fff !important; overflow: visible !important; }
    body > .ap-print { display: block; margin: 0; color: #060E26; font: 11pt/1.5 system-ui, sans-serif; }
    .ap-print :is(h1,h2) { break-after: avoid; line-height: 1.15; color: #060E26; }
    .ap-print > :is(section,dl) { break-inside: avoid; }
    .ap-print-line { border-top: 1px solid #a6a2b6; padding-top: 7px; margin-bottom: 12px; }
    .ap-print p { color: #0E0E0E; margin: 0 0 6px; overflow-wrap: anywhere; }
    .ap-print > p { margin-bottom: 14px; }
}

/* 2026-11-30 : correction spécifique à la recette. */
.ap-page [hidden], .ap-page button[hidden] {display:none!important;}
.ap-page :is(a,button,input,select,textarea):focus-visible,.ap-product :is(a,button,input,select,textarea):focus-visible {outline:3px solid #5d327e;outline-offset:3px;}
@media (prefers-reduced-motion: reduce) {.ap-page *, .ap-product * {animation:none!important;transition:none!important;scroll-behavior:auto!important;}}

/* Comparateur et facettes v1.3 */
.ap-filter-grid select[multiple]{min-height:108px;padding:.35rem;max-height:180px}
.ap-filter-grid select[multiple] option{padding:.25rem .5rem}
.ap-compare-label{display:flex;gap:.45rem;align-items:center;font-size:.9rem}
.ap-compare-label input{width:1.1rem;height:1.1rem;accent-color:var(--ap-violet)}
.ap-comparison{margin:1rem 0}
.ap-comparison-scroll{max-width:100%;overflow-x:auto}
.ap-compare-table{min-width:520px;width:100%;border-collapse:collapse}
.ap-compare-table th,.ap-compare-table td{padding:.65rem;border-bottom:1px solid var(--ap-rule);text-align:start;vertical-align:top;overflow-wrap:anywhere}
.ap-compare-table th{font-weight:650;background:var(--ap-paper)}

/* Cards retain a stable media ratio, even when the source has no image. */
.ap-missing-photo {display:grid;place-items:center;width:100%;aspect-ratio:4/3;background:var(--ap-paper);color:var(--ap-muted);text-align:center;padding:12px;font-size:14px;}
.ap-card {transition:border-color .15s ease,box-shadow .15s ease;}
.ap-card:hover,.ap-card:focus-within {border-color:var(--ap-violet);box-shadow:0 4px 16px rgba(6,14,38,.08);}
@media (prefers-reduced-motion:reduce){.ap-card{transition:none!important;}}
#aizen-quote-guidance {border-left:3px solid #7E6AF4;padding:8px 12px;background:#f7f6fe;color:#060E26;}
