/* Dans style.css ou un nouveau fichier css */

@font-face {
  font-family: 'Quickbrush'; /* Nom que vous utiliserez dans le HTML */
  src: url('fonts/Quickbrush.ttf') format('truetype'); /* Chemin relatif depuis le CSS */
  font-weight: normal;
  font-style: normal;
  /* Ajoutez d'autres formats si vous en avez (woff, woff2) pour une meilleure compatibilité */
}

/* Conteneur global */
.h2o-card-app-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Montserrat', sans-serif;
}

/* Layout Front: Colonnes */
.h2o-front-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.h2o-col-controls {
    flex: 1;
    min-width: 300px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.h2o-col-preview {
    flex: 2;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 650px;
    width: 100%;
}

/* Formulaire */
.h2o-field-row { margin-bottom: 15px; }
.h2o-field-row label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 0.9em; color: #333; }
.h2o-field-row input {
    width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px;
}

/* Boutons */
.h2o-btn-primary,
.h2o-btn-outline {
    width: 100%;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.75em 1.2em;
    font: inherit;
    border-radius: 4px;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.h2o-btn-primary:hover,
.h2o-btn-outline:hover {
    opacity: 0.8;
}

/* Canvas Preview */
.h2o-preview-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 650px;
}
.h2o-preview-card .label {
    font-size: 12px; text-transform: uppercase; color: #999; font-weight: bold; margin-bottom: 5px;
}
.h2o-preview-card canvas {
    width: 100% !important; /* Responsive width */
    height: auto !important; /* Maintain aspect ratio */
    display: block;
    background: #eee; /* Placeholder pendant le chargement */
}

/* Thumbnails Selector */
.h2o-thumbnails-grid {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
}
.h2o-thumb {
    width: 80px; cursor: pointer; border: 2px solid transparent; opacity: 0.6; transition: 0.2s;
}
.h2o-thumb img { width: 100%; border-radius: 4px; display: block; }
.h2o-thumb.selected { border-color: #201747; opacity: 1; }

/* Admin specific fixes */
.h2o-visual-area {
    position: relative;
    border: 1px solid #ccc;
    background: #fff;
    max-width: 100%;
    overflow: hidden;
    min-height: 200px;
}
.h2o-visual-inner {
    position: relative;
    width: 100%;
}
.h2o-preview-canvas {
    width: 100%;
    height: auto;
    display: block;
    background: #f7f7f7;
}
.h2o-zones-overlay {
    position: absolute;
    inset: 0;
}
.h2o-visual-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    color: #555;
    font-weight: 600;
    background: rgba(255,255,255,0.85);
    border: 2px dashed #dcdcde;
    pointer-events: none;
}
.h2o-zone {
    position: absolute;
    border: 1px dashed rgba(34,113,177,0.7);
    background: rgba(34, 113, 177, 0.08);
    cursor: pointer;
    white-space: pre-wrap;
    user-select: text;
    padding: 6px 6px 6px 8px;
    line-height: 1.2;
    color: inherit;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-height: 22px;
}
.h2o-zone::after {
    content: attr(data-label);
    position: absolute;
    top: -18px;
    left: 0;
    font-size: 10px;
    font-weight: 600;
    color: #1f3a5d;
    background: #fff;
    padding: 0 4px;
    border-radius: 3px;
    border: 1px solid rgba(31,58,93,0.2);
    white-space: nowrap;
    pointer-events: none;
}
.h2o-zone.h2o-zone-image {
    padding: 0;
    background-color: rgba(34, 113, 177, 0.12);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    min-height: 40px;
}
.h2o-zone.h2o-zone-image::after {
    top: -22px;
}
.h2o-zone.active {
    border-color: #d63638;
    background: rgba(214, 54, 56, 0.08);
    border-radius: 4px;
    z-index: 100;
}
.h2o-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.h2o-color-row input[type="text"] {
    width: 110px;
    flex: 0 0 110px;
    text-transform: uppercase;
    font-family: monospace;
}

.h2o-preview-stack {
    margin-bottom: 20px;
}
.h2o-preview-stack .h2o-add-zone {
    margin-top: 10px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.h2o-add-zone[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.h2o-zone-image-preview {
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 8px;
    min-height: 80px;
    background: #f6f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.h2o-zone-image-preview img {
    max-width: 100%;
    height: auto;
    display: block;
}
.h2o-zone-image-preview.is-empty {
    font-size: 12px;
    color: #666;
    font-style: italic;
}
.h2o-zone-image-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

#h2o-verso-section.is-hidden {
    display: none;
}

.h2o-admin-wrap .h2o-editor-ui {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.h2o-admin-wrap .h2o-sidebar {
    flex: 1 1 320px;
    max-width: 32%;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
}
.h2o-admin-wrap .h2o-canvas-container {
    flex: 2 1 480px;
    width: 100%;
    max-width: 650px;
}
.h2o-zones-overlay .h2o-zone {
    pointer-events: auto;
}
.zone-font-url {
    display: none;
    grid-column: span 2;
}
.zone-font-url.is-visible {
    display: block;
}

.h2o-top-tabs {
    margin-top: 20px;
}
.h2o-panel {
    display: none;
    margin-top: 20px;
}
.h2o-panel.is-active {
    display: block;
}
.h2o-tabs-header .nav-tab {
    text-decoration: none;
}
.h2o-tabs-header .h2o-tab-add {
    font-weight: 700;
    text-align: center;
}

.h2o-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.h2o-acc-item {
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
    cursor: move;
}
.h2o-acc-item.drag-over {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1 inset;
}
.h2o-acc-header {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 10px 14px 0;
}
.h2o-acc-toggle {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 600;
}
.h2o-acc-inline {
    display: flex;
    min-width: 200px;
    padding-bottom: 15px;
}
.h2o-acc-inline label {
    text-transform: uppercase;
    font-size: 11px;
    color: #555;
    letter-spacing: 0.05em;
    margin-right: 5px;
    margin-bottom: 2px;
}
.h2o-acc-inline input {
    width: 100%;
}
.h2o-acc-body {
    padding: 0 14px 14px;
}
.h2o-btn-group { 
    display:flex; 
    gap:10px; 
    margin-top:15px;
    margin-bottom:15px;
}
.h2o-field-group { 
margin-bottom:15px;
}   
.h2o-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.h2o-props-actions {
    display: flex;
    justify-content: flex-end;
}

.h2o-pill {
    font-size: 11px;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 4px 10px;
    background: #f0f0f1;
    color: #555;
}
.pill-recto {
    background: rgba(32, 23, 71, 0.1);
    color: #201747;
}
.pill-verso {
    background: rgba(229, 85, 79, 0.1);
    color: #E5554F;
}

.h2o-empty-state {
    padding: 40px;
    text-align: center;
    border: 2px dashed #dcdcde;
    border-radius: 8px;
    color: #777;
    background: #fafafa;
}

.h2o-models-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.h2o-model-card {
    border: 1px solid #dcdcde;
    border-radius: 10px;
    padding: 16px;
    background: #fff;
}
.h2o-model-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.h2o-model-card-body {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.h2o-model-thumb {
    flex: 1;
    min-height: 120px;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}
.h2o-model-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.h2o-model-meta {
    font-size: 12px;
    color: #555;
    margin: 0;
}

/* Front controls */
.h2o-model-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.h2o-model-tab {
    border: 1px solid #ccc;
    background: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color:#040404;
}
.h2o-model-tab.active {
    border-color: #201747;
    color: #201747;
    font-weight: 600;
}
.h2o-btn-outline[disabled],
.h2o-btn-primary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
.h2o-actions-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}
.h2o-col-preview .h2o-preview-card {
    max-width: 650px;
}
.h2o-verso-toggle {
    border: 1px solid #dcdcde;
    padding: 10px;
    border-radius: 6px;
    background: #fff;
}
.h2o-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 13px;
}
.h2o-switch input {
    margin: 0;
    transform: scale(1.1);
}

.h2o-accordion .h2o-props-section {
    border: 1px solid #e0e0e5;
    padding: 12px;
    border-radius: 6px;
    background: #f8f8fb;
    margin-bottom: 12px;
}
.h2o-accordion .h2o-field-group label {
    text-transform: uppercase;
    font-size: 11px;
    color: #555;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
}
.h2o-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.h2o-props-hint {
    font-size: 11px;
    color: #777;
    margin: 5px 0 0;
}
