/* Vocabulaire commun des fenêtres : rose Les Créatrices, corail et turquoise. */
:root {
    --popup-rose: #feefed;
    --popup-coral: #ff6b6b;
    --popup-green: #26766f;
    --popup-ink: #2d3436;
    --popup-muted: #62656a;
    --popup-line: #ecd9d5;
    --popup-danger: #b4473e;
}
html.lc-dialog-open, html.lc-legacy-open { overflow: hidden; scrollbar-gutter: stable; }
:root .lc-popup.lc-popup {
    box-sizing: border-box;
    border: 1px solid var(--popup-line);
    border-top: 3px solid var(--popup-coral);
    border-radius: 20px;
    background: #fff;
    color: var(--popup-ink);
    box-shadow: 0 24px 80px rgb(45 52 54 / 22%);
    font-family: Montserrat, sans-serif;
    line-height: 1.55;
    overscroll-behavior: contain;
    overflow-wrap: anywhere;
}
:root dialog.lc-popup::backdrop {
    background: rgb(45 52 54 / 48%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
:root .lc-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    padding: 24px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    align-content: center;
    background: rgb(45 52 54 / 48%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
:root .lc-popup-overlay > .lc-popup { margin: auto; max-width: 100%; }
:root .lc-popup :is(.modal-header, .pr-panelhead, .ec-drawer-head, .ec-ship-form > header) {
    padding: 22px 26px;
    gap: 18px;
    border-bottom: 1px solid var(--popup-line);
    background: var(--popup-rose);
}
:root .lc-popup :is(.modal-title, .modal-header h2, .pr-panelhead h2, .todo-dlg-title, .ec-drawer-head h2, .ec-ship-form > header h2) {
    margin: 0;
    color: var(--popup-ink);
    font: 600 clamp(20px, 2.3vw, 25px)/1.3 Montserrat, sans-serif;
    letter-spacing: -.025em;
    text-transform: none;
}
:root .lc-popup :is(.modal-body, .ec-drawer-body) { padding: 24px 26px; }
:root .lc-popup :is(.modal-footer, .pr-actions, .todo-dlg-actions, .delete-modal-actions, .ec-drawer-foot, .ec-ship-form > footer) {
    gap: 10px;
    padding: 18px 26px;
    border-top: 1px solid var(--popup-line);
    background: #fff8f6;
    box-shadow: none;
}
:root .lc-popup :is(.close-modal, .admincrea-modal-close, .dialog-close, .pr-close, .ec-drawer-close, .lc-popup-close, .btn-close) {
    box-sizing: border-box;
    display: inline-grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border: 1px solid var(--popup-line);
    border-radius: 50%;
    background-color: #fff;
    color: var(--popup-ink);
    font: 400 26px/1 Montserrat, sans-serif;
    cursor: pointer;
    opacity: 1;
    transform: none;
    transition: background-color 160ms, border-color 160ms;
}
:root .lc-popup :is(.close-modal, .admincrea-modal-close, .dialog-close, .pr-close, .ec-drawer-close, .lc-popup-close, .btn-close):hover {
    background-color: var(--popup-rose);
    border-color: #dba8a0;
    transform: none;
}
:root .lc-popup .btn-close { background-size: 14px; background-position: center; background-repeat: no-repeat; }
:root .lc-popup :is(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--popup-green); outline-offset: 3px; }
:root .lc-popup :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), select, textarea) {
    box-sizing: border-box;
    min-width: 0;
    border: 1px solid #d8c6c2;
    border-radius: 9px;
    background-color: #fff;
    color: var(--popup-ink);
    font-family: Montserrat, sans-serif;
}
:root .lc-popup :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), select) { min-height: 44px; }
:root .lc-popup :is(.btn, .admincrea-btn, .pr-button, .ec-btn, .login-btn, .lc-popup-btn) {
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 10px;
    font: 600 14px/1.4 Montserrat, sans-serif;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
    transform: none;
    box-shadow: none;
}
:root .lc-popup :is(.btn-primary, .admincrea-btn-primary, .pr-primary, .login-btn, .lc-popup-primary) {
    border: 1px solid var(--popup-coral);
    background: var(--popup-coral);
    color: #452422;
}
:root .lc-popup :is(.btn-primary, .admincrea-btn-primary, .pr-primary, .login-btn, .lc-popup-primary):hover { background: #ff8580; border-color: #ff8580; }
/* La feuille Prospection impose déjà la couleur du texte avec !important. */
:root .lc-popup .pr-primary { color: #452422 !important; }
:root .lc-popup :is(.btn-secondary, .admincrea-btn-secondary, .lc-popup-secondary) { border: 1px solid #d8c6c2; background: #fff; color: var(--popup-ink); }
:root .lc-popup :is(.btn-secondary, .admincrea-btn-secondary, .lc-popup-secondary):hover { background: var(--popup-rose); }
:root .lc-popup :is(.btn-danger, .admincrea-btn-danger, .ec-btn-danger-solid), :root .lc-message-danger .lc-popup-primary { background: var(--popup-danger); border-color: var(--popup-danger); color: #fff; }
:root .lc-popup :is(.btn-danger, .admincrea-btn-danger, .ec-btn-danger-solid):hover, :root .lc-message-danger .lc-popup-primary:hover { background: #973b33; border-color: #973b33; }
:root .lc-popup .ec-btn-green { background: var(--popup-green); border-color: var(--popup-green); color: #fff; }
:root .lc-popup .btn-info { border-color: var(--popup-green); background: var(--popup-green); color: #fff; }
:root .lc-popup button:disabled { opacity: .55; cursor: not-allowed; }

/* Les petits messages ont une lecture courte et une action explicite. */
:root dialog.lc-message { width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; }
.lc-message-form { position: relative; padding: 30px 28px 0; }
:root .lc-message-close { position: absolute; top: 14px; right: 14px; }
.lc-message-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; border-radius: 16px; background: #e9f4f1; color: var(--popup-green); }
.lc-message-icon svg { width: 28px; height: 28px; }
.lc-message-danger .lc-message-icon { background: var(--popup-rose); color: var(--popup-danger); }
.lc-message h2 { margin: 0 0 12px; color: var(--popup-ink); font: 600 23px/1.3 Montserrat, sans-serif; letter-spacing: -.025em; text-wrap: balance; }
.lc-message-text { margin: 0 0 24px; color: var(--popup-muted); font: 400 14px/1.75 Montserrat, sans-serif; white-space: pre-line; }
.lc-message-field { display: grid; gap: 8px; margin-bottom: 24px; font-size: 14px; font-weight: 600; }
.lc-message-field[hidden], .lc-message [hidden] { display: none; }
.lc-message-field input { width: 100%; padding: 12px; font-size: 16px; }
.lc-message-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin: 0 -28px; padding: 18px 28px; border-top: 1px solid var(--popup-line); background: #fff8f6; }
.lc-popup-btn { cursor: pointer; }
.lc-message-success { border-top-color: var(--popup-green) !important; }
:root .lc-message-success .lc-popup-primary { background: var(--popup-green); border-color: var(--popup-green); color: #fff; }
:root .lc-message-success .lc-popup-primary:hover { background: #205f59; border-color: #205f59; }

/* Fenêtres métiers : seules les surfaces sont communes, leurs dimensions restent adaptées. */
:root .lc-popup.ec-drawer { border-radius: 20px 0 0 20px; }
:root .lc-popup.ec-ship-dlg { overflow: auto; }
:root .lc-popup.ec-ship-dlg .ec-ship-close { top: 16px; right: 16px; }
:root .lc-popup.ec-ship-dlg .ec-ship-form > header { padding-right: 78px; }
:root .lc-popup.pr-dialog { padding: 0 26px; }
:root .lc-popup.pr-dialog .pr-panelhead { margin: 0 -26px 20px; }
:root .lc-popup.pr-dialog .pr-actions { margin: 20px -26px 0; }
:root .lc-popup :is(.pr-fields label, .todo-dlg-box label) { font-size: 13px; font-weight: 500; }
:root .lc-popup.todo-dlg { inset: 0; margin: auto; max-height: calc(100dvh - 32px); padding: 0; }
.lc-popup .todo-dlg-box { padding: 24px; }
.lc-popup .todo-dlg-title { padding-bottom: 18px; border-bottom: 1px solid var(--popup-line); }
:root .lc-popup .todo-dlg-actions { margin: 22px -24px -24px; }
:root .lc-popup.fm-dialog { inset: 0; margin: auto; width: min(860px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; }
:root .lc-popup.fm-dialog > header { padding: 20px; gap: 16px; background: var(--popup-rose); border-bottom: 1px solid var(--popup-line); }
:root .lc-popup.fm-dialog > header h2 { flex: 1; min-width: 0; margin: 0; font: 600 22px/1.3 Montserrat,sans-serif; text-wrap: balance; }
:root .lc-popup #fm-dialog-body { padding: 20px; }
:root .lc-popup.signup-dialog { border-top-color: var(--popup-coral); }
:root .lc-popup.signup-dialog .dialog-header { padding-bottom: 20px; border-bottom: 1px solid var(--popup-line); background: var(--popup-rose); }
:root .lc-popup.admincrea-modal-content { position: relative; width: 560px; padding: 26px; }
:root .lc-popup .admincrea-modal-close { position: absolute; top: 14px; right: 14px; }
.lc-popup.admincrea-modal-content > h2 { margin: 0 50px 24px 0; font: 600 23px/1.3 Montserrat,sans-serif; }
:root .lc-popup.delete-modal-content { width: 460px; padding: 28px 26px 0; text-align: left; }
.lc-popup.delete-modal-content h3 { margin: 0 0 16px; font: 600 23px/1.3 Montserrat,sans-serif; }
.lc-popup.delete-modal-content p { color: var(--popup-muted); line-height: 1.75; }
:root .lc-popup .delete-modal-actions { justify-content: flex-end; margin: 24px -26px 0; }
:root .lc-popup .admincrea-form-actions { gap: 10px; padding: 18px; border-top: 1px solid var(--popup-line); background: #fff8f6; }
:root #forgot-password-modal > .lc-popup { width: 520px; overflow: hidden; }
:root #forgot-password-modal .modal-header { display: flex; align-items: center; }
:root #forgot-password-modal .modal-header h2 { flex: 1; }
:root #forgot-password-modal .modal-body > p { margin: 0 0 22px; color: var(--popup-muted); font-size: 14px; }
:root #forgot-password-modal .reset-btn { width: 100%; }
:root .lc-popup-overlay#product-modal, :root .lc-popup-overlay#product-photos-modal { padding: 24px 16px; }
:root .ec-products-page .lc-popup .modal-footer { border-radius: 0 0 18px 18px; }
:root .ec-products-page .lc-popup.modal-content { overflow: clip; }
:root .modal-backdrop { background-color: var(--popup-ink); }
:root .modal-backdrop.show { opacity: .48; }

/* Retours brefs : même palette, sans interrompre la saisie. */
:root :is(.notification, .pr-toast, .todo-toast, .ec-apercu-toast) {
    box-sizing: border-box;
    max-width: min(440px, calc(100vw - 32px));
    padding: 14px 18px;
    border: 1px solid #bcd9d3;
    border-radius: 12px;
    background: #edf7f4;
    color: #205f59;
    box-shadow: 0 8px 30px rgb(45 52 54 / 14%);
    font: 500 14px/1.6 Montserrat, sans-serif;
    overflow-wrap: anywhere;
}
:root .notification { position: fixed; top: 20px; right: 16px; z-index: 1100; }
:root .notification-error { border-color: #e8b9b1; background: var(--popup-rose); color: #973b33; }

@media (prefers-reduced-motion: reduce) {
    :root .lc-popup, :root .lc-popup *, :root .lc-popup-overlay { animation: none !important; transition: none !important; }
}

@media (prefers-reduced-motion: no-preference) {
    dialog.lc-message[open] { animation: lc-popup-in 180ms ease-out; }
    @keyframes lc-popup-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 600px) {
    :root .lc-popup.lc-popup { border-radius: 16px; }
    :root .lc-popup-overlay { padding: 12px; }
    :root .lc-popup :is(.modal-header, .pr-panelhead, .ec-drawer-head, .ec-ship-form > header, .modal-body, .ec-drawer-body) { padding: 18px; }
    :root .lc-popup :is(.modal-footer, .ec-drawer-foot, .ec-ship-form > footer) { padding: 16px 18px; }
    :root .lc-popup.ec-drawer { border-radius: 0; }
    :root .lc-popup.pr-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); padding: 0 18px; }
    :root .lc-popup.pr-dialog .pr-panelhead { margin: 0 -18px 18px; }
    :root .lc-popup.pr-dialog .pr-actions { margin: 18px -18px 0; padding: 16px 18px; }
    :root .lc-popup.todo-dlg { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
    :root .lc-popup .todo-dlg-actions { display: flex; flex-wrap: wrap; }
    :root .lc-popup .todo-dlg-actions > span { display: none; }
    :root .lc-popup .todo-dlg-actions > button { flex: 1; padding-inline: 12px; }
    :root .lc-popup.ec-ship-dlg { width: calc(100% - 20px); height: auto; max-height: calc(100dvh - 20px); }
    :root .lc-popup.ec-ship-dlg .ec-ship-form { height: auto; }
    :root .lc-popup.admincrea-modal-content { padding: 22px 18px; }
    :root .lc-popup-overlay#product-modal, :root .lc-popup-overlay#product-photos-modal { padding: 10px; }
    :root .ec-products-page .lc-popup.modal-content { min-height: 0; margin-bottom: 0; }
    :root .ec-products-page .lc-popup .modal-footer { padding-inline: 14px; gap: 8px; }
    :root .ec-products-page .lc-popup .modal-footer button { padding-inline: 12px; gap: 6px; font-size: 13px; }
    :root .ec-products-page .lc-popup .submit-btn span { white-space: nowrap; }
    :root .lc-popup :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 16px; }
}
@media (max-width: 360px) {
    .lc-message-form { padding: 24px 20px 0; }
    .lc-message h2 { font-size: 21px; }
    .lc-message-actions { margin: 0 -20px; padding: 16px 20px; }
    .lc-message-actions button { flex: 1; }
}
