/*
 * ADK Entreprise — Interface 1.0.2 : textes simplifiés et icônes de catégories.
 * Tous les sélecteurs restent limités à #adk-ent-repartition.
 * Aucun style global, aucun changement du JavaScript ou du moteur PHP.
 */
#adk-ent-repartition {
    --adk-ent-gold: #967b30;
    --adk-ent-blue: #273554;
    --adk-ent-split: 100%;
    display: block;
    clear: both;
    float: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 26px 0 6px;
    padding: 18px;
    border: 1px solid #d8cfb7;
    border-radius: 12px;
    background: #fffcf6;
    color: #353535;
    font-family: inherit;
    text-align: left;
}
#adk-ent-repartition,
#adk-ent-repartition * { box-sizing: border-box; }
#adk-ent-repartition [hidden] { display: none !important; }
#adk-ent-repartition legend {
    float: none;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0 7px;
    color: #765f25;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
}
#adk-ent-repartition p { margin: 0; padding: 0; }
#adk-ent-repartition .adk-ent-intro {
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.55;
}
#adk-ent-repartition .adk-ent-slider-area { width: 100%; margin: 0 0 14px; }
#adk-ent-repartition input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: 44px !important;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: linear-gradient(to right, var(--adk-ent-gold) 0%, var(--adk-ent-gold) var(--adk-ent-split), var(--adk-ent-blue) var(--adk-ent-split), var(--adk-ent-blue) 100%) center / 100% 8px no-repeat;
    cursor: pointer;
}
#adk-ent-repartition input[type="range"]::-webkit-slider-runnable-track { background: transparent; height: 8px; border: 0; }
#adk-ent-repartition input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    margin-top: -11px;
    border: 3px solid #765f25;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgb(0 0 0 / 12%);
}
#adk-ent-repartition input[type="range"]::-moz-range-track { background: transparent; height: 8px; border: 0; }
#adk-ent-repartition input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border: 3px solid #765f25; border-radius: 50%; background: #fff; }
#adk-ent-repartition input[type="range"]:disabled { opacity: .45; cursor: not-allowed; }

/* La grille dépend de la place disponible dans la colonne produit, pas seulement de l'écran. */
#adk-ent-repartition .adk-ent-fields {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 195px), 1fr));
    gap: 12px;
    align-items: stretch;
}
#adk-ent-repartition .adk-ent-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e4dcc8;
    border-top: 3px solid var(--adk-ent-gold);
    border-radius: 9px;
    background: #fff;
}
#adk-ent-repartition .adk-ent-drinks { border-color: #dce0e8; border-top-color: var(--adk-ent-blue); }
#adk-ent-repartition .adk-ent-field > label {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0 0 12px;
    padding: 0;
    color: #353535;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}
#adk-ent-repartition .adk-ent-category-icon {
    display: block;
    flex: 0 0 auto;
    float: none !important;
    width: 48px !important;
    height: 44px !important;
    min-width: 0;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain;
    object-position: center;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
#adk-ent-repartition .adk-ent-category-copy { display: block; flex: 1 1 auto; min-width: 0; }
#adk-ent-repartition .adk-ent-category-name { display: block; overflow-wrap: break-word; }
#adk-ent-repartition .adk-ent-rate {
    display: inline-block;
    margin-top: 5px;
    padding: 2px 7px;
    border-radius: 5px;
    background: #f7f1e2;
    color: #705b26;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
#adk-ent-repartition .adk-ent-drinks .adk-ent-rate { background: #eef1f7; color: var(--adk-ent-blue); }
#adk-ent-repartition .adk-ent-input-wrap { position: relative; width: 100%; }
#adk-ent-repartition .adk-ent-input-wrap > span { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); font-size: 16px; color: #626262; pointer-events: none; }
#adk-ent-repartition input[type="text"] {
    display: block;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    height: auto !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 10px 35px 10px 12px !important;
    border: 1px solid #aaa18e !important;
    border-radius: 7px !important;
    background: #fff !important;
    color: #242424 !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 500;
    line-height: 1.5 !important;
    text-align: left !important;
}
#adk-ent-repartition input:focus-visible { outline: 3px solid #273554 !important; outline-offset: 3px; }
#adk-ent-repartition input[aria-invalid="true"] { border-color: #a62620 !important; }
#adk-ent-repartition .adk-ent-help { margin-top: 10px; color: #626262; font-size: 12px; line-height: 1.5; }
#adk-ent-repartition .adk-ent-total {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
    margin-top: 17px;
    padding-top: 13px;
    border-top: 1px solid #e1d7c1;
    color: #353535;
    font-size: 13px;
    line-height: 1.5;
}
#adk-ent-repartition .adk-ent-total > span { min-width: 0; }
#adk-ent-repartition .adk-ent-total strong { margin-left: auto; color: #765f25; font-size: 17px; font-weight: 700; white-space: nowrap; }
#adk-ent-repartition .adk-ent-default { margin-top: 10px; color: #626262; font-size: 11px; line-height: 1.45; }
#adk-ent-repartition .adk-ent-error { margin-top: 12px; color: #932b24; font-size: 12px; font-weight: 500; line-height: 1.5; }
@media (max-width: 600px) {
    #adk-ent-repartition { margin-top: 22px; padding: 14px; }
    #adk-ent-repartition legend { font-size: 16px; }
    #adk-ent-repartition .adk-ent-field > label { font-size: 14px; }
    #adk-ent-repartition .adk-ent-category-icon { width: 52px !important; height: 47px !important; }
}
@media (forced-colors: active) {
    #adk-ent-repartition input[type="range"] { appearance: auto; background: none; }
    #adk-ent-repartition input[type="range"]::-webkit-slider-thumb { background: ButtonFace; border-color: ButtonText; }
    #adk-ent-repartition .adk-ent-field { border-color: CanvasText; }
}
