/* Otoolia — Recadrer, convertir, nettoyer une image, favicon (styles limités à .ix / .ix-*) */
.ix-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: .2em; }
.ix h2 { font-size: 1.05rem; margin: 0 0 10px; }
.ix-drop { border: 2px dashed var(--ot-border); border-radius: var(--ot-radius); background: var(--ot-surface); padding: 26px 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.ix-drop:hover, .ix-drop.is-over { border-color: var(--ot-brand); background: color-mix(in srgb, var(--ot-brand) 6%, var(--ot-surface)); }
.ix-drop strong { display: block; font-size: 1.05rem; }
.ix-drop small { color: var(--ot-text-soft); }
.ix-drop .ix-ic { font-size: 2rem; display: block; margin-bottom: 4px; }
.has-items .ix-drop { padding: 12px 16px; }
.has-items .ix-drop .ix-ic { display: none; }
.ix-listbar { display: none; justify-content: space-between; align-items: center; margin: 10px 0 4px; font-size: .86rem; color: var(--ot-text-soft); }
.has-items .ix-listbar { display: flex; }
.ix-list { list-style: none; margin: 0 0 var(--ot-space); padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ix-item { display: flex; align-items: stretch; background: var(--ot-surface); border: 1px solid var(--ot-border); border-radius: var(--ot-radius-s); min-width: 0; }
.ix-item.is-sel { border-color: var(--ot-brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ot-brand) 30%, transparent); }
.ix-item.is-bad { border-color: var(--ot-danger); }
.ix-pick { flex: 1; min-width: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; border: 0; background: none; padding: 6px 4px 6px 6px; cursor: pointer; color: var(--ot-text); font: inherit; }
.ix-pick img { grid-row: 1 / 3; width: 44px; height: 44px; object-fit: contain; background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 10px 10px; border-radius: 4px; }
.ix-nm { font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ix-pick small, .ix-res small { font-size: .76rem; color: var(--ot-text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-x { border: 0; background: none; font-size: 1.25rem; line-height: 1; color: var(--ot-text-soft); cursor: pointer; padding: 0 8px; }
.ix-x:hover { color: var(--ot-danger); }

.ix-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.ix-tb { border: 1px solid var(--ot-border); background: var(--ot-surface); color: var(--ot-text); border-radius: 999px; padding: 7px 16px; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; }
.ix-tb[aria-pressed="true"] { background: var(--ot-brand); border-color: var(--ot-brand); color: var(--ot-brand-ink); }
.ix-pane[hidden] { display: none; }
.ix-grid { display: grid; gap: var(--ot-space); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .ix-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } .ix-grid--l { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.ix-grid > * { min-width: 0; }
.ix-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; margin-bottom: 10px; }
.ix-f { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; font-weight: 600; color: var(--ot-text-soft); }
.ix-f .ot-input, .ix-f .ot-select { min-height: 36px; padding: 4px 8px; font-size: .92rem; width: auto; }
.ix-f input[type=number] { width: 96px; }
.ix-f input[type=range] { width: 160px; }
.ix-f input[type=color] { width: 44px; height: 36px; padding: 0; border: 1px solid var(--ot-border); border-radius: 8px; background: none; cursor: pointer; }
.ix-ck { display: flex; gap: 6px; align-items: center; font-size: .88rem; margin: 4px 0 10px; }
.ix-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.ix-sm { min-height: 32px; padding: 4px 12px; font-size: .85rem; }
.ix-help { font-size: .84rem; color: var(--ot-text-soft); margin: 6px 0 0; }
.ix-muted { color: var(--ot-text-soft); font-size: .88rem; }
.ix-done { font-weight: 600; color: var(--ot-success); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 8px; }
.ix-err { color: var(--ot-danger) !important; }
.ix-res { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ix-res li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 6px 8px; background: var(--ot-surface-2); border-radius: var(--ot-radius-s); }
.ix-res li button { grid-row: 1 / 3; grid-column: 2; }

/* Recadrer */
.ix-stage { min-height: 120px; display: flex; justify-content: center; touch-action: none; }
.ix-cropbox { position: relative; max-width: 100%; user-select: none; -webkit-user-select: none; background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.ix-cropbox canvas { display: block; width: 100%; height: 100%; }
.ix-shade { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ix-shade b { position: absolute; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .5); }
.ix-rect { position: absolute; outline: 1px solid #fff; cursor: move; touch-action: none;
  background-image: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,.45)), linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,.45)), linear-gradient(90deg, rgba(255,255,255,.45), rgba(255,255,255,.45)), linear-gradient(90deg, rgba(255,255,255,.45), rgba(255,255,255,.45));
  background-size: 100% 1px, 100% 1px, 1px 100%, 1px 100%; background-position: 0 33.33%, 0 66.67%, 33.33% 0, 66.67% 0; background-repeat: no-repeat; }
.ix-rect i { position: absolute; width: 16px; height: 16px; background: #fff; border: 2px solid var(--ot-brand); border-radius: 3px; margin: -8px 0 0 -8px; }
.ix-rect i[data-h=nw] { left: 0; top: 0; cursor: nwse-resize; } .ix-rect i[data-h=n] { left: 50%; top: 0; cursor: ns-resize; }
.ix-rect i[data-h=ne] { left: 100%; top: 0; cursor: nesw-resize; } .ix-rect i[data-h=e] { left: 100%; top: 50%; cursor: ew-resize; }
.ix-rect i[data-h=se] { left: 100%; top: 100%; cursor: nwse-resize; } .ix-rect i[data-h=s] { left: 50%; top: 100%; cursor: ns-resize; }
.ix-rect i[data-h=sw] { left: 0; top: 100%; cursor: nesw-resize; } .ix-rect i[data-h=w] { left: 0; top: 50%; cursor: ew-resize; }
@media (pointer: coarse) { .ix-rect i { width: 24px; height: 24px; margin: -12px 0 0 -12px; } }
.ix-out { font-weight: 600; margin: 8px 0 0; text-align: center; }
.ix-xywh .ix-f input[type=number] { width: 84px; }

/* Métadonnées */
.ix-meta { background: var(--ot-surface-2); border-radius: var(--ot-radius-s); padding: 10px 12px; margin-bottom: 8px; overflow-wrap: anywhere; }
.ix-meta small { color: var(--ot-text-soft); }
.ix-meta.has-gps { border-left: 4px solid var(--ot-danger); }
.ix-warn { margin: 6px 0; padding: 6px 10px; border-radius: var(--ot-radius-s); background: color-mix(in srgb, var(--ot-danger) 12%, transparent); font-size: .86rem; }
.ix-tab { border-collapse: collapse; margin-top: 6px; font-size: .86rem; width: 100%; }
.ix-tab th { text-align: left; font-weight: 600; color: var(--ot-text-soft); padding: 2px 10px 2px 0; width: 42%; vertical-align: top; }
.ix-tab td { padding: 2px 0; }

/* Favicon */
.ix-prev { display: grid; gap: 8px; }
.ix-fp { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 10px 12px; border-radius: var(--ot-radius-s); border: 1px solid var(--ot-border); }
.ix-fp > span { width: 100%; font-size: .78rem; font-weight: 600; }
.ix-fp--l { background: #fff; color: #444; }
.ix-fp--d { background: #1f1f2b; color: #ccc; }
.ix-fp figure { margin: 0; text-align: center; }
.ix-fp img { display: block; margin: 0 auto; image-rendering: auto; }
.ix-fp figcaption { font-size: .7rem; margin-top: 2px; }
.ix-tabmock { display: inline-flex; align-items: center; gap: 8px; max-width: 240px; padding: 7px 14px; background: var(--ot-surface-2); border-radius: 10px 10px 0 0; border: 1px solid var(--ot-border); border-bottom: 0; font-size: .82rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ix-html { width: 100%; min-height: 118px; font-family: var(--ot-mono); font-size: .78rem; margin-top: 4px; }
.ix-f--wide { flex: 1 1 200px; }
.ix-f--wide .ot-input { width: 100%; }

.ix-about { margin-top: calc(var(--ot-space) * 2); }
.ix-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ot-text); color: var(--ot-bg); padding: 10px 18px; border-radius: 999px; font-size: .9rem; z-index: 50; box-shadow: var(--ot-shadow-h); }
@media (max-width: 560px) { .ix-list { grid-template-columns: minmax(0, 1fr); } .ix-f input[type=range] { width: 130px; } }

/* Réseaux sociaux */
.ix-soclist { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ix-socg { border: 1px solid var(--ot-border); border-radius: var(--ot-radius-s); padding: 6px 10px 8px; margin: 0; min-width: 0; }
.ix-socg legend { font-weight: 700; font-size: .86rem; padding: 0 4px; }
.ix-socg label { display: flex; gap: 6px; align-items: baseline; font-size: .86rem; padding: 2px 0; }
.ix-socg small { color: var(--ot-text-soft); margin-left: auto; white-space: nowrap; }
.ix-socg .ot-input { width: 88px; min-height: 32px; padding: 2px 6px; }
.ix-ssrc canvas { display: block; max-width: 100%; height: auto; cursor: crosshair; border-radius: 6px; }
.ix-sprev { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ix-sprev figure { margin: 0; max-width: 220px; }
.ix-sprev canvas { display: block; max-width: 100%; height: auto; border: 1px solid var(--ot-border); border-radius: 4px; }
.ix-sprev figcaption { font-size: .74rem; color: var(--ot-text-soft); margin-top: 3px; }
.ix-sprev figcaption strong { display: block; color: var(--ot-text); font-size: .78rem; }

/* Filigrane */
.ix-wprev canvas { display: block; max-width: 100%; height: auto; border-radius: 6px; background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.ix-filebtn { position: relative; overflow: hidden; cursor: pointer; }
.ix-filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ix-row[hidden] { display: none; }

/* Images → PDF */
.ix-order { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 420px; overflow: auto; }
.ix-order li { display: flex; align-items: center; gap: 8px; background: var(--ot-surface-2); border-radius: var(--ot-radius-s); padding: 4px 6px; min-width: 0; }
.ix-order img { width: 36px; height: 36px; object-fit: contain; flex: none; }
.ix-order .ix-nm { flex: 1; }
.ix-order .ix-x:disabled { opacity: .25; cursor: default; }
.ix-d-num { font-weight: 700; font-size: .8rem; color: var(--ot-text-soft); min-width: 1.4em; text-align: right; }
.ix-pages { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; }
.ix-pages canvas { box-shadow: 0 1px 4px rgba(0,0,0,.25); border-radius: 2px; }
