/* odori-crea.css - COMPLET - Panels noirs bordure blanche 18px + Perles + Bijoux + Emeraude */
.odori-wrapper {
    padding: 12px;
    background: #0a0a0a;
    min-height: 100vh;
    box-sizing: border-box;
}

.odori-subtitle {
    text-align: center;
    border-top: 1px dashed #666;
    border-bottom: 1px dashed #666;
    margin: 0 8px 16px 8px;
    padding: 8px 0;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #888;
    font-family: "Courier New", monospace;
    text-transform: uppercase;
}

.odori-main {
    display: flex;
    gap: 14px;
    height: calc(100vh - 110px);
    align-items: stretch;
}

.odori-controls {
    width: 380px;
    min-width: 380px;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 2px 6px 20px 2px;
    box-sizing: border-box;
}

.odori-controls::-webkit-scrollbar {
    width: 5px;
}

.odori-controls::-webkit-scrollbar-track {
    background: #111;
    border-radius: 3px;
}

.odori-controls::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 3px;
}

.odori-controls::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.section-title {
    font-family: "Courier New", monospace;
    font-size: 12px;
    font-weight: 400;
    color: #e0e0e0;
    letter-spacing: 0.6px;
    margin: 2px 0 0 4px;
}

.panel {
    background: #0a0a0a;
    border: 1.5px solid #eeeeee;
    border-radius: 18px;
    padding: 16px 14px;
    box-sizing: border-box;
}

.panel h3 {
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 600;
    color: #ddd;
    margin: 0 0 12px 0;
    letter-spacing: 0.3px;
}

.panel-taille .field {
    margin-bottom: 16px;
}

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

.panel-taille label {
    font-family: "Courier New", monospace;
    font-size: 11px;
    color: #e8e8e8;
    display: block;
    margin-bottom: 8px;
}

.panel-taille input[type=range] {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
    accent-color: #e0e0e0;
    outline: none;
    cursor: pointer;
}

.panel-taille input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #d8d8d8;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #aaa;
    transition: background 0.2s;
}

.panel-taille input[type=range]::-webkit-slider-thumb:hover {
    background: #fff;
}

.range-labels-3 {
    display: flex;
    justify-content: space-between;
    font-family: "Courier New", monospace;
    font-size: 9px;
    color: #777;
    margin-top: 6px;
}

.row-2 {
    display: flex;
    gap: 20px;
}

.row-2 .field {
    flex: 1;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.icon-box {
    background: transparent;
    border: 1.2px solid #c8c8c8;
    border-radius: 11px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px;
    transition: all 0.2s ease;
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #ccc;
    box-sizing: border-box;
}

.icon-box:hover {
    border-color: #ffffff;
    background: #161616;
    transform: translateY(-1px);
}

.icon-box.active {
    border-color: #ffffff;
    background: #1a1a1a;
    box-shadow: 0 0 0 1px #fff;
}

.icon-box img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chips button {
    background: #101010;
    border: 1px solid #4a4a4a;
    border-radius: 14px;
    padding: 5px 10px;
    font-size: 10px;
    font-family: "Courier New", monospace;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
}

.chips button:hover {
    border-color: #fff;
    color: #fff;
    background: #1a1a1a;
}

.chips button.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.chips button.random-btn {
    background: linear-gradient(45deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
    color: #fff;
    font-weight: 700;
    border: 1.5px solid #fff;
    text-shadow: 0 1px 2px #000;
}

.chips button.random-btn:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

.color-wheel-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    background: #101010;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    padding: 8px 10px;
}

.color-wheel-row label {
    font-family: "Courier New", monospace;
    font-size: 9px;
    color: #aaa;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.color-wheel-row input[type=color] {
    width: 28px;
    height: 28px;
    border: 1.5px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    background: none;
    flex-shrink: 0;
}

.color-wheel-row input[type=color]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-wheel-row input[type=color]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.hue-range {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
    border-radius: 8px;
    cursor: pointer;
    outline: none;
}

.hue-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #000;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

#hex-value {
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #eee;
    min-width: 58px;
    text-align: right;
}

.download-btn {
    width: 100%;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 9px;
    padding: 11px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}

.download-btn:hover {
    background: #e0e0e0;
}

.export-infos {
    display: flex;
    gap: 12px;
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #777;
    margin-bottom: 4px;
}

.export-infos b {
    color: #ccc;
    font-weight: 600;
}

.odori-preview {
    flex: 1;
    background: #000;
    border: 1.5px solid #eeeeee;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

#canvas-container {
    width: 100%;
    height: 100%;
    min-height: 650px;
    background: #050505;
    display: block;
}

.details-box {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(0, 0, 0, 0.88);
    border: 1px solid #333;
    border-radius: 9px;
    padding: 9px 11px;
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #888;
    backdrop-filter: blur(4px);
}

.details-box h4 {
    font-size: 10px;
    margin: 0 0 5px 0;
    color: #ddd;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.axis-hint {
    position: absolute;
    bottom: 14px;
    right: 14px;
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #4a4a4a;
    line-height: 1.15;
    text-align: center;
    user-select: none;
}

.panel-galerie .galerie-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.panel-galerie .tab {
    background: #101010;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 9px;
    font-family: "Courier New", monospace;
    color: #999;
    cursor: pointer;
}

.panel-galerie .tab.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.galerie-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.galerie-grid::-webkit-scrollbar {
    width: 4px;
}

.galerie-grid::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.galerie-item {
    background: #0a0a0a;
    border: 1.2px solid #3a3a3a;
    border-radius: 10px;
    padding: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: 0.2s;
}

.galerie-item:hover {
    border-color: #fff;
    background: #1a1a1a;
    transform: translateY(-1px);
}

.galerie-item.active {
    border-color: #fff;
    background: #1a1a1a;
    box-shadow: 0 0 0 1px #fff;
}

.galerie-item img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
}

.galerie-item span {
    font-family: "Courier New", monospace;
    font-size: 7px;
    color: #ccc;
    text-align: center;
    line-height: 1.1;
}

.random-btn {
    background: linear-gradient(45deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f);
    color: #fff;
    font-weight: 700;
    border: 1px solid #fff;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 9px;
    cursor: pointer;
    font-family: "Courier New", monospace;
}

.transform-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.transform-btn {
    background: #0a0a0a;
    border: 1.2px solid #c8c8c8;
    border-radius: 11px;
    color: #ddd;
    padding: 9px 4px;
    font-family: "Courier New", monospace;
    font-size: 10px;
    line-height: 1.3;
    cursor: pointer;
    transition: all .2s;
}

.transform-btn small {
    color: #888;
    font-size: 9px;
}

.transform-btn:hover {
    border-color: #fff;
    background: #161616;
}

.transform-btn.active {
    border-color: #fff;
    background: #1a1a1a;
    box-shadow: 0 0 0 1px #fff;
    color: #fff;
}

.transform-hint {
    font-family: "Courier New", monospace;
    font-size: 9px;
    color: #777;
    line-height: 1.5;
    margin: 0 0 10px 0;
    text-align: center;
}

.transform-hint b {
    color: #ccc;
}

.btn-valider {
    width: 100%;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 9px;
    padding: 11px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.btn-valider:hover {
    background: #e0e0e0;
}

.btn-valider.validated {
    background: #2ecc71;
    color: #fff;
}

.btn-reset {
    width: 100%;
    background: transparent;
    color: #888;
    border: 1px solid #333;
    border-radius: 9px;
    padding: 8px;
    font-family: "Courier New", monospace;
    font-size: 10px;
    cursor: pointer;
    margin-top: 8px;
}

.btn-reset:hover {
    color: #fff;
    border-color: #888;
}

.valider-msg {
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #2ecc71;
    text-align: center;
    min-height: 14px;
    margin: 8px 0 0 0;
}

.cible-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.cible-btn {
    background: #0a0a0a;
    border: 1.2px solid #c8c8c8;
    border-radius: 11px;
    color: #ddd;
    padding: 10px 4px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.cible-btn.active {
    border-color: #fff;
    background: #1a1a1a;
    box-shadow: 0 0 0 1px #fff;
    color: #fff;
}

.panel-pave-btn {
    border-color: #FFD700 !important;
}

.btn-pave {
    width: 100%;
    background: #FFD700;
    color: #000;
    border: none;
    border-radius: 9px;
    padding: 11px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.btn-pave:hover {
    background: #FFE44D;
}

.btn-pave.open {
    background: #fff;
}

.pave-chooser {
    margin-top: 10px;
}

.pave-btn {
    background: #0a0a0a;
    border: 1.2px solid #3a3a3a;
    border-radius: 11px;
    color: #ddd;
    padding: 8px 4px;
    font-family: "Courier New", monospace;
    font-size: 9px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.pave-btn:hover {
    border-color: #fff;
    background: #1a1a1a;
}

.pave-btn.active {
    border-color: #fff;
    background: #1a1a1a;
    box-shadow: 0 0 0 1px #fff;
}

.pave-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--pave-color);
    border: 1.5px solid #fff;
    box-shadow: 0 0 6px var(--pave-color);
    display: block;
}

.pave-msg {
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #FFD700;
    text-align: center;
    margin: 10px 0 0 0;
}

.export-hint {
    font-family: "Courier New", monospace;
    font-size: 9px;
    color: #777;
    text-align: center;
    margin: 8px 0 0 0;
}

.galerie-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.galerie-title {
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #ddd;
    letter-spacing: .3px;
}

.btn-back-gems {
    background: #fff;
    color: #000;
    border: none;
    border-radius: 9px;
    padding: 7px 10px;
    font-family: "Courier New", monospace;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn-back-gems:hover {
    background: #e0e0e0;
}

.btn-supprimer {
    width: 100%;
    background: transparent;
    color: #ff6b6b;
    border: 1.2px solid #ff6b6b;
    border-radius: 9px;
    padding: 10px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
}

.btn-supprimer:hover {
    background: #2a0a0a;
    border-color: #ff8a8a;
}

.btn-remettre {
    width: 100%;
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 10px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
}

.btn-remettre:hover {
    background: #27ae60;
}

.pierre-msg {
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #aaa;
    text-align: center;
    min-height: 14px;
    margin: 8px 0 0 0;
}

.pierre-msg.alliance {
    color: #2ecc71;
}

.panel-gravure .field {
    margin-bottom: 12px;
}

.panel-gravure label {
    font-family: "Courier New", monospace;
    font-size: 11px;
    color: #e8e8e8;
    display: block;
    margin-bottom: 6px;
}

.panel-gravure input[type=text] {
    width: 100%;
    background: #111;
    border: 1.2px solid #c8c8c8;
    border-radius: 9px;
    color: #fff;
    padding: 10px;
    font-family: "Courier New", monospace;
    font-size: 12px;
    box-sizing: border-box;
}

.panel-gravure select {
    width: 100%;
    background: #111;
    border: 1.2px solid #c8c8c8;
    border-radius: 9px;
    color: #fff;
    padding: 9px;
    font-family: "Courier New", monospace;
    font-size: 11px;
}

.panel-gravure input[type=range] {
    width: 100%;
}

.gravure-hint {
    font-family: "Courier New", monospace;
    font-size: 9px;
    color: #888;
    line-height: 1.5;
    margin: 0 0 12px 0;
    text-align: center;
}

.gravure-hint b {
    color: #fff;
}

.btn-graver {
    width: 100%;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 9px;
    padding: 11px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.btn-graver:hover {
    background: #e0e0e0;
}

.btn-graver:disabled {
    opacity: 0.5;
    cursor: wait;
}

.btn-effacer-gravure {
    width: 100%;
    background: transparent;
    color: #ff8a8a;
    border: 1.2px solid #ff6b6b;
    border-radius: 9px;
    padding: 9px;
    font-family: "Courier New", monospace;
    font-size: 10px;
    cursor: pointer;
    margin-top: 8px;
}

.gravure-msg {
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #2ecc71;
    text-align: center;
    min-height: 14px;
    margin: 8px 0 0 0;
}

.gravure-check {
    display: flex;
    gap: 8px;
    align-items: center;
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #ffd76a;
    background: #1a1500;
    border: 1.2px solid #ffd76a;
    border-radius: 9px;
    padding: 9px;
    margin: 10px 0;
    cursor: pointer;
}

.gravure-check input {
    width: 16px;
    height: 16px;
    accent-color: #ffd76a;
    cursor: pointer;
}

.btn-voir-gravure {
    width: 100%;
    background: #ffd76a;
    color: #000;
    border: none;
    border-radius: 9px;
    padding: 10px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 8px;
}

.btn-voir-gravure:hover {
    background: #ffcc33;
}

.gravure-manual {
    background: #111;
    border: 1.2px dashed #ffd76a;
    border-radius: 12px;
    padding: 12px;
    margin: 12px 0;
}

.gravure-manual-title {
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    color: #ffd76a;
    text-align: center;
    margin-bottom: 6px;
}

.gravure-manual-hint {
    font-family: "Courier New", monospace;
    font-size: 9px;
    color: #888;
    text-align: center;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.gravure-manual .field {
    margin-bottom: 8px;
}

.gravure-manual label {
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #e8e8e8;
    display: block;
    margin-bottom: 4px;
}

.gravure-manual input[type=range] {
    width: 100%;
}

.gravure-manual span {
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #ffd76a;
}

.btn-spline-manuel {
    width: 100%;
    background: #ffd76a;
    color: #000;
    border: none;
    border-radius: 9px;
    padding: 10px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 10px;
}

.btn-spline-manuel.active {
    background: #fff;
    outline: 2px solid #ffd76a;
}

.btn-spline-reset {
    width: 100%;
    background: transparent;
    color: #aaa;
    border: 1px solid #555;
    border-radius: 9px;
    padding: 8px;
    font-family: "Courier New", monospace;
    font-size: 10px;
    cursor: pointer;
    margin-top: 6px;
}

.btn-spline-valider {
    width: 100%;
    background: #2ecc71;
    color: #000;
    border: none;
    border-radius: 9px;
    padding: 10px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
}

.btn-adapter-bague {
    width: 100%;
    background: #a29bfe;
    color: #000;
    border: none;
    border-radius: 9px;
    padding: 10px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 8px;
}

.btn-adapter-bague:hover {
    background: #8e83ff;
}

/* ===== NOUVEAU - PERLES + BIJOUX + EMERAUDE ===== */
.panel-perles {
    border-color: #FFD6E0 !important;
}

.perles-hint {
    font-family: "Courier New", monospace;
    font-size: 9px;
    color: #888;
    line-height: 1.5;
    margin: 0 0 12px 0;
    text-align: center;
}

.panel-perles .pave-btn.active {
    border-color: #FFD6E0;
    box-shadow: 0 0 0 1px #FFD6E0;
}

.panel-perles .color-wheel-row {
    margin-top: 12px;
}

#perle-hex-value {
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #eee;
    min-width: 58px;
    text-align: right;
    text-transform: uppercase;
}

.panel-perles .field label {
    font-family: "Courier New", monospace;
    font-size: 11px;
    color: #e8e8e8;
    display: block;
    margin-bottom: 6px;
}

.panel-perles input[type=range] {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
    accent-color: #FFD6E0;
    outline: none;
    cursor: pointer;
}

.panel-perles input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #FFD6E0;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #fff;
}

#perles-msg {
    color: #FFD6E0;
}

.panel-gravure.bijou-plaque {
    border-color: #FFD700 !important;
}

.panel-gravure.bijou-plaque::before {
    content: "MODE PLAQUE - texte à plat";
    display: block;
    font-family: "Courier New", monospace;
    font-size: 9px;
    letter-spacing: 1px;
    color: #FFD700;
    text-align: center;
    margin-bottom: 10px;
}

.panel-gravure.bijou-cercle::before {
    content: "MODE CERCLE - texte autour";
    display: block;
    font-family: "Courier New", monospace;
    font-size: 9px;
    letter-spacing: 1px;
    color: #ffd76a;
    text-align: center;
    margin-bottom: 10px;
}

body.mode-plaque #spline-rayon,
body.mode-plaque #spline-rot-x {
    opacity: 0.35;
}

body.mode-plaque .btn-adapter-bague {
    background: #FFD700;
}

body.mode-plaque .btn-adapter-bague:hover {
    background: #FFE44D;
}

#preformes-grid .icon-box[data-type="collier"].active,
#preformes-grid .icon-box[data-type="pendentif"].active {
    border-color: #FFD700;
    box-shadow: 0 0 0 1px #FFD700;
}

#preformes-grid .icon-box[data-type="bracelet"].active,
#preformes-grid .icon-box[data-type="boucle"].active {
    border-color: #a29bfe;
    box-shadow: 0 0 0 1px #a29bfe;
}

.galerie-item img[src*="FaceRondemeraude"],
.galerie-item img[src*="emeraude"] {
    border-radius: 50%;
    object-fit: cover;
    width: 36px;
    height: 36px;
}

@media (max-width: 900px) {
    .odori-main {
        flex-direction: column;
        height: auto;
    }

    .odori-controls {
        width: 100%;
        min-width: 0;
        max-height: none;
    }

    #canvas-container {
        min-height: 420px;
    }
}

.btn-perle-exact {
    width: 100%;
    background: #FFD6E0;
    color: #000;
    border: none;
    border-radius: 9px;
    padding: 10px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    margin: 8px 0;
}

.btn-perle-exact:hover {
    background: #ffc0d0;
}

.panel-gear {
    border-color: #C0C0C0 !important;
}

.panel-gear .pave-btn.active {
    border-color: #C0C0C0;
    box-shadow: 0 0 0 1px #C0C0C0;
}

#perles-gear-msg {
    color: #C0C0C0;
}

#perle-gear-hex-value {
    font-family: "Courier New", monospace;
    font-size: 10px;
    color: #eee;
    min-width: 58px;
    text-align: right;
    text-transform: uppercase;
}

.panel-gear input[type=range] {
    width: 100%;
}

/* ===== FIX CSS ENGRANAGES - la classe pave-grid n'existait pas, donc les boutons tombaient en colonne ===== */
.pave-grid,
#perles-gear-grid,
#perles-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
}

#perles-gear-grid .pave-btn,
#perles-grid .pave-btn {
    width: 100% !important;
    min-width: 0;
}

.panel-gear {
    border-color: #C0C0C0 !important;
}

.panel-gear .color-wheel-row {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.panel-gear .hue-range {
    flex: 1 !important;
    min-width: 0;
}

.panel-boucle-create {
    border-color: #FFD6E0 !important;
}

.panel-boucle-create .btn-valider {
    margin-top: 6px;
}

.boucle-step {
    background: #111;
    border: 1px dashed #FFD6E0;
    border-radius: 12px;
    padding: 10px;
    margin: 10px 0;
}

.boucle-step.active {
    border-style: solid;
    border-color: #FFD6E0;
}

.boucle-step.done {
    opacity: 0.7;
    border-color: #2ecc71;
}

/* ==========================================================================
   ODORI — MODE PAYSAGE MOBILE : l'appli comme sur ordinateur
   A coller a la FIN de odori-crea.css. Sur ordinateur, RIEN ne change.
   Quand on pivote le telephone : preformes a gauche, 3D a droite.
   ========================================================================== */
@media (max-width: 900px) and (orientation: landscape) {

    /* --- On utilise toute la hauteur de l'ecran --- */
    .odori-wrapper {
        padding: 6px;
        overflow: hidden;
    }

    .odori-subtitle {
        display: none;
    }

    /* --- LA rangee repasse en ligne : panneaux a gauche, 3D a droite --- */
    .odori-main {
        flex-direction: row !important;
        gap: 10px;
        align-items: stretch;
    }

    /* --- Panneaux : colonne fixe a gauche, qui scrolle dedans --- */
    .odori-controls {
        order: 1;
        width: 280px !important;
        max-width: 280px;
        flex: 0 0 280px !important;
        max-height: calc(100vh - 12px);
        max-height: calc(100dvh - 12px);
        overflow-y: auto !important;
        padding: 2px 2px 10px 2px;
    }

    /* --- La 3D prend tout le reste --- */
    .odori-preview {
        order: 2;
        flex: 1 !important;
        min-height: 0 !important;
    }

    #canvas-container {
        height: calc(100vh - 12px) !important;
        height: calc(100dvh - 12px) !important;
        min-height: 0 !important;
    }

    /* --- Preformes : en petite grille 2 colonnes (pas en ligne) --- */
    .odori-controls #preformes-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }

    .panel {
        padding: 10px 8px;
    }

    .details-box {
        font-size: 9px;
        max-width: calc(100% - 60px);
    }

    /* --- Bouton flottant "Panneaux" : inutile en paysage, on le cache --- */
    #odori-btn-panneaux-mobile {
        display: none !important;
    }
}