/********* IMAGE EDITOR (interface type Photoshop) *********/

/* La page de l'éditeur occupe tout l'écran sous la barre de navigation */
body:has(.ie) {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main:has(.ie) {
    flex: 1;
    min-height: 0;
    width: 100%;
    padding: 0;
}

.ie {
    --ie-bg: #323232;          /* panneaux, barres */
    --ie-bg-dark: #282828;     /* zone de travail */
    --ie-bg-darker: #1f1f1f;   /* champs, séparateurs */
    --ie-bg-hover: #3e3e3e;
    --ie-bg-active: #454545;
    --ie-line: #1a1a1a;
    --ie-line-soft: #424242;
    --ie-text: #d6d6d6;
    --ie-text-dim: #9a9a9a;
    --ie-accent: #ff99ff;      /* rose du dos du Nyan Cat */
    --ie-accent-hover: #f07ff0;
    --ie-accent-soft: rgba(255, 153, 255, 0.18);
    --ie-accent-soft-2: rgba(255, 153, 255, 0.25);
    --ie-accent-text: #3e1f29; /* texte sur fond d'accent */
    --ie-text-strong: #eeeeee;
    --ie-hint: #777777;
    --ie-obtn-hover: #505050;
    --ie-scroll: #555555;
    --ie-tab-bg: #2a2a2a;
    --ie-tab-hover: #303030;
    --ie-tab-close: #888888;
    --ie-tab-close-hover: #555555;
    --ie-dashed: #4a4a4a;
    --ie-pos-border: #555555;
    --ie-sel: #6a4b66;
    --ie-hover-veil: rgba(255, 255, 255, 0.08);
    --ie-warn: #e8b04a;
    /* Couleurs lues par le JS (canvas) */
    --ie-ruler-bg: #2f2f2f;
    --ie-ruler-line: #1a1a1a;
    --ie-ruler-tick: #8c8c8c;
    --ie-ruler-minor: #6a6a6a;
    --ie-ruler-text: #a8a8a8;
    --ie-ruler-marker: #e6e6e6;
    --ie-guide: #00c8ff;
    --ie-select: #ff99ff;

    height: 100%;

    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 280px;
    grid-template-rows: 42px minmax(0, 1fr);
    grid-template-areas:
        "opt   opt  opt"
        "tools work panels";

    background: var(--ie-bg);
    color: var(--ie-text);
    border-top: 1px solid var(--ie-line);
    overflow: hidden;
    font-size: 12.5px;
}

.ie [hidden] {
    display: none !important;
}

.ie.is-empty .ie-panels,
.ie.is-empty .ie-needs-image {
    opacity: 0.4;
    pointer-events: none;
}

.ie label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ie-text-dim);
    margin-bottom: 5px;
}

.ie .hint {
    font-size: 11px;
    color: var(--ie-hint);
}

/* ---------- Barre d'options ---------- */

.ie-optionsbar {
    grid-area: opt;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    background: var(--ie-bg);
    border-bottom: 1px solid var(--ie-line);
}

.ie-logo {
    display: block;
    width: 48px;
    height: 27px;
    border-radius: 4px;
    object-fit: cover;
}

.ie-appname {
    font-weight: 700;
    font-size: 13px;
    color: var(--ie-text-strong);
    margin-left: 4px;
}

.ie-sep {
    width: 1px;
    height: 20px;
    margin: 0 6px;
    background: var(--ie-line-soft);
}

.ie-spacer {
    flex: 1;
}

.ie-obtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    border: 1px solid var(--ie-line-soft);
    border-radius: 4px;
    background: var(--ie-bg-active);
    font-family: 'Manrope', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ie-text);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .12s, border-color .12s, color .12s;
}

.ie-obtn:hover {
    background: var(--ie-obtn-hover);
    color: var(--ie-text-strong);
}

.ie-obtn-primary {
    background: var(--ie-accent);
    border-color: var(--ie-accent);
    color: var(--ie-accent-text);
}

.ie-obtn-primary:hover {
    background: var(--ie-accent-hover);
    border-color: var(--ie-accent-hover);
}

.ie-obtn.ie-danger:hover {
    background: #8a2a2a;
    border-color: #a33;
}

.ie-full {
    width: 100%;
}

/* ---------- Barre d'outils ---------- */

.ie-toolbar {
    grid-area: tools;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    background: var(--ie-bg);
    border-right: 1px solid var(--ie-line);
}

.ie-tool {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    background: none;
    color: var(--ie-text);
    cursor: pointer;
}

.ie-tool:hover {
    background: var(--ie-bg-hover);
}

.ie-tool.is-on {
    background: var(--ie-bg-darker);
    color: var(--ie-text-strong);
}

.ie-tool-sep {
    width: 22px;
    height: 1px;
    margin: 4px 0;
    background: var(--ie-line-soft);
}

/* ---------- Zone de travail ---------- */

.ie-workspace {
    grid-area: work;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--ie-bg-dark);
}

.ie-tabs {
    display: flex;
    height: 30px;
    background: var(--ie-bg-darker);
    border-bottom: 1px solid var(--ie-line);
}

.ie-tablist {
    display: flex;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--ie-scroll) transparent;
}

.ie-tab {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 220px;
    height: 100%;
    border-right: 1px solid var(--ie-line);
    background: var(--ie-tab-bg);
    border-top: 2px solid transparent;
}

.ie-tab:hover {
    background: var(--ie-tab-hover);
}

.ie-tab.is-active {
    background: var(--ie-bg-dark);
    border-top-color: var(--ie-accent);
}

.ie-tab-label {
    min-width: 0;
    height: 100%;
    padding: 0 6px 0 12px;
    border: none;
    background: none;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: var(--ie-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.ie-tab.is-active .ie-tab-label {
    color: var(--ie-text-strong);
}

.ie-tab-close {
    flex: 0 0 18px;
    height: 18px;
    margin-right: 6px;
    border: none;
    border-radius: 3px;
    background: none;
    font-size: 14px;
    line-height: 1;
    color: var(--ie-tab-close);
    cursor: pointer;
}

.ie-tab-close:hover {
    background: var(--ie-tab-close-hover);
    color: var(--ie-text-strong);
}

.ie-stage {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    grid-template-rows: 20px minmax(0, 1fr);
}

.ie-ruler-corner {
    background: var(--ie-ruler-bg);
    border-right: 1px solid var(--ie-line);
    border-bottom: 1px solid var(--ie-line);
}

.ie-ruler,
.ie-view {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.ie-ruler canvas,
.ie-view canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.ie-view {
    background: var(--ie-bg-dark);
    transition: box-shadow .12s;
}

.ie-view canvas {
    touch-action: none;
}

.ie-view.is-drop {
    box-shadow: inset 0 0 0 2px var(--ie-accent);
}

.ie-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 48px 40px;
    border: 1.5px dashed var(--ie-dashed);
    border-radius: 8px;
    color: var(--ie-text-dim);
    text-align: center;
}

.ie-empty p {
    font-size: 13.5px;
}

.ie-view.is-drop .ie-empty {
    border-color: var(--ie-accent);
}

.ie-statusbar {
    display: flex;
    align-items: center;
    height: 26px;
    background: var(--ie-bg);
    border-top: 1px solid var(--ie-line);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--ie-text-dim);
}

.ie-zoom {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 100%;
    padding: 0 6px;
    border-right: 1px solid var(--ie-line-soft);
}

.ie-zoom button {
    height: 20px;
    min-width: 20px;
    padding: 0 6px;
    border: none;
    border-radius: 3px;
    background: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--ie-text);
    cursor: pointer;
}

.ie-zoom button:hover {
    background: var(--ie-bg-hover);
    color: var(--ie-text-strong);
}

.ie-zoom input {
    width: 58px;
    height: 20px;
    padding: 0 4px;
    border: 1px solid var(--ie-line-soft);
    border-radius: 3px;
    background: var(--ie-bg-darker);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--ie-text-strong);
    text-align: center;
    outline: none;
}

.ie-zoom input:focus {
    border-color: var(--ie-accent);
}

.ie-status-info {
    display: flex;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.ie-status-info span {
    padding: 0 10px;
    border-right: 1px solid var(--ie-line-soft);
}

.ie-status-info span:last-child {
    border-right: none;
}

/* ---------- Panneaux ---------- */

.ie-panels {
    grid-area: panels;
    overflow-y: auto;
    background: var(--ie-bg-darker);
    border-left: 1px solid var(--ie-line);
    scrollbar-width: thin;
    scrollbar-color: var(--ie-scroll) transparent;
}

.ie-panel {
    background: var(--ie-bg);
    border-bottom: 1px solid var(--ie-line);
}

.ie-panel-title {
    display: inline-block;
    margin: 0;
    padding: 7px 14px 6px;
    background: var(--ie-bg);
    border-right: 1px solid var(--ie-line);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ie-text-strong);
}

.ie-panel-body {
    padding: 12px 14px 14px;
    border-top: 1px solid var(--ie-line);
}

.ie-field {
    margin-bottom: 12px;
}

.ie-field:last-child {
    margin-bottom: 0;
}

.ie-input {
    width: 100%;
    height: 28px;
    border: 1px solid var(--ie-line-soft);
    border-radius: 3px;
    padding: 0 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 12.5px;
    color: var(--ie-text-strong);
    background: var(--ie-bg-darker);
    outline: none;
}

.ie-input:focus {
    border-color: var(--ie-accent);
}

select.ie-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23aaa' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

select.ie-input option {
    background: var(--ie-bg);
    color: var(--ie-text-strong);
}

.ie input[type=range] {
    width: 100%;
    accent-color: var(--ie-accent);
}

.ie-info {
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--ie-text-dim);
    margin: 4px 0 0;
}

.ie-info-top {
    margin: 0 0 10px;
}

#ieJpgWarn {
    color: var(--ie-warn);
}

/* Largeur / hauteur */

.ie-size {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin-bottom: 6px;
}

.ie-size .ie-field {
    flex: 1;
    margin-bottom: 0;
}

.ie-lock {
    flex: 0 0 26px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 3px;
    background: none;
    color: var(--ie-hint);
    cursor: pointer;
}

.ie-lock:hover {
    background: var(--ie-bg-hover);
}

.ie-lock.is-on {
    color: var(--ie-text-strong);
    background: var(--ie-bg-darker);
    border-color: var(--ie-line-soft);
}

/* Contrôle segmenté */

.ie-seg {
    display: flex;
    margin-bottom: 12px;
    border: 1px solid var(--ie-line-soft);
    border-radius: 3px;
    overflow: hidden;
}

.ie-seg button {
    flex: 1;
    height: 26px;
    border: none;
    border-right: 1px solid var(--ie-line-soft);
    background: var(--ie-bg-darker);
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--ie-text-dim);
    cursor: pointer;
}

.ie-seg button:last-child {
    border-right: none;
}

.ie-seg button:hover {
    color: var(--ie-text-strong);
}

.ie-seg button.is-on {
    background: var(--ie-bg-active);
    color: var(--ie-text-strong);
    box-shadow: inset 0 -2px 0 var(--ie-accent);
}

/* Couleur */

.ie-color {
    display: flex;
    gap: 6px;
}

.ie-color input[type=color] {
    flex: 0 0 28px;
    height: 28px;
    padding: 2px;
    border: 1px solid var(--ie-line-soft);
    border-radius: 3px;
    background: var(--ie-bg-darker);
    cursor: pointer;
}

.ie-color .ie-input {
    font-family: 'IBM Plex Mono', monospace;
    text-transform: lowercase;
}

/* Position rapide du filigrane */

.ie-pos {
    display: grid;
    grid-template-columns: repeat(3, 24px);
    grid-template-rows: repeat(3, 18px);
    gap: 3px;
    padding: 5px;
    width: max-content;
    border: 1px solid var(--ie-line-soft);
    border-radius: 3px;
    background: var(--ie-bg-darker);
}

.ie-pos button {
    border: 1px solid var(--ie-pos-border);
    border-radius: 2px;
    background: var(--ie-bg-active);
    cursor: pointer;
}

.ie-pos button:hover {
    background: var(--ie-accent);
    border-color: var(--ie-accent);
}

.ie-pos [data-pos=tl] { grid-area: 1 / 1; }
.ie-pos [data-pos=tr] { grid-area: 1 / 3; }
.ie-pos [data-pos=c]  { grid-area: 2 / 2; }
.ie-pos [data-pos=bl] { grid-area: 3 / 1; }
.ie-pos [data-pos=br] { grid-area: 3 / 3; }

/* ---------- Calques ---------- */

.ie-xyw {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.ie-xyw .ie-field {
    margin-bottom: 0;
}

.ie-layers .ie-panel-body {
    padding-bottom: 10px;
}

.ie-layer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
    background: var(--ie-bg-dark);
    border-top: 1px solid var(--ie-line);
    scrollbar-width: thin;
    scrollbar-color: var(--ie-scroll) transparent;
}

.ie-layer {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 10px 0 4px;
    border-bottom: 1px solid var(--ie-line);
    background: var(--ie-bg);
    cursor: pointer;
    user-select: none;
}

.ie-layer:hover {
    background: var(--ie-bg-hover);
}

.ie-layer.is-sel {
    background: var(--ie-sel);
}

.ie-layer.is-hidden .ie-layer-thumb,
.ie-layer.is-hidden .ie-layer-name {
    opacity: 0.45;
}

.ie-layer.is-dragging {
    opacity: 0.4;
}

.ie-layer.drop-above::before,
.ie-layer.drop-below::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--ie-accent);
}

.ie-layer.drop-above::before {
    top: -1px;
}

.ie-layer.drop-below::after {
    bottom: -1px;
}

.ie-layer-eye {
    flex: 0 0 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 3px;
    background: none;
    color: var(--ie-text);
    cursor: pointer;
}

button.ie-layer-eye:hover {
    background: var(--ie-hover-veil);
}

.ie-layer-thumb {
    flex: 0 0 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ie-line);
    background-color: var(--ie-text-strong);
    background-image:
        linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
    overflow: hidden;
}

.ie-layer-thumb img {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.ie-layer-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--ie-text);
}

.ie-layer.is-sel .ie-layer-name {
    color: var(--ie-text-strong);
}

.ie-layer-bg .ie-layer-name {
    font-style: italic;
}

.ie-layer-lock {
    display: flex;
    color: var(--ie-text-dim);
}

.ie-layer-rename {
    flex: 1;
    min-width: 0;
    height: 24px;
    padding: 0 6px;
    border: 1px solid var(--ie-accent);
    border-radius: 3px;
    background: var(--ie-bg-darker);
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: var(--ie-text-strong);
    outline: none;
}

.ie-layer-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    border-top: 1px solid var(--ie-line);
}

.ie-layer-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    border: none;
    border-radius: 3px;
    background: none;
    color: var(--ie-text);
    cursor: pointer;
    transition: background-color .12s, color .12s;
}

.ie-layer-actions button:hover:not(:disabled) {
    background: var(--ie-bg-hover);
    color: var(--ie-text-strong);
}

.ie-layer-actions button:disabled {
    opacity: 0.35;
    cursor: default;
}

.ie-layer-actions button.is-done {
    color: #4cc38a;
}

#ieLayerDel:hover:not(:disabled) {
    background: #8a2a2a;
}

/* ---------- Miroir ---------- */

.ie .ie-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    margin: 0 0 0 8px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ie-text);
    cursor: pointer;
    white-space: nowrap;
}

.ie .ie-check:hover {
    background: var(--ie-bg-hover);
}

.ie-check input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--ie-accent);
}

.ie.is-mirror .ie-check {
    background: var(--ie-accent-soft);
    color: var(--ie-text-strong);
}

/* Pastille sur les onglets synchronisés */
.ie.is-mirror .ie-tab-label::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--ie-accent);
    vertical-align: middle;
}

/* ---------- Repères ---------- */

.ie-zoom button.is-on {
    background: var(--ie-accent-soft-2);
    color: var(--ie-text-strong);
}

.ie-zoom button:disabled {
    opacity: 0.4;
    cursor: default;
}

.ie-zoom button:disabled:hover {
    background: none;
    color: var(--ie-text);
}

/* Les règles servent de poignée pour créer les repères */
.ie-ruler canvas {
    cursor: default;
    touch-action: none;
}

/* ---------- Recadrage ---------- */

.ie-cropbar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ie-cropbar-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--ie-text-strong);
    margin-right: 2px;
}

.ie .ie-input-sm {
    width: auto;
    min-width: 120px;
    height: 28px;
}

.ie-crop-reset {
    margin-top: 10px;
}

/* Barre d'options chargée (recadrage actif) : libellés compactés */
.ie-appname {
    white-space: nowrap;
}

@media (max-width: 1600px) {
    #ieCopyLabel {
        display: none;
    }
}

@media (max-width: 1280px) {
    .ie-appname {
        display: none;
    }
}

#ieCopy.is-done {
    background: #2d7a4f;
    border-color: #2d7a4f;
    color: #fff;
}

#ieCopy.is-error {
    background: #8a2a2a;
    border-color: #a33;
    color: #fff;
}

/********* THÈME ROSE (image-editor.php?theme=rose) *********/

.ie.theme-rose {
    --ie-bg: #fbe7ec;
    --ie-bg-dark: #f4d5dd;
    --ie-bg-darker: #fff6f8;
    --ie-bg-hover: #f7d3dc;
    --ie-bg-active: #f3c6d2;
    --ie-line: #e7bac6;
    --ie-line-soft: #eecbd4;
    --ie-text: #5b3540;
    --ie-text-dim: #94687a;
    --ie-text-strong: #3e1f29;
    --ie-hint: #b08896;
    --ie-accent: #c86b85;
    --ie-accent-hover: #b45670;
    --ie-accent-soft: rgba(200, 107, 133, 0.18);
    --ie-accent-soft-2: rgba(200, 107, 133, 0.28);
    --ie-accent-text: #fff;
    --ie-obtn-hover: #f1c3cf;
    --ie-scroll: #dfaab9;
    --ie-tab-bg: #f8dde4;
    --ie-tab-hover: #f6d3dc;
    --ie-tab-close: #b08896;
    --ie-tab-close-hover: #efc3cf;
    --ie-dashed: #dfa9b8;
    --ie-pos-border: #e3b2bf;
    --ie-sel: #f2c1ce;
    --ie-hover-veil: rgba(200, 107, 133, 0.12);
    --ie-warn: #b3611f;
    --ie-ruler-bg: #fae2e8;
    --ie-ruler-line: #e7bac6;
    --ie-ruler-tick: #b78a98;
    --ie-ruler-minor: #d6aebb;
    --ie-ruler-text: #8d5d6d;
    --ie-ruler-marker: #c86b85;
    --ie-guide: #1aa3c8;
    --ie-select: #c86b85;
}

.ie.theme-rose .ie-obtn {
    background: #fff;
}

.ie.theme-rose .ie-obtn:hover {
    background: var(--ie-obtn-hover);
}

.ie.theme-rose .ie-obtn-primary {
    background: var(--ie-accent);
}

.ie.theme-rose .ie-obtn-primary:hover {
    background: var(--ie-accent-hover);
}

.ie.theme-rose .ie-empty {
    background: rgba(255, 255, 255, 0.45);
}

/* Barre de navigation du site assortie */
body.theme-rose {
    background: #fbe7ec;
}

body.theme-rose .navbar {
    background-color: #f6d4dd;
    border-bottom: 1px solid #e7bac6;
}

body.theme-rose .navbar .contenunav a,
body.theme-rose .navbar .contenunav a:link,
body.theme-rose .navbar .contenunav a:visited {
    color: #7a4757;
    background: rgba(255, 255, 255, 0.55);
}

body.theme-rose .navbar .contenunav a:hover,
body.theme-rose .navbar .contenunav a.active {
    color: #3e1f29;
    background: #f0c0cd;
}

/* ---------- Thème rose : curseur et paillettes ---------- */

body.theme-rose,
body.theme-rose * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 2.5v17l4.6-4.4 3.3 7.2 3.1-1.4-3.3-7h6.4z' fill='%23f4a3bc' stroke='%238a3d55' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 3 2, auto;
}

body.theme-rose a,
body.theme-rose button,
body.theme-rose label,
body.theme-rose select,
body.theme-rose input[type=checkbox],
body.theme-rose input[type=range],
body.theme-rose input[type=color],
body.theme-rose .ie-layer {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M3 2.5v17l4.6-4.4 3.3 7.2 3.1-1.4-3.3-7h6.4z' fill='%23e98aa9' stroke='%238a3d55' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M22 3l1.1 3 3 1.1-3 1.1L22 11.2l-1.1-3-3-1.1 3-1.1z' fill='%23f3c46b' stroke='%238a3d55' stroke-width='0.8'/%3E%3C/svg%3E") 3 2, pointer;
}

body.theme-rose input[type=text],
body.theme-rose input[type=number],
body.theme-rose input:not([type]),
body.theme-rose textarea {
    cursor: text;
}

.ie-sparkles,
.ie-rainbow {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* ---------- Logo Nyan Cat : bascule de la traînée arc-en-ciel ---------- */

.ie-logo-btn {
    display: block;
    padding: 0;
    border: none;
    border-radius: 5px;
    background: none;
    cursor: pointer;
    transition: box-shadow .2s;
}

.ie-logo-btn.is-on {
    box-shadow: 0 0 0 2px #ff0000, 0 0 0 4px #ff9900, 0 0 0 6px #ffff00;
}

/* Traînée sous les paillettes */
.ie-rainbow {
    z-index: 9998;
}

/* Mode Nyan Cat : le curseur système est remplacé par le chat animé */
body.nyan-on,
body.nyan-on * {
    cursor: none !important;
}

.ie-nyan-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 51px;
    height: 32px;
    pointer-events: none;
    z-index: 10000;
    will-change: transform;
}

/* Le chat grossit en rougissant avant d'exploser */
.ie-nyan-cursor.is-growing {
    filter: drop-shadow(0 0 4px #fff) saturate(1.6) hue-rotate(-10deg);
}

/* Réapparition après l'explosion */
.ie-nyan-cursor.is-respawn {
    animation: ie-nyan-pop .35s cubic-bezier(.3, 1.6, .5, 1);
}

@keyframes ie-nyan-pop {
    from {
        scale: 0.1;
        opacity: 0;
    }

    to {
        scale: 1;
        opacity: 1;
    }
}
