/* ============================================================
   Outil « numéro d'écrou » — blog/partials/outil-ecrou.php
   Jetons du design system uniquement : le thème sombre suit tout seul.
   Les sélecteurs sont préfixés .article-body là où il faut passer devant
   la typographie d'article (p, a, strong).
   ============================================================ */
.oe {
    margin: 36px 0 44px;
    padding: 26px 26px 22px;
    background: var(--surface);
    border: var(--card-border-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
    scroll-margin-top: 100px;
}
.article-body .oe p { margin: 0; }
.article-body .oe a { text-decoration: none; }
.article-body .oe a:hover { opacity: 1; }

/* ── En-tête ── */
.oe__badge {
    display: inline-block;
    font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: var(--trust);
    background: var(--trust-100);
    border-radius: var(--r-full);
    padding: 5px 12px;
}
.article-body .oe .oe__title {
    font-family: var(--font-display);
    font-size: 1.3rem; font-weight: 800; line-height: 1.3;
    color: var(--ink);
    margin: 12px 0 8px;
}
.article-body .oe .oe__lead {
    font-size: .94rem; line-height: 1.65;
    color: var(--ink-soft);
}

/* ── Recherche ── */
.oe__search { position: relative; margin-top: 20px; }
.oe__label {
    display: block;
    font-size: .82rem; font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
}
.oe__field { position: relative; }
.oe__field-ico {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px;
    color: var(--muted); pointer-events: none;
}
.oe__input {
    width: 100%; height: 54px;
    padding: 0 16px 0 48px;
    background: var(--surface-2);
    border: 2px solid var(--border-strong);
    border-radius: 14px;
    color: var(--ink);
    font: inherit; font-size: 1rem;   /* 16px : pas de zoom automatique sur iOS */
    outline: none;
    -webkit-appearance: none; appearance: none;
    transition: border-color .2s, box-shadow .2s;
}
.oe__input::placeholder { color: var(--muted); }
.oe__input::-webkit-search-cancel-button { display: none; }
.oe__input:focus {
    border-color: var(--brand-600);
    box-shadow: 0 0 0 4px var(--ring);
}

.oe__list {
    position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px);
    max-height: 320px; overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
}
.oe__list[hidden] { display: none; }
.oe__opt {
    display: flex; align-items: center; gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: none; border: 0; border-radius: 10px;
    font: inherit; text-align: left; color: var(--ink);
    cursor: pointer;
}
.oe__opt:hover, .oe__opt.is-active { background: var(--brand-100); }
.oe__opt-abrev {
    flex: 0 0 auto;
    min-width: 38px; text-align: center;
    font-size: .68rem; font-weight: 800; letter-spacing: .03em;
    color: var(--brand-600);
    background: var(--brand-100);
    border-radius: 7px;
    padding: 4px 6px;
}
.oe__opt-body { min-width: 0; }
.oe__opt-name { display: block; font-size: .92rem; font-weight: 600; line-height: 1.35; }
.oe__opt-meta { display: block; font-size: .78rem; color: var(--muted); }
.oe__empty { padding: 12px; font-size: .88rem; color: var(--muted); }
.article-body .oe .oe__empty a { color: var(--brand-600); text-decoration: underline; }

/* ── Raccourcis ── */
.oe__quick {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-top: 14px;
}
.oe__quick-label { font-size: .8rem; color: var(--muted); margin-right: 2px; }
.article-body .oe .oe__chip {
    font-size: .8rem; font-weight: 600;
    color: var(--ink-soft);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    padding: 6px 13px;
    transition: border-color .2s, color .2s;
}
.article-body .oe .oe__chip:hover { border-color: var(--brand); color: var(--brand-600); }

/* ── Résultat ── */
.oe__result { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.oe__result[hidden] { display: none; }
.oe__result:focus { outline: none; }
.oe__loading { font-size: .9rem; color: var(--muted); }

.oe__etab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 20px; }
.oe__etab-name { font-size: 1.08rem; font-weight: 800; color: var(--ink); line-height: 1.3; }
.oe__etab-meta { font-size: .84rem; color: var(--muted); }

.oe__steps { display: flex; flex-direction: column; }
.oe__step {
    position: relative;
    display: grid; grid-template-columns: 34px 1fr; gap: 0 14px;
    padding-bottom: 22px;
}
.oe__step::before {              /* trait qui relie les étapes */
    content: '';
    position: absolute; left: 16px; top: 36px; bottom: 2px;
    width: 2px; background: var(--border-strong);
}
.oe__step:last-child { padding-bottom: 0; }
.oe__step:last-child::before { display: none; }
.oe__num {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--brand); color: #fff;
    font-size: .9rem; font-weight: 800;
}
html[data-theme="dark"] .oe__num { color: #0C0C16; }
.oe__step-body { min-width: 0; }
.oe__step-kicker {
    font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--brand-600);
    padding-top: 2px;
}
.oe__step-title { font-size: 1rem; font-weight: 700; color: var(--ink); line-height: 1.4; margin: 2px 0 6px; }
.article-body .oe .oe__step-text { font-size: .9rem; line-height: 1.65; color: var(--ink-soft); }
.oe__step-text + .oe__actions, .oe__step-title + .oe__actions { margin-top: 12px; }

.oe__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.article-body .oe .oe__btn {
    display: inline-flex; align-items: center; gap: 8px;
    max-width: 100%;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: .95rem; font-weight: 700; line-height: 1.3;
    color: var(--ink);
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    overflow-wrap: anywhere;
    transition: border-color .2s, background .2s;
}
.article-body .oe .oe__btn:hover { border-color: var(--brand); }
.oe__btn svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--brand-600); }
.article-body .oe .oe__btn--main {
    background: var(--brand); border-color: var(--brand); color: #fff;
    box-shadow: var(--shadow-brand);
}
html[data-theme="dark"] .article-body .oe .oe__btn--main { color: #0C0C16; }
.article-body .oe .oe__btn--main:hover { background: var(--brand-600); }
.oe__btn--main svg { color: currentColor; }
.oe__btn--mail { font-size: .86rem; font-weight: 600; }

.article-body .oe .oe__detail { font-size: .82rem; color: var(--muted); margin-top: 8px; line-height: 1.55; }

/* Autres contacts (étape 3) */
.oe__rows { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.oe__row-label { font-size: .8rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.article-body .oe .oe__row-note { font-size: .8rem; color: var(--muted); margin-top: 5px; line-height: 1.5; }

/* Consigne propre à l'établissement / phrase à dire */
.oe__note {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    font-size: .88rem; line-height: 1.6;
    color: var(--ink-soft);
    background: var(--warm-100);
    border: 1px solid transparent;
}
.oe__note strong, .oe__say strong { color: var(--ink); font-weight: 700; }
.oe__say {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    font-size: .88rem; line-height: 1.6;
    color: var(--ink-soft);
    background: var(--brand-50);
    border: 1px solid var(--border);
}
.oe__say q { font-style: italic; color: var(--ink); quotes: '« ' ' »'; }

/* Suite : fiche complète + offre */
.oe__next {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px;
    margin-top: 18px; padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: .86rem;
}
.article-body .oe .oe__link { font-weight: 700; color: var(--brand-600); }
.article-body .oe .oe__link:hover { text-decoration: underline; }
.article-body .oe .oe__offer {
    flex: 1 1 100%;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    background: var(--trust-100);
    color: var(--trust);
    font-size: .86rem; line-height: 1.5;
    transition: box-shadow .2s;
}
.article-body .oe .oe__offer strong { color: var(--trust); font-weight: 700; }
.oe__offer-cta { font-weight: 700; white-space: nowrap; }
.article-body .oe .oe__offer:hover { box-shadow: 0 0 0 2px var(--trust); }

.article-body .oe .oe__foot { margin-top: 18px; font-size: .76rem; line-height: 1.55; color: var(--faint); }
.article-body .oe .oe__foot a { color: inherit; text-decoration: underline; }

.oe a:focus-visible, .oe__opt:focus-visible {
    outline: 3px solid var(--ring); outline-offset: 2px;
}

@media (max-width: 560px) {
    .oe { padding: 20px 16px 18px; margin: 28px 0 36px; border-radius: var(--r-md); }
    .article-body .oe .oe__title { font-size: 1.14rem; }
    .oe__step { grid-template-columns: 30px 1fr; gap: 0 12px; }
    .oe__num { width: 30px; height: 30px; font-size: .84rem; }
    .oe__step::before { left: 14px; top: 32px; }
    .article-body .oe .oe__btn--main { width: 100%; justify-content: center; padding: 13px 16px; }
}
