/* ==========================================================================
   ARCHE · Espace agence (admin/)
   S'appuie sur arche.css (polices, couleurs, boutons, vignettes).
   ========================================================================== */
body.ad { min-height: 100vh; min-height: 100dvh; overflow-x: hidden }
.ad .btn { isolation: isolate; cursor: pointer }
.ad .btn:disabled { opacity: .6; cursor: progress }
.ad .btn.danger { background: #b3261e; border-color: #b3261e; color: #fff }
.ad .btn.ghost.danger { background: transparent; color: #b3261e; border-color: rgba(179,38,30,.35) }
.ad .btn.ghost.danger:hover { color: #fff; border-color: #b3261e }
.ad .btn.ghost.danger::before { background: #b3261e }
.ad code { font: 500 .88em/1 ui-monospace, Menlo, monospace; background: var(--bg2); padding: 3px 6px; border-radius: 6px }
.ad-boot { min-height: 100vh; display: grid; place-items: center; color: var(--ink3); font-size: 14px }
.ad-link { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font: 600 14px/1.2 var(--sans); color: var(--ink2); text-decoration: none; cursor: pointer; transition: color .25s }
.ad-link:hover { color: var(--ink) }
.ad-link svg { width: 15px; height: 15px; flex: none }

/* ---------- Champs ---------- */
.f { display: grid; gap: 7px; min-width: 0; align-content: start }
.f > label, .f .lbl { font: 600 12.5px/1.3 var(--sans); color: var(--ink2) }
.f > label i { color: var(--accent); font-style: normal }
.f input, .f select, .f textarea, .ad-chip-add input {
  width: 100%; min-height: 48px; border: 1px solid var(--line2); border-radius: 12px; background: var(--bg); padding: 12px 14px;
  font: 400 15.5px/1.4 var(--sans); color: var(--ink); transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none
}
.f select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238c867c' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px }
.f textarea { resize: vertical; line-height: 1.6 }
.f input:focus, .f select:focus, .f textarea:focus, .ad-chip-add input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent2) }
.f input::placeholder, .f textarea::placeholder { color: var(--ink3); opacity: .8 }
.f small { font-size: 12.5px; color: var(--ink3); line-height: 1.45 }
.f .suf { position: relative }
.f .suf input { padding-right: 104px }
.f .suf em { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 500 13px/1 var(--sans); font-style: normal; color: var(--ink3); pointer-events: none; white-space: nowrap }
.f.bad input, .f.bad select, .f.bad textarea { border-color: #b3261e; box-shadow: 0 0 0 4px rgba(179,38,30,.1) }
.f.bad > label { color: #b3261e }
.row2, .row3 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; align-items: end }
.row3 { grid-template-columns: repeat(3, 1fr) }
.ad .seg { flex-wrap: wrap; width: fit-content; max-width: 100% }
.ad .seg button { padding: 10px 16px }
.ad-err { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fbeae7; color: #7a1f14; font-size: 14px; line-height: 1.5 }
.ad-err.ok { background: var(--accent2); color: var(--ink) }

/* interrupteur */
.ad-toggle { display: flex; gap: 12px; align-items: center; cursor: pointer; min-height: 48px; position: relative }
.ad-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px }
.ad-toggle i { flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line2); position: relative; transition: background .25s }
.ad-toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: transform .3s var(--ease) }
.ad-toggle input:checked + i { background: var(--accent) }
.ad-toggle input:checked + i::after { transform: translateX(18px) }
.ad-toggle input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 3px }
.ad-toggle b { display: block; font-size: 14.5px; font-weight: 600 }
.ad-toggle small { display: block; font-size: 12.5px; color: var(--ink3); line-height: 1.4; margin-top: 2px }

/* ---------- Écran de connexion ---------- */
.ad-gate { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, 1fr); position: relative }
.ad-gate::before { content: ''; background: var(--bg2) var(--gate, none) center / cover; border-radius: 0 28px 28px 0 }
.ad-gate-card { align-self: center; justify-self: center; width: min(460px, 100%); padding: 48px clamp(24px, 4vw, 56px); display: grid; gap: 22px }
.ad-gate-logo { display: flex; align-items: center; gap: 12px; font: 400 28px/1 var(--serif) }
.ad-gate-logo svg { width: 38px; height: 38px }
.ad-gate h1 { font-size: clamp(46px, 5vw, 68px) }
.ad-gate .lead { margin: 0; font-size: 17px }
.ad-gate .ad-form { display: grid; gap: 16px; margin-top: 6px }
.ad-gate .btn { justify-content: center }
.ad-gate .ad-link { justify-self: center }
.ad-gate-back { position: absolute; right: 28px; top: 26px; display: inline-flex; gap: 8px; align-items: center; font: 600 13.5px var(--sans); color: var(--ink2); text-decoration: none }
.ad-gate-back svg { width: 15px; height: 15px }
@media (max-width: 860px) {
  .ad-gate { grid-template-columns: 1fr; grid-template-rows: 30vh auto }
  .ad-gate::before { border-radius: 0 0 28px 28px }
  .ad-gate-card { padding: 32px 22px 56px }
  .ad-gate-back { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.4); right: 18px; top: 18px }
}

/* ---------- Cadre ---------- */
.ad-top { position: sticky; top: 0; z-index: 30; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 var(--gut); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line) }
.ad-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0 }
.ad-logo svg { width: 34px; height: 34px; flex: none }
.ad-logo b { display: block; font: 400 25px/1 var(--serif) }
.ad-logo small { display: block; font: 600 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink3); margin-top: 5px }
.ad-nav { display: flex; align-items: center; gap: 22px }
.ad-who { font-size: 13px; color: var(--ink3); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.ad-demo { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; padding: 12px var(--gut); background: var(--accent2); font-size: 14px; color: var(--ink2) }
.ad-demo p { margin: 0 }
.ad-demo b { color: var(--accent) }
.ad-demo-acts { display: flex; gap: 6px 22px; flex-wrap: wrap }
.ad-essai { margin-top: 6px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 14px; justify-items: start }
.ad-essai p { margin: 0; color: var(--ink2); font-size: 14px; line-height: 1.55 }
@media (max-width: 640px) { .ad-who, .ad-nav .ad-link span { display: none } .ad-nav { gap: 16px } .ad-top { height: 64px } }

/* ---------- Liste ---------- */
.ad-main { max-width: 1280px; margin: 0 auto; padding: clamp(32px, 5vw, 64px) var(--gut) 120px }
.ad-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap }
.ad-head h1 { font-size: clamp(54px, 7vw, 100px); margin-top: 14px }
.ad-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line); margin: 36px 0 28px }
.ad-stats div { padding: 18px 0 16px }
.ad-stats b { display: block; font: 400 clamp(34px, 3.4vw, 46px)/1 var(--serif) }
.ad-stats span { font-size: 13px; color: var(--ink3) }
.ad-tools { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; align-items: center }
.ad-search { flex: 1 1 280px }
.ad-search input { width: 100%; height: 48px; border: 1px solid var(--line2); border-radius: 999px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238c867c' stroke-width='1.5'%3E%3Ccircle cx='7' cy='7' r='5.2'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 18px center; padding: 0 18px 0 44px; font-size: 15px }
.ad-search input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent2) }
.ad-list { display: grid; gap: 10px }
.ad-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 22px; padding: 12px 14px 12px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; transition: border-color .25s, box-shadow .35s }
.ad-row:hover { border-color: var(--line2); box-shadow: 0 18px 40px -30px rgba(40,30,20,.45) }
.ad-thumb { width: 112px; aspect-ratio: 4 / 3; border-radius: 13px; overflow: hidden; background: var(--bg2); display: grid; place-items: center; color: var(--ink3) }
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease) }
.ad-row:hover .ad-thumb img { transform: scale(1.06) }
.ad-thumb svg { width: 28px; height: 28px }
.ad-title { font: 400 clamp(22px, 2vw, 27px)/1.05 var(--serif); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.ad-title:hover { color: var(--accent) }
.ad-sub { display: block; font-size: 13px; color: var(--ink3); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.ad-price { font: 400 22px/1 var(--serif); white-space: nowrap }
.ad-date { font-size: 12.5px; color: var(--ink3); white-space: nowrap }
.ad-pill { position: relative; display: inline-flex }
.ad-pill select { -webkit-appearance: none; appearance: none; border: 0; border-radius: 999px; padding: 9px 32px 9px 14px; font: 600 12.5px/1 var(--sans); cursor: pointer; background: var(--bg2); color: var(--ink2) }
.ad-pill::after { content: ''; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; opacity: .6 }
.ad-pill.s-en_ligne select { background: rgba(0,156,109,.13); color: #17694c }
.ad-pill.s-en_ligne { color: #17694c }
.ad-pill.s-vendu select { background: var(--accent2); color: var(--accent) }
.ad-pill.s-vendu { color: var(--accent) }
.ad-pill select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.ad-acts { display: flex; gap: 2px }
.ad-ico { width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; display: grid; place-items: center; color: var(--ink2); cursor: pointer; transition: background .2s, color .2s; text-decoration: none; flex: none }
.ad-ico:hover { background: var(--bg2); color: var(--ink) }
.ad-ico svg { width: 17px; height: 17px }
.ad-ico.danger:hover { color: #b3261e; background: #fbeae7 }
.ad-star[aria-pressed="true"] { color: var(--accent) }
.ad-star[aria-pressed="true"] svg path { fill: currentColor }
.ad-empty { text-align: center; padding: 80px 20px; border: 1px dashed var(--line2); border-radius: 24px }
.ad-empty h2 { font-size: clamp(40px, 5vw, 60px) }
.ad-empty p { max-width: 30em; margin: 14px auto 26px }
.ad-empty-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap }
@media (max-width: 1100px) { .ad-date { display: none } .ad-row { grid-template-columns: 96px minmax(0, 1fr) auto auto auto } .ad-thumb { width: 96px } }
@media (max-width: 760px) {
  .ad-stats { grid-template-columns: repeat(2, 1fr) }
  .ad-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line) }
  .ad-tools .seg { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch }
  .ad-tools .seg::-webkit-scrollbar { display: none }
  .ad-tools .seg button { flex: 0 0 auto; white-space: nowrap }
  .ad-row { grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: "th info info" "th price pill" "acts acts acts"; gap: 6px 14px; padding: 10px }
  .ad-thumb { grid-area: th; width: 88px; align-self: start }
  .ad-info { grid-area: info } .ad-price { grid-area: price; font-size: 19px } .ad-pill { grid-area: pill; justify-self: end }
  .ad-acts { grid-area: acts; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 4px; margin-top: 4px }
  .ad-title { white-space: normal; font-size: 22px }
  .ad-sub { white-space: normal }
  .ad-head .btn { width: 100%; justify-content: center }
}

/* ---------- Fiche de saisie ---------- */
.ad-bar { position: sticky; top: 72px; z-index: 25; display: flex; align-items: center; gap: 22px; padding: 12px var(--gut); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line) }
.ad-bar h1 { flex: 1; min-width: 0; font-size: clamp(24px, 2.4vw, 34px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.ad-bar-r { display: flex; align-items: center; gap: 12px }
.ad-saved { font-size: 12.5px; color: var(--accent); font-weight: 600 }
.ad-errs { max-width: 1280px; margin: 24px auto 0; padding: 0 var(--gut) }
.ad-errs:not([hidden]) { display: block }
.ad-errs b, .ad-errs ul { display: block; background: #fbeae7; color: #7a1f14 }
.ad-errs b { padding: 16px 22px 4px; border-radius: 16px 16px 0 0; font-size: 15px }
.ad-errs ul { margin: 0; padding: 4px 22px 16px 40px; border-radius: 0 0 16px 16px; font-size: 14.5px; line-height: 1.7 }
.ad-cols { max-width: 1280px; margin: 0 auto; padding: 30px var(--gut) 140px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 44px; align-items: start }
.ad-sec { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 2.6vw, 32px); margin-bottom: 16px; display: grid; gap: 20px }
.ad-sec h2 { font-size: clamp(30px, 2.8vw, 38px) }
.ad-help { margin: -10px 0 0; font-size: 14px; color: var(--ink3); line-height: 1.5 }
.ad-danger h2 { color: #b3261e }
.ad-danger .btn { justify-self: start }
.ad-chips { display: flex; flex-wrap: wrap; gap: 8px }
.ad-chip { border: 1px solid var(--line2); border-radius: 999px; background: none; padding: 9px 15px; font: 600 13px/1 var(--sans); color: var(--ink2); cursor: pointer; transition: background .2s, color .2s, border-color .2s }
.ad-chip:hover { border-color: var(--ink3) }
.ad-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg) }
.ad-chip-add { display: flex; gap: 12px; align-items: center; margin-top: 4px }
.ad-chip-add input { width: min(240px, 100%); min-height: 40px; border-radius: 999px; padding: 8px 16px; font-size: 14px }
.ad-cls { display: flex; flex-wrap: wrap; gap: 6px }
.ad-cls button { width: 46px; height: 46px; border-radius: 11px; border: 0; background: var(--c); color: var(--t); font: 700 17px/1 var(--sans); cursor: pointer; opacity: .32; transition: opacity .2s, transform .3s var(--ease), box-shadow .2s }
.ad-cls button:hover { opacity: .7 }
.ad-cls button[aria-pressed="true"] { opacity: 1; transform: scale(1.06); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink) }
.ad-cls .none { width: auto; padding: 0 16px; background: var(--bg2); color: var(--ink2); font: 600 13px/1 var(--sans); opacity: 1 }
.ad-cls .none[aria-pressed="true"] { transform: none }
.ad-plan { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 14px; background: var(--bg2); font-size: 14px; color: var(--ink2) }

/* visibilité selon le bien */
.ad-edit[data-tr="vente"] .only-location, .ad-edit[data-tr="location"] .only-vente,
.ad-edit:not([data-hon="acquereur"]) .only-acq,
.ad-edit[data-type="terrain"] .not-terrain, .ad-edit:not([data-type="terrain"]) .only-terrain,
.ad-edit:not([data-type="appartement"]) .only-appart,
.ad-edit:not([data-copro="1"]) .if-copro, .ad-edit:not([data-dpe="1"]) .if-dpe { display: none }
.only-appart, .if-dpe { display: grid; gap: 20px }

/* photos */
.ad-phs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px }
.ad-phs:empty { display: none }
.ad-ph { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--bg2); cursor: grab; transition: opacity .2s, box-shadow .2s }
.ad-ph img { width: 100%; height: 100%; object-fit: cover; pointer-events: none }
.ad-ph .cover { position: absolute; left: 8px; top: 8px; font: 600 10px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 7px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink) }
.ad-ph-ops { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; gap: 4px; justify-content: flex-end; opacity: 0; transition: opacity .2s }
.ad-ph:hover .ad-ph-ops, .ad-ph:focus-within .ad-ph-ops { opacity: 1 }
@media (hover: none) { .ad-ph-ops { opacity: 1 } }
.ad-ph-ops button { width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(10,13,19,.62); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer }
.ad-ph-ops button:disabled { opacity: .3; cursor: default }
.ad-ph-ops button:not(:disabled):hover { background: rgba(10,13,19,.85) }
.ad-ph-ops button[data-ph="x"]:hover { background: #b3261e }
.ad-ph-ops svg { width: 14px; height: 14px }
.ad-ph.drag { opacity: .35 }
.ad-ph.over { box-shadow: 0 0 0 3px var(--accent) }
.ad-ph.up { display: grid; place-items: center; align-content: center; gap: 10px; cursor: default; color: var(--ink3); font-size: 12.5px }
.spin { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--accent); animation: ad-spin .8s linear infinite }
@keyframes ad-spin { to { transform: rotate(360deg) } }
.ad-drop { display: grid; justify-items: center; gap: 6px; padding: 30px 20px; border: 1.5px dashed var(--line2); border-radius: 18px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; color: var(--ink2) }
.ad-drop:hover, .ad-drop.on { border-color: var(--accent); background: var(--accent2) }
.ad-drop svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 4px }
.ad-drop b { font-size: 15px }
.ad-drop small { font-size: 12.5px; color: var(--ink3) }
.ad-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 3px }

/* aperçu */
.ad-prev-col { position: sticky; top: 160px }
.ad-prev { display: grid; gap: 18px }
.ad-prev .slide { width: 100% }
.ad-prev .slide .ph img { inset: 0; width: 100%; height: 100% }
.ad-noph { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--ink3); font-size: 13px }
.ad-noph svg { width: 36px; height: 36px }
.ad-prev .slide h3 { font-size: 30px }
@media (max-width: 1020px) { .ad-cols { grid-template-columns: 1fr } .ad-prev-col { display: none } }
@media (max-width: 640px) {
  .row2, .row3 { grid-template-columns: 1fr }
  .ad-bar { top: 64px; gap: 12px; padding: 10px 16px }
  .ad-bar .ad-link span, .ad-saved { display: none }
  .ad-bar h1 { font-size: 22px }
  .ad-cols { padding: 18px 12px 120px }
  .ad-sec { border-radius: 20px }
  .ad-chip-add { flex-wrap: wrap }
  .ad-phs { grid-template-columns: repeat(2, 1fr); gap: 8px }
}

/* ---------- Fenêtres et messages ---------- */
.ad-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(20,16,12,.42); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: ad-in .25s ease }
.ad-dialog { width: min(460px, 100%); background: var(--card); border-radius: 26px; padding: 30px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.45); animation: ad-up .4s var(--ease) }
.ad-dialog h2 { font-size: 34px; margin-bottom: 12px }
.ad-dialog p { color: var(--ink2); font-size: 15px }
.ad-dialog .ad-form { display: grid; gap: 16px; margin-top: 8px }
.ad-dlg-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px }
@keyframes ad-in { from { opacity: 0 } }
@keyframes ad-up { from { opacity: 0; transform: translateY(20px) scale(.98) } }
.ad-toast { position: fixed; left: 50%; bottom: 24px; z-index: 120; max-width: calc(100% - 32px); transform: translate(-50%, calc(100% + 48px)); visibility: hidden; padding: 14px 22px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 500 14.5px/1.4 var(--sans); box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); transition: transform .45s var(--ease), visibility 0s .45s; pointer-events: none; text-align: center }
.ad-toast.on { transform: translate(-50%, 0); visibility: visible; transition: transform .45s var(--ease) }
.ad-toast.err { background: #8f1d14; color: #fff; border-radius: 18px }

/* ---------- Rubriques (annonces, diffusion) ---------- */
.ad-tabs { display: flex; gap: 26px; margin: -8px 0 34px; border-bottom: 1px solid var(--line) }
.ad-tabs a { display: inline-flex; align-items: center; gap: 9px; padding: 0 2px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; font: 600 14.5px/1 var(--sans); color: var(--ink3); text-decoration: none; transition: color .25s, border-color .25s }
.ad-tabs a:hover { color: var(--ink) }
.ad-tabs a[aria-current="page"] { color: var(--ink); border-color: var(--accent) }
.ad-tabs svg { width: 17px; height: 17px }
.ad-tabs em { font: 700 11px/1 var(--sans); font-style: normal; min-width: 20px; padding: 4px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-align: center }

/* ---------- Diffusion ---------- */
.ad-lead { max-width: 40em; margin: 18px 0 0; font-size: 17px; line-height: 1.6; color: var(--ink2) }
.ad-flux-maj { margin: 12px 0 0; font-size: 13.5px; color: var(--ink3) }
.ad-flux-maj:empty { display: none }
.ad-flux-maj .err { color: #b3261e }
.ad-note { margin: 0 0 16px; padding: 16px 20px; border-radius: 16px; background: var(--accent2); font-size: 14.5px; line-height: 1.55; color: var(--ink2) }
.ad-note b { color: var(--accent) }
.ad-portails { display: grid; gap: 10px }
.ad-portail { border: 1px solid var(--line); border-radius: 18px; padding: 8px 18px; background: var(--bg); transition: border-color .25s, box-shadow .35s }
.ad-portail[data-on="1"] { border-color: var(--line2); box-shadow: 0 18px 40px -34px rgba(40,30,20,.5) }
.ad-portail-hd { display: flex; align-items: center; justify-content: space-between; gap: 14px }
.ad-portail-hd .ad-toggle { min-width: 0 }
.ad-portail-hd .ad-toggle b { font: 400 23px/1.1 var(--serif) }
.ad-portail-st { flex: none; display: inline-flex; align-items: center; gap: 7px; font: 600 12.5px/1.2 var(--sans); color: var(--ink3); white-space: nowrap }
.ad-portail-st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line2) }
.ad-portail-st.ok { color: #17694c } .ad-portail-st.ok::before { background: #1f9a6c }
.ad-portail-st.att { color: var(--accent) } .ad-portail-st.att::before { background: var(--accent) }
.ad-portail-bd { display: grid; gap: 14px; padding: 14px 0 12px; border-top: 1px solid var(--line); margin-top: 8px }
.ad-portail[data-on="0"] .ad-portail-bd { display: none }
.ad-portail-acts { display: flex; flex-wrap: wrap; gap: 10px }
.ad-portail-acts svg { width: 15px; height: 15px }
.ad-flux { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--bg2) }
.ad-flux span:first-child { grid-column: 1 / -1; font: 600 12.5px/1.3 var(--sans); color: var(--ink2) }
.ad-flux code { background: none; padding: 0; font-size: 12.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all }
.ad-flux-wait { margin: 0 }
.ad-todo { list-style: none; margin: 0; padding: 0; display: grid }
.ad-todo li { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 20px; flex-wrap: wrap; padding: 13px 0; border-top: 1px solid var(--line) }
.ad-todo a { font: 400 21px/1.15 var(--serif); text-decoration: none }
.ad-todo a:hover { color: var(--accent) }
.ad-todo span { font-size: 13.5px; color: #8f1d14 }
.ad-todo i { font-style: normal; color: var(--ink3) }
.ad-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: etape }
.ad-steps li { counter-increment: etape; display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 1px solid var(--line2) }
.ad-steps li::before { content: counter(etape, decimal-leading-zero); font: 400 30px/1 var(--serif); color: var(--accent) }
.ad-steps b { font-size: 15px }
.ad-steps span { font-size: 14px; line-height: 1.55; color: var(--ink2) }
.ad-adv summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font: 400 clamp(26px, 2.4vw, 32px)/1.1 var(--serif) }
.ad-adv summary::-webkit-details-marker { display: none }
.ad-adv summary::after { content: ''; width: 9px; height: 9px; border: solid var(--ink3); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .3s var(--ease) }
.ad-adv[open] summary::after { transform: rotate(-135deg) }
.ad-adv-bd { display: grid; gap: 18px; padding-top: 22px; max-width: 620px }
.ad-edit #portails-i a { color: var(--accent) }
@media (max-width: 900px) { .ad-steps { grid-template-columns: 1fr 1fr } }
@media (max-width: 640px) {
  .ad-tabs { margin: -12px 0 26px; gap: 22px }
  .ad-portail { padding: 6px 14px }
  .ad-portail-hd { flex-direction: column; align-items: flex-start; gap: 0 }
  .ad-portail-hd .ad-toggle { flex: 1 1 auto }
  .ad-portail-st { margin: 0 0 10px 58px }
  .ad-steps { grid-template-columns: 1fr }
  .ad-diff .ad-head .btn { width: 100%; justify-content: center }
  .ad-lieu { grid-template-columns: 1fr 1fr } .ad-lieu .f:first-child { grid-column: 1 / -1 }
}
.ad-sec[hidden] { display: none }
