/* ============================================================
   OP Personnalisation - Styles front-end
   CMULTIMEDIA - objets-perso.fr
   Classes : op-* (propres, independantes de YITH WAPO)
   ============================================================ */

/* ----- Conteneur principal ----- */
.op-perso-container {
    margin: 1.5em 0;
    padding: 0;
}

/* ----- Groupe de champs ----- */
.op-perso-group {
    margin-bottom: 1.5em;
    padding: 1.25em;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.op-group-title {
    margin: 0 0 0.5em;
    font-size: 1.05em;
    font-weight: 600;
    color: #333;
}

.op-group-description {
    margin: 0 0 1em;
    color: #666;
    font-size: 0.9em;
}

/* ----- Champ generique ----- */
.op-field-wrap {
    margin-bottom: 1.1em;
}

.op-field-label {
    display: block;
    margin-bottom: 0.35em;
    font-weight: 500;
    color: #333;
    font-size: 0.95em;
}

.op-field-description {
    margin: 0 0 0.4em;
    color: #777;
    font-size: 0.85em;
}

.op-required {
    color: #c00;
    margin-left: 2px;
}

/* ----- Inputs texte ----- */
.op-field-input,
.op-field-select {
    display: block;
    width: 100%;
    padding: 0.55em 0.75em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95em;
    background: #fff;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.op-field-input:focus,
.op-field-select:focus {
    outline: none;
    border-color: #2a6b6e;
    box-shadow: 0 0 0 2px rgba(42, 107, 110, 0.15);
}

/* ----- Compteur de caracteres ----- */
.op-charcount {
    display: block;
    text-align: right;
    font-size: 0.8em;
    color: #999;
    margin-top: 0.2em;
}

.op-charcount.warn {
    color: #c00;
    font-weight: 600;
}

/* ----- Supplement de prix ----- */
.op-price-hint {
    display: inline-block;
    margin-top: 0.3em;
    font-size: 0.85em;
    color: #2a6b6e;
    font-weight: 500;
}

/* ----- Image choice (radio avec images) ----- */
.op-image-choice-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    margin-top: 0.25em;
}

.op-image-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.6em;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
    max-width: 110px;
    text-align: center;
}

.op-image-choice:hover {
    border-color: #2a6b6e;
}

.op-image-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.op-image-choice:has(input:checked) {
    border-color: #2a6b6e;
    background: rgba(42, 107, 110, 0.06);
}

.op-choice-image {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 0.35em;
}

.op-choice-label {
    font-size: 0.82em;
    color: #333;
    line-height: 1.2;
}

.op-choice-price {
    display: block;
    font-size: 0.78em;
    color: #2a6b6e;
    font-weight: 600;
    margin-top: 0.2em;
}

/* ----- Upload fichier ----- */
.op-file-upload-wrap {
    position: relative;
}

.op-field-file {
    display: block;
    width: 100%;
    padding: 0.5em;
    border: 1px dashed #bbb;
    border-radius: 4px;
    background: #f9f9f9;
    font-size: 0.9em;
    cursor: pointer;
    box-sizing: border-box;
}

.op-file-status {
    margin-top: 0.35em;
    font-size: 0.85em;
    min-height: 1.2em;
}

.op-file-status.success {
    color: #2a6b6e;
}

.op-file-status.error {
    color: #c00;
}

.op-file-hint {
    margin: 0.35em 0 0;
    font-size: 0.8em;
    color: #888;
}

/* ----- Checkbox ----- */
.op-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
}

.op-field-checkbox {
    margin-top: 0.15em;
    accent-color: #2a6b6e;
    cursor: pointer;
    flex-shrink: 0;
}

.op-checkbox-wrap label {
    cursor: pointer;
    font-size: 0.95em;
    color: #333;
}

/* ----- Info / Texte d'introduction ----- */
.op-info-title {
    margin: 0 0 0.4em;
    font-weight: 600;
    color: #333;
}

.op-info-content {
    color: #555;
    font-size: 0.9em;
    line-height: 1.5;
}

.op-info-content p {
    margin: 0 0 0.5em;
}

/* ----- Interrupteur sans gravure (compatible op-perso-hidden) ----- */
.op-perso-hidden {
    display: none !important;
}

/* ----- Responsive ----- */
@media (max-width: 480px) {
    .op-image-choice-wrap {
        gap: 0.5em;
    }
    .op-image-choice {
        max-width: 90px;
    }
    .op-choice-image {
        width: 58px;
        height: 58px;
    }
}
