/* 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é */
}


@font-face {
    font-family: 'Akrobat Regular';
    font-style: normal;
    font-weight: normal;
    src: local('Akrobat Regular'), url('fonts/akrobat-webfont/Akrobat-Regular.woff') format('woff');
    }
    

    @font-face {
    font-family: 'Akrobat Light';
    font-style: normal;
    font-weight: normal;
    src: local('Akrobat Light'), url('fonts/akrobat-webfont/Akrobat-Light.woff') format('woff');
    }
    

    @font-face {
    font-family: 'Akrobat ExtraLight';
    font-style: normal;
    font-weight: normal;
    src: local('Akrobat ExtraLight'), url('fonts/akrobat-webfont/Akrobat-ExtraLight.woff') format('woff');
    }
    

    @font-face {
    font-family: 'Akrobat SemiBold';
    font-style: normal;
    font-weight: normal;
    src: local('Akrobat SemiBold'), url('fonts/akrobat-webfont/Akrobat-SemiBold.woff') format('woff');
    }
    

    @font-face {
    font-family: 'Akrobat Bold';
    font-style: normal;
    font-weight: normal;
    src: local('Akrobat Bold'), url('fonts/akrobat-webfont/Akrobat-Bold.woff') format('woff');
    }
    

    @font-face {
    font-family: 'Akrobat ExtraBold Regular';
    font-style: normal;
    font-weight: normal;
    src: local('Akrobat ExtraBold Regular'), url('fonts/akrobat-webfont/akrobat-extrabold-webfont.woff') format('woff');
    }
    

    @font-face {
    font-family: 'Akrobat Black';
    font-style: normal;
    font-weight: normal;
    src: local('Akrobat Black'), url('fonts/akrobat-webfont/Akrobat-Black.woff') format('woff');
    }

/* ================================================================
   FRONT-END — Outil de personnalisation carte de visite
   ================================================================ */

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

/* Layout 2 colonnes : formulaire (gauche) | preview (droite) */
.h2o-front-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

/* La colonne preview reste visible au scroll */
.h2o-col-preview {
    position: sticky;
    top: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* La colonne formulaire est contrainte en hauteur avec scroll interne */
.h2o-col-controls {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 80px);
    overflow: hidden;
    background: #fff;
    border: 1.5px solid #e8e8ed;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.h2o-form-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 0;
}

/* Formulaire — champs modernes */
.h2o-field-row { margin-bottom: 18px; }
.h2o-field-row label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 7px;
}
.h2o-field-row input,
.h2o-field-row select,
.h2o-field-row textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e0e0e5;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.h2o-field-row input:focus,
.h2o-field-row select:focus,
.h2o-field-row textarea:focus {
    outline: none;
    border-color: #201747;
    box-shadow: 0 0 0 3px rgba(32,23,71,0.08);
}
.h2o-phone2-group {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
}
.h2o-phone2-group .h2o-phone2-hidden {
    display: none;
}
.h2o-qr-style {
    display: none;
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.h2o-qr-style.is-visible {
    display: flex;
}
.h2o-qr-style > span {
    font-size: 12px;
    font-weight: 700;
    color: #201747;
}
.h2o-qr-style label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
}
.h2o-qr-style input[type="radio"] {
    width: auto;
    padding: 0;
    margin: 0;
}

/* Boutons de téléchargement */
.h2o-actions-bar {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f2;
    background: #fafafa;
    border-radius: 0 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.h2o-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: #201747;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
}
.h2o-btn-primary:hover { background: #2d2260; }
.h2o-btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.h2o-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
    color: #201747;
    border: 1.5px solid #201747;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.h2o-btn-outline:hover { background: #201747; color: #fff; }
.h2o-btn-outline[disabled],
.h2o-btn-primary[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Canvas Preview */
.h2o-preview-card {
    background: transparent;
    width: 100%;
}
.h2o-preview-card .label {
    font-size: 10px;
    text-transform: uppercase;
    color: #aaa;
    font-weight: 700;
    letter-spacing: 0.07em;
    margin-bottom: 8px;
}
.h2o-preview-card canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.13);
    background: #eee;
}

/* Sélecteur de modèles — thumbnails front */
.h2o-thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    padding-bottom: 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f2;
}
.h2o-thumbnails-grid:empty { display: none; }
.h2o-thumb {
    cursor: pointer;
    border: 2.5px solid transparent;
    opacity: 0.55;
    transition: opacity 0.15s, border-color 0.15s;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f5f5f7;
    padding-bottom: 6px;
}
.h2o-thumb img {
    width: 100%;
    height: 72px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}
.h2o-thumb-label {
    font-size: 10px;
    line-height: 1.2;
    margin-top: 5px;
    color: #555;
    text-align: center;
    padding: 0 4px;
    word-break: break-word;
}
.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: grab;
    white-space: pre-wrap;
    user-select: none;
    padding: 6px 6px 6px 8px;
    line-height: 1.2;
    color: inherit;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-height: 22px;
    transition: box-shadow 0.1s;
}
.h2o-zone:hover {
    box-shadow: 0 0 0 2px rgba(34,113,177,0.5);
}
.h2o-zone.is-dragging {
    cursor: grabbing;
    opacity: 0.85;
    box-shadow: 0 4px 16px rgba(34,113,177,0.25);
    z-index: 200;
}
.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.h2o-zone-qrcode {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    box-shadow: none;
}
.h2o-zone.h2o-zone-qrcode::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;
}

/* ================================================================
   ADMIN — Constructeur de cartes
   ================================================================ */

/* Switcher de modèles — thumbnails */
.h2o-tabs-header {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 0 12px;
    border-bottom: 1px solid #e8e8ed;
    margin-bottom: 16px;
}
.h2o-model-thumb-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 2px solid #e0e0e5;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    width: 96px;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    line-height: 1.3;
    text-align: center;
}
.h2o-model-thumb-btn img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.h2o-thumb-placeholder {
    width: 80px;
    height: 50px;
    background: #f0f0f2;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 20px;
}
.h2o-model-thumb-btn:hover { border-color: #201747; }
.h2o-model-thumb-btn.is-active {
    border-color: #201747;
    box-shadow: 0 0 0 2px rgba(32,23,71,0.15);
    color: #201747;
}
.h2o-thumb-add {
    background: #f8f8fa;
    color: #666;
    border-style: dashed;
    font-size: 20px;
    font-weight: 400;
    padding: 10px 6px;
    height: auto;
}
.h2o-thumb-add:hover { background: #201747; color: #fff; border-color: #201747; }

/* Sélecteur de format — boutons visuels admin */
.h2o-format-picker {
    display: flex;
    gap: 8px;
}
.h2o-format-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 6px;
    border: 2px solid #e0e0e5;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    line-height: 1.3;
    text-align: center;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.h2o-format-btn:hover { border-color: #201747; }
.h2o-format-btn.is-active {
    border-color: #201747;
    box-shadow: 0 0 0 2px rgba(32,23,71,0.15);
    color: #201747;
}
.h2o-format-shape {
    display: block;
    background: #e8e8ed;
    border-radius: 3px;
    border: 1.5px solid #bbb;
    flex-shrink: 0;
}
.h2o-format-shape--landscape { width: 38px; height: 25px; }
.h2o-format-shape--portrait  { width: 25px; height: 38px; }
.h2o-format-shape--custom    { width: 30px; height: 30px; border-style: dashed; background: #f5f5f7; }
.h2o-format-btn.is-active .h2o-format-shape {
    background: rgba(32,23,71,0.1);
    border-color: #201747;
}

/* Layout : sidebar fixe + canvas qui prend le reste */
.h2o-admin-wrap .h2o-editor-ui {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}
.h2o-admin-wrap .h2o-sidebar {
    flex: 0 0 340px;
    width: 340px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    position: sticky;
    top: 32px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}
.h2o-admin-wrap .h2o-canvas-container {
    flex: 1 1 0;
    min-width: 0;
}
.h2o-zones-overlay .h2o-zone {
    pointer-events: auto;
}
.zone-font-url {
    display: none;
    grid-column: span 2;
}
.zone-font-preset {
    display: none;
}
.zone-font-preset.is-visible {
    display: block;
}
.zone-font-url.is-visible {
    display: block;
}

.h2o-top-tabs {
    margin-top: 20px;
}
.h2o-panel {
    display: none;
    margin-top: 16px;
}
.h2o-panel.is-active {
    display: block;
}

/* Responsive front — 1 colonne sous 768px */
@media (max-width: 768px) {
    .h2o-front-layout {
        grid-template-columns: 1fr;
    }
    .h2o-col-preview {
        position: static;
    }
    .h2o-col-controls {
        max-height: none;
        overflow: visible;
    }
    .h2o-form-scroll {
        overflow: visible;
    }
    .h2o-actions-bar {
        border-radius: 0 0 12px 12px;
    }
}

/* Admin responsive */
@media (max-width: 960px) {
    .h2o-admin-wrap .h2o-editor-ui {
        flex-direction: column;
    }
    .h2o-admin-wrap .h2o-sidebar {
        flex: none;
        width: 100%;
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}

.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;
}
