/* ==========================
   FORM
========================== */

/* Aperçu d'une image déjà uploadée (logo, favicon...) dans un réglage — contain plutôt que
   cover, pour montrer l'image entière telle qu'elle sera utilisée, pas une version recadrée. */
.parametre-image-preview{
    width:88px;
    height:88px;
    border:1px solid var(--border);
    border-radius:12px;
    background:#F9FAFB;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    padding:8px;
}

.parametre-image-preview img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}

.parametre-image-preview .product-thumb-placeholder{
    font-size:26px;
}

.form-group{
    display:flex;
    flex-direction:column;
    margin-bottom:14px;
}

.form-label-admin{
    margin-bottom:5px;
    font-size:12px;
    font-weight:600;
    color:var(--dark);
}

.input-admin{
    width:100%;
    height:36px;
    padding:0 12px;
    border:1px solid var(--border);
    border-radius:8px;
    background:#fff;
    color:var(--dark);
    font-size:13px;
    transition:all .25s ease;
}

.input-admin:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(45,127,249,.12);
    outline:none;
}

.input-error{
    border-color:var(--danger);
}

.error-text{
    margin-top:6px;
    color:var(--danger);
    font-size:13px;
}

.switch-group{
    display:flex;
    align-items:center;
    gap:12px;
}

.switch{
    position:relative;
    display:inline-block;
    width:46px;
    height:26px;
    flex-shrink:0;
}

.switch input{
    opacity:0;
    width:0;
    height:0;
}

.switch-slider{
    position:absolute;
    cursor:pointer;
    inset:0;
    background:#D0D5DD;
    border-radius:999px;
    transition:.25s;
}

.switch-slider::before{
    content:"";
    position:absolute;
    width:20px;
    height:20px;
    left:3px;
    top:3px;
    background:white;
    border-radius:50%;
    transition:.25s;
}

.switch input:checked + .switch-slider{
    background:var(--primary);
}

.switch input:checked + .switch-slider::before{
    transform:translateX(20px);
}

/* Variante statut de paiement : vert = payé, plutôt que le bleu générique — cohérent avec les
   badges Payé/À crédit utilisés partout ailleurs dans l'app. */
.switch-paiement input:checked + .switch-slider{
    background:var(--success);
}

/* Variante compacte : dans un tableau, sous un badge déjà informatif, le switch n'a besoin
   que d'être identifiable, pas grand. */
.switch-sm{
    width:32px;
    height:18px;
}

.switch-sm .switch-slider::before{
    width:12px;
    height:12px;
    left:3px;
    top:3px;
}

.switch-sm input:checked + .switch-slider::before{
    transform:translateX(14px);
}

.statut-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 14px;
    font-size:13px;
    border:1px solid var(--border);
    border-radius:8px;
    background:#fff;
}

.statut-row > span:first-child{
    font-weight:600;
    color:var(--dark);
}

.statut-paiement-label{
    font-weight:700;
    color:var(--primary);
}

.form-footer{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    margin-top:20px;
}