/* V186 (compact) — hauteur 34 px, police 13 px, espacements réduits. */
/* V182 — Champs de saisie uniformes : même hauteur, même police, même style partout ; formulaires lisibles et structurés. Visuel uniquement, aucun nom de champ ni API modifié. */
:root{--djf-field-h:34px;--djf-field-fs:13px;--djf-field-r:8px;--djf-field-pad:0 10px;--djf-label-fs:12px}

/* 1. Tous les champs : même hauteur, même police, même bordure */
html body :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]),select:not([multiple])){
 box-sizing:border-box!important;height:var(--djf-field-h)!important;min-height:var(--djf-field-h)!important;max-height:var(--djf-field-h)!important;
 padding:var(--djf-field-pad)!important;font:inherit!important;font-size:var(--djf-field-fs)!important;line-height:1.2!important;
 border:1px solid #b7cfbf!important;border-radius:var(--djf-field-r)!important;background-color:#fff!important;color:#172d50!important;
 min-width:0;max-width:100%;opacity:1;-webkit-appearance:none;appearance:none;text-overflow:ellipsis;
 transition:border-color .15s,box-shadow .15s}
html body :is(input,select,textarea)::placeholder{color:#7d9186;opacity:1;font-weight:400}

/* Liste déroulante : flèche visible, même gabarit que les autres champs */
html body select:not([multiple]){padding-right:30px!important;cursor:pointer;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%23087a43' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
 background-repeat:no-repeat!important;background-position:right 10px center!important;background-size:11px 7px!important}
html body select[multiple]{box-sizing:border-box;padding:6px 8px;font:inherit;font-size:var(--djf-field-fs);border:1px solid #b7cfbf;border-radius:var(--djf-field-r);min-height:80px;width:100%}

/* Date / heure / nombre : même gabarit que le texte */
html body :is(input[type=date],input[type=time],input[type=datetime-local],input[type=month],input[type=week]){display:block;min-width:0}
html body :is(input[type=date],input[type=time],input[type=datetime-local])::-webkit-datetime-edit{padding:0}
html body input[type=number]{-moz-appearance:textfield}

/* Zone de texte : même largeur, hauteur confortable */
html body textarea{box-sizing:border-box!important;width:100%;min-height:68px!important;padding:8px 10px!important;font:inherit!important;font-size:var(--djf-field-fs)!important;line-height:1.35!important;
 border:1px solid #b7cfbf!important;border-radius:var(--djf-field-r)!important;background:#fff!important;color:#172d50!important;resize:vertical;max-width:100%}

/* Fichier : même hauteur, bouton intégré */
html body input[type=file]{padding:0 6px 0 6px!important;line-height:normal!important;cursor:pointer;background:#f7fbf8!important;border-style:dashed!important;display:flex;align-items:center}
html body input[type=file]::file-selector-button{height:24px;margin:0 10px 0 0;padding:0 12px;border:0;border-radius:6px;background:linear-gradient(135deg,#0875c9,#10285b);color:#fff;font:inherit;font-size:12px;font-weight:650;cursor:pointer}

/* Survol, focus, désactivé : même comportement sur tous les champs */
html body :is(input,select,textarea):hover:not(:disabled):not([readonly]){border-color:#6fa886!important}
html body :is(input,select,textarea):focus,html body :is(input,select,textarea):focus-visible{outline:0!important;border-color:#0875c9!important;box-shadow:0 0 0 3px rgba(14,154,85,.18)!important;background-color:#fff!important}
html body :is(input,select,textarea):is(:disabled,[readonly]):not([type=checkbox]):not([type=radio]){background-color:#eef3ef!important;color:#4d6358!important;cursor:not-allowed;opacity:1!important}
html body :is(input,select,textarea):user-invalid{border-color:#d7192d!important;box-shadow:0 0 0 3px rgba(194,45,56,.14)!important}

/* Cases à cocher / boutons radio : taille homogène */
html body input[type=checkbox],html body input[type=radio]{width:16px;height:16px;min-width:16px;margin:0;accent-color:#12519a;cursor:pointer;flex:none;vertical-align:middle}

/* 2. Étiquettes : même style, toujours visibles au-dessus du champ */
html body form label,html body .djf-v152-grid>label,html body dialog label{display:flex;flex-direction:column;gap:3px;font-size:var(--djf-label-fs)!important;font-weight:650;line-height:1.25!important;color:#1d4a37;letter-spacing:.005em;min-width:0;white-space:normal;overflow:visible}
html body form label:has(>input[type=checkbox]),html body form label:has(>input[type=radio]),html body form label.check,html body form label.cb{flex-direction:row;align-items:center;gap:8px;font-size:13px!important;font-weight:550;min-height:var(--djf-field-h);padding:6px 10px;line-height:1.35!important;border:1px solid #d9e4f4;border-radius:var(--djf-field-r);background:#f7fbf8}
html body form label>input,html body form label>select,html body form label>textarea{width:100%}
html body form label:has(>input[type=checkbox])>input,html body form label:has(>input[type=radio])>input{width:16px}
html body form label :is(small,.hint,.help){font-weight:400;color:#5a6d63;font-size:12px}

/* 3. Formulaires : grille régulière, colonnes de même largeur, espacement constant */
html body form:not(.sr):not(.djf-no-compact){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:8px 12px;align-items:start}
html body form.djf-v152-grid,html body .djf-v152-grid{gap:8px 12px!important;align-items:start!important}
html body form:not(.sr)>:is(h1,h2,h3,h4,fieldset,hr,p,.actions,.form-actions,.buttons,.btn-row,.cp-note,.cp-actions,.msg,.err,.ok,[data-full-width]),
html body form:not(.sr)>label:has(textarea),html body form:not(.sr)>label:has(input[type=file]){grid-column:1/-1}
html body form:not(.sr)>:is(button,.btn):not(.s){grid-column:1/-1}
html body form:not(.sr)>:is(h2,h3,h4){margin:4px 0 0;padding:0 0 5px 10px;border-bottom:1px solid #e1ece5;border-left:4px solid #12519a;font-size:14px;color:#10285b}
html body form fieldset{border:1px solid #d9e4f4;border-radius:10px;padding:10px 12px 12px;background:#fbfdfb;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:8px 12px;min-width:0}
html body form fieldset>legend{padding:0 8px;font-weight:700;color:#10285b;font-size:13px}

/* Formulaires dans les cartes et fenêtres : cadre net, fond clair, bien aéré */
html body :is(.card,.djf-card)>form,html body :is(dialog,#dlg,.djf-create-dialog,.djf-global-dialog) form{padding:12px;border:1px solid #d9e4f4;border-radius:12px;background:linear-gradient(180deg,#fcfefc,#f5faf6)}
html body :is(dialog,#dlg,.djf-create-dialog,.djf-global-dialog){border-radius:14px}

/* Barres de filtres / recherche : mêmes champs, alignés */
html body form.sr,html body .toolbar,html body .filters,html body .djf-filters{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:flex-end}
html body :is(form.sr,.toolbar,.filters,.djf-filters)>:is(input,select){flex:1 1 160px;width:auto}

/* Boutons de formulaire : même hauteur que les champs */
html body form :is(button[type=submit],button.primary,input[type=submit]){height:var(--djf-field-h);min-height:var(--djf-field-h);padding:0 16px;font-size:13px;border-radius:var(--djf-field-r)}

/* Tableaux : champs en ligne aux mêmes proportions */
html body td :is(input:not([type=checkbox]):not([type=radio]),select){width:100%;min-width:70px}

/* Mobile : 1 colonne, police 16 px (évite le zoom automatique sur téléphone) */
@media(max-width:640px){:root{--djf-field-fs:16px;--djf-field-h:38px}html body form:not(.sr):not(.djf-no-compact),html body .djf-v152-grid,html body form fieldset{grid-template-columns:1fr!important}}

/* Inscription client (page d'accueil) : e-mail, identifiant et ville en pleine largeur pour lire les placeholders */
html body #signupForm .su-f:has(#suEmail){grid-column:1/-1}
html body #signupForm .su-f label{display:block;margin:0 0 3px;font-size:12px;font-weight:650;color:#1d4a37}
html body #signupForm .su-grid{gap:6px 10px}
html body #signupForm .su-f label{margin-bottom:2px}
html body #signupForm label:has(>input[type=checkbox]){align-items:flex-start}

/* Groupes de champs hors <form> (grille tarifaire, lignes « inline », blocs d'étiquettes) : colonnes égales, mêmes champs */
html body :is(.djf-inline,#tGrid),html body :is(div,section):has(>label+label):not(.djf-v152-grid):not(.su-grid){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:8px 10px;align-items:end;margin:6px 0}
html body .djf-inline>:is(input,select),html body .djf-inline>label>:is(input,select){width:100%}
html body .djf-inline>:is(button,.btn){height:var(--djf-field-h);min-height:var(--djf-field-h);padding:0 14px;font-size:13px;border-radius:var(--djf-field-r)}
html body select:not([multiple]){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
@media(max-width:640px){html body :is(.djf-inline,#tGrid),html body :is(div,section):has(>label+label):not(.su-grid){grid-template-columns:1fr}}

/* V186 : boutons des formulaires et cartes compacts, même hauteur que les champs */
html body :is(.card,form,dialog,#dlg,.djf-create-dialog,.djf-global-dialog) :is(button,.btn,a.btn):not(.adm-tab):not(.djf-burger):not([class*=lang]):not(.close):not(.x){min-height:var(--djf-field-h);padding:0 14px;font-size:13px;border-radius:var(--djf-field-r)}

/* V188 : formulaire « Créer un compte » très compact */
html body #signupForm{gap:6px!important}
html body #signupForm .su-grid{gap:6px 8px!important;margin:0!important}
html body #signupForm .su-f label{font-size:11.5px!important;margin-bottom:2px!important}
html body #signupForm :is(input:not([type=checkbox])){height:30px!important;min-height:30px!important;max-height:30px!important;font-size:12.5px!important;padding:0 8px!important;border-radius:7px!important}
html body #signupForm .djf-terms{margin:2px 0!important}
html body #signupForm label.suTerms{font-size:11.5px!important;line-height:1.3!important;padding:5px 8px!important;min-height:0!important;gap:7px!important;border-radius:7px!important}
html body #signupForm label.suTerms input{width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important}
html body #signupForm button{min-height:30px!important;height:30px!important;padding:0 12px!important;font-size:12.5px!important;border-radius:7px!important}
html body #signupForm .su-msg,html body #signupForm [id=suMsg]{font-size:11.5px!important;margin:0!important}
