/* ============================================================
   forms.css — Styles génériques pour tous les formulaires EVO
   Scope : .evo-form (modal ou page entière)
   Usage : ajouter class="evo-form" sur le conteneur du formulaire
   ============================================================ */

/* ── Marges CakePHP / Bootstrap ─────────────────────────────── */
.evo-form .form-group { margin-bottom: 0.9rem; }
.evo-form .form-group:last-child { margin-bottom: 0; }
.evo-form .input { margin-bottom: 0.9rem; }
.evo-form .row { margin-top: 0 !important; }
.evo-form .pa-section { margin-bottom: 1.25rem; }

/* ── Labels ─────────────────────────────────────────────────── */
.evo-form label { font-size: 0.88rem; font-weight: 400; color: #333; margin-bottom: 0.3rem; display: block; }

/* ── Inputs, selects, textareas ─────────────────────────────── */
.evo-form .form-control { border: 1px solid #ccc; border-radius: 4px; font-size: 0.95rem; color: #222; padding: 0.5rem 0.75rem; height: auto; background: #fff; transition: border-color 0.15s; width: 100%; }
.evo-form .form-control:focus { border-color: var(--orange-evo); box-shadow: none; outline: none; }
.evo-form select.form-control { cursor: pointer; }
.evo-form textarea.form-control { min-height: 120px; resize: vertical; }

/* ── Champ avec unité (ex: prix + €) ────────────────────────── */
.evo-form .pa-prix-wrap { display: flex; align-items: center; gap: 0.4rem; }
.evo-form .pa-prix-wrap .form-control { max-width: 120px; }
.evo-form .pa-currency { font-size: 0.95rem; color: #aaa; }

/* ── Checkboxes multiples (CakePHP) ─────────────────────────── */
/* Surcharge Bootstrap 4 .form-check dans le contexte evo-form */
.evo-form .pa-checkboxes .input.select { display: flex !important; flex-wrap: wrap !important; gap: 0.4rem 1.25rem !important; align-items: center !important; padding: 0 !important; }
.evo-form .pa-checkboxes .checkbox { margin: 0 !important; display: inline-flex !important; min-height: 0 !important; padding: 0 !important; }
.evo-form .pa-checkboxes .checkbox label { display: inline-flex !important; align-items: center !important; gap: 0.35rem !important; white-space: nowrap !important; font-size: 0.88rem !important; font-weight: 400 !important; text-transform: none !important; letter-spacing: 0 !important; color: #333 !important; cursor: pointer !important; margin: 0 !important; line-height: 1 !important; padding: 0 !important; float: none !important; }
.evo-form .pa-checkboxes .checkbox input[type="checkbox"] { accent-color: var(--orange-evo); width: 14px !important; height: 14px !important; flex-shrink: 0 !important; cursor: pointer !important; margin: 0 !important; float: none !important; position: static !important; }

/* ── Titres de section images ───────────────────────────────── */
.evo-form .pa-img-label { font-size: 0.88rem; font-weight: 400; color: #333; margin-bottom: 0.5rem; text-transform: uppercase; }

/* ── Grille miniatures ──────────────────────────────────────── */
.evo-form .pa-img-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.evo-form .pa-img-item { position: relative; width: 120px; }
.evo-form .pa-img-item img { width: 120px !important; height: 88px !important; object-fit: cover !important; border-radius: 4px !important; display: block !important; border: 1px solid #eee !important; transition: border-color 0.15s; max-width: none !important; }
.evo-form .pa-img-item img:hover { border-color: var(--orange-evo); }
.evo-form .pa-img-caption { font-size: 0.72rem; color: #999; margin-top: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evo-form .pa-img-delete { position: absolute; top: 3px; right: 3px; }

/* ── Dropzone ───────────────────────────────────────────────── */
.evo-form #dragandrophandler { border: 1.5px dashed #ccc; border-radius: 4px; padding: 1.25rem 1rem; text-align: center; background: #fafafa; cursor: pointer; transition: border-color 0.15s; }
.evo-form #dragandrophandler:hover { border-color: var(--orange-evo); }
.evo-form .input_image_click { font-size: 0.9rem; color: #999; }
.evo-form .notes_dropzone { display: block; font-size: 0.78rem; color: #bbb; line-height: 1.6; font-style: italic; }

/* ── Footer boutons ─────────────────────────────────────────── */
.evo-form .pa-form-footer { display: flex; justify-content: flex-end; align-items: center; gap: 0.75rem; padding: 1rem 0; border-top: 1px solid #eee; margin-top: 1.25rem; }
.evo-form .pa-btn-retour { font-size: 0.85rem; font-weight: 600; color: #aaa; text-decoration: none; padding: 0.4rem 0.5rem; transition: color 0.15s; }
.evo-form .pa-btn-retour:hover { color: #555; text-decoration: none; }
.evo-form .pa-btn-valider { background: var(--orange-evo); border: none; border-radius: 4px; color: #fff; font-size: 0.88rem; font-weight: 600; padding: 0.55rem 1.75rem; cursor: pointer; transition: opacity 0.15s; }
.evo-form .pa-btn-valider:hover { opacity: 0.88; }

/* ── Page entière ───────────────────────────────────────────── */
.evo-form-page { max-width: 900px; margin: 2rem auto; background: #fff; border-radius: 6px; padding: 2rem; box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.evo-form-page .evo-form-title { font-size: 1.5rem; font-weight: 400; color: #222; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid var(--orange-evo); }

@media (max-width: 576px) {
    .evo-form-page { padding: 1.25rem; }
}

/* ── Summernote WYSIWYG — toolbar accent orange EVO ─────────── */
.note-editor.note-frame { border: 1px solid #e2e2e2 !important; border-radius: 8px !important; overflow: hidden !important; }
.note-editor .note-toolbar { background: #fff !important; border-bottom: 1px solid #e2e2e2 !important; border-top: 3px solid #ff9201 !important; padding: 4px 8px !important; }
.note-editor .note-toolbar .btn { background: none !important; border: none !important; border-radius: 4px !important; color: #444 !important; font-weight: 600 !important; padding: 6px 9px !important; box-shadow: none !important; transition: background 0.15s, color 0.15s !important; }
.note-editor .note-toolbar .btn:hover,
.note-editor .note-toolbar .btn:focus,
.note-editor .note-toolbar .btn.active { background: #fff5e8 !important; color: #cc7400 !important; box-shadow: none !important; border: none !important; }
.note-editor .note-toolbar .btn-group + .btn-group { border-left: 1px solid #eee !important; padding-left: 2px !important; margin-left: 2px !important; }
.note-editor .note-editable { padding: 12px 14px !important; font-size: 14px !important; min-height: 180px !important; }
.note-editor .note-statusbar { background: #fff8f0 !important; border-top: 1px solid #ffe0b2 !important; }
.note-editor .note-statusbar .note-resizebar .note-icon-bar { border-top-color: #ff9201 !important; }
/* ── Modal header orange ─────────────────────────────────────── */
.evo-form-modal .modal-content { border: none; border-radius: 6px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.evo-form-modal .modal-header { padding: 1.5rem 2rem 1.2rem; border-bottom: 2px solid var(--orange-evo); background: #fff; }
.evo-form-modal .modal-header hr { display: none; }
.evo-form-modal .modal-title { font-size: 1.5rem; font-weight: 400; color: #222; margin: 0; }
.evo-form-modal .close { font-size: 1.4rem; color: #bbb; opacity: 1; }
.evo-form-modal .close:hover { color: var(--orange-evo); }
.evo-form-modal .modal-body { padding: 1.75rem 2rem 2rem; background: #fff; }

/* ── Dropzone ───────────────────────────────────────────────── */
.evo-form-modal #dragandrophandler { border: 1.5px dashed #ccc; border-radius: 4px; padding: 1.25rem 1rem; text-align: center; background: #fafafa; cursor: pointer; transition: border-color 0.15s; }
.evo-form-modal #dragandrophandler:hover { border-color: var(--orange-evo); }
.evo-form-modal .input_image_click { font-size: 0.9rem; color: #999; }
.evo-form-modal .notes_dropzone { display: block; font-size: 0.78rem; color: #bbb; line-height: 1.6; font-style: italic; }