/* entreprise/scripts/entreprise.css — apparence de l'espace vendeur Santos Signature
   Chargé par pages/dashboard.php, pages/login.php, pages/register.php et pages/conditions.php.

   Idée directrice : l'arrière-boutique d'un artisan. Un bandeau sombre éclairé comme par une lampe
   (le métier de la maison : la décoration et l'éclairage), des titres dans une capitale romaine qui
   rappelle le logo, et des surfaces calmes en papier clair pour le travail. */

:root {
    --ev-ink: #1a1a1a;
    --ev-ink-2: #2a251f;
    --ev-brass: #d4af37;
    --ev-brass-deep: #8a6d12;
    --ev-copper: #9a5a2b;
    --ev-paper: #EFE6D8;
    --ev-paper-2: #FAF6EF;
    --ev-surface: #ffffff;
    --ev-line: #E6DFD3;
    --ev-line-strong: #B9AE9C;
    --ev-muted: #5F574C;
    --ev-soft: #4A4339;
    --ev-red: #A3211A;
    --ev-green: #1D6A39;
    --ev-blue: #1F5A8A;

    --ev-display: 'Marcellus', 'Cormorant Garamond', Georgia, serif;
    --ev-text: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --ev-r-panel: 18px;
    --ev-r-control: 10px;

    /* Bootstrap */
    --bs-body-font-family: var(--ev-text);
    --bs-body-color: #1a1a1a;
    --bs-body-bg: #F6F1E9;
    --bs-border-color: #E6DFD3;
    --bs-link-color: #1a1a1a;
    --bs-link-color-rgb: 26, 26, 26;
    --bs-link-hover-color: #8a6d12;
    --bs-link-hover-color-rgb: 138, 109, 18;
    --bs-primary: #1a1a1a;
    --bs-primary-rgb: 26, 26, 26;
    --bs-secondary-color: #5F574C;
}

html, body {
    min-height: 100vh;
    margin: 0;
}

body.ev {
    background: var(--ev-paper) !important;
    color: var(--ev-ink);
    font-family: var(--ev-text);
    font-size: 0.98rem;
    line-height: 1.55;
}

.ev-wrap {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 28px;
    padding-right: 28px;
}

.ev :focus-visible {
    outline: 3px solid var(--ev-brass);
    outline-offset: 2px;
}

/* ==========================================================================
   L'ENSEIGNE : barre du haut
   ========================================================================== */
.ev-top {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--ev-ink);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.ev-top-in {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 68px;
}

.ev-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    min-width: 0;
    color: #ffffff;
    text-decoration: none;
}

.ev-brand img {
    flex: 0 0 auto;
    width: 46px;
    height: auto;
}

.ev-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.ev-brand-text strong {
    max-width: 340px;
    white-space: normal;
    overflow-wrap: normal;
    word-break: keep-all;
    font-family: var(--ev-display);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.ev-brand-text small {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ev-brass);
    white-space: nowrap;
}

.ev-brand:hover {
    color: #ffffff;
}

.ev-tabs {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 4px 6px;
    flex-wrap: wrap;
    min-width: 0;
    align-self: center;
    padding: 10px 0;
}

.ev-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    color: #CFC7BA;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.ev-tab i {
    font-size: 0.9rem;
    color: #8F877A;
    transition: color 0.15s ease;
}

.ev-tab::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--ev-brass);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.18s ease;
}

.ev-tab:hover {
    color: #ffffff;
}

.ev-tab:hover i,
.ev-tab.is-active i {
    color: var(--ev-brass);
}

.ev-tab.is-active {
    color: #ffffff;
    font-weight: 800;
}

.ev-tab.is-active::after {
    transform: scaleX(1);
}

.ev-top-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ev-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--ev-brass);
    color: var(--ev-ink);
    font-weight: 800;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.ev-add:hover,
.ev-add.is-active {
    background: #e6c85f;
    color: var(--ev-ink);
}

.ev-icon-link {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #EDE6DA;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ev-icon-link:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--ev-ink);
}

/* ==========================================================================
   LE BANDEAU ÉCLAIRÉ : bonjour + titre de la page
   ========================================================================== */
.ev-band {
    position: relative;
    background: var(--ev-ink);
    color: #ffffff;
    overflow: hidden;
    isolation: isolate;
}

/* La lumière : un halo chaud qui tombe d'en haut à gauche, un reflet cuivré en bas à droite */
.ev-band::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(52% 150% at 10% -40%, rgba(212, 175, 55, 0.46) 0%, rgba(212, 175, 55, 0.16) 40%, rgba(212, 175, 55, 0) 72%),
        radial-gradient(36% 130% at 92% 140%, rgba(154, 90, 43, 0.42) 0%, rgba(154, 90, 43, 0) 70%);
}

/* Le filet de laiton sous le bandeau */
.ev-band::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0) 0%, var(--ev-brass) 18%, var(--ev-brass) 82%, rgba(212, 175, 55, 0) 100%);
}

.ev-band-in {
    padding-top: 34px;
    padding-bottom: 38px;
}

.ev-hello {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #E9DFC6;
}

.ev-title {
    margin: 0;
    font-family: var(--ev-display);
    font-size: clamp(2rem, 4.2vw, 3.1rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: 0.005em;
    color: #ffffff;
}

.ev-lead {
    max-width: 62ch;
    margin: 12px 0 0;
    font-size: 1rem;
    color: #D8D0C3;
}

/* ==========================================================================
   LE PLAN DE TRAVAIL : contenu
   ========================================================================== */
.ev-main {
    padding-top: 30px;
    padding-bottom: 56px;
}

.ev-main > .container,
.ev-main > .container-fluid,
.ev-main .container.py-4,
.ev-main .container.my-5,
.ev-main .container-fluid.px-4 {
    max-width: none;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.ev-main .container[style*="max-width"] {
    margin-left: 0;
}

/* Titres dans les pages */
.ev-main h2,
.ev-main h3.ev-h {
    font-family: var(--ev-display);
    font-weight: 400;
    font-size: 1.55rem;
    line-height: 1.2;
    color: var(--ev-ink);
}

.ev-main h5,
.ev-main h6 {
    font-weight: 800;
}

/* Le titre de chaque page est déjà dans le bandeau : on ne le répète pas */
.ev-main .ev-dup {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Cartes --- */
.ev .card {
    --bs-card-border-color: var(--ev-line);
    --bs-card-border-radius: var(--ev-r-panel);
    --bs-card-inner-border-radius: calc(var(--ev-r-panel) - 1px);
    --bs-card-cap-bg: transparent;
    --bs-card-bg: #ffffff;
    border: 1px solid var(--ev-line) !important;
    border-radius: var(--ev-r-panel) !important;
    box-shadow: none !important;
    overflow: hidden;
}

.ev .card-header {
    padding: 16px 22px;
    background: transparent !important;
    border-bottom: 1px solid var(--ev-line);
    font-weight: 800;
    color: var(--ev-ink);
}

.ev .card-header i {
    color: var(--ev-brass-deep) !important;
}

.ev .card.bg-light {
    background: var(--ev-paper-2) !important;
}

/* --- Tableaux --- */
.ev .table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--ev-line);
    --bs-table-hover-bg: var(--ev-paper-2);
    --bs-table-color: var(--ev-ink);
    margin-bottom: 0;
}

.ev .table > thead > tr > th {
    padding: 14px 16px;
    background: transparent !important;
    border-bottom: 1px solid var(--ev-line-strong);
    color: var(--ev-muted) !important;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.ev .table > tbody > tr > td {
    padding: 14px 16px;
    border-color: var(--ev-line);
    vertical-align: middle;
}

.ev .table > tbody > tr:last-child > td {
    border-bottom: 0;
}

/* --- Boutons --- */
.ev .btn {
    --bs-btn-border-radius: var(--ev-r-control);
    --bs-btn-font-weight: 700;
    border-radius: var(--ev-r-control);
    font-weight: 700;
    white-space: nowrap;
}

.ev .btn-sm {
    --bs-btn-border-radius: 8px;
    border-radius: 8px;
    min-height: 36px;
}

.ev .btn-lg {
    min-height: 54px;
    font-size: 1.05rem;
}

.ev .btn-primary,
.ev .btn-success,
.ev .btn-warning {
    --bs-btn-color: var(--ev-ink);
    --bs-btn-bg: var(--ev-brass);
    --bs-btn-border-color: var(--ev-brass);
    --bs-btn-hover-color: var(--ev-ink);
    --bs-btn-hover-bg: #e6c85f;
    --bs-btn-hover-border-color: #e6c85f;
    --bs-btn-active-color: var(--ev-ink);
    --bs-btn-active-bg: #c9a42f;
    --bs-btn-active-border-color: #c9a42f;
    --bs-btn-disabled-color: var(--ev-soft);
    --bs-btn-disabled-bg: #D9D2C5;
    --bs-btn-disabled-border-color: #D9D2C5;
    --bs-btn-focus-shadow-rgb: 212, 175, 55;
}

.ev .btn-dark {
    --bs-btn-bg: var(--ev-ink);
    --bs-btn-border-color: var(--ev-ink);
    --bs-btn-hover-bg: #3a332b;
    --bs-btn-hover-border-color: #3a332b;
}

.ev .btn-outline-primary,
.ev .btn-outline-dark,
.ev .btn-outline-success,
.ev .btn-outline-secondary {
    --bs-btn-color: var(--ev-ink);
    --bs-btn-border-color: var(--ev-line-strong);
    --bs-btn-bg: #ffffff;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: var(--ev-ink);
    --bs-btn-hover-border-color: var(--ev-ink);
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: var(--ev-ink);
    --bs-btn-active-border-color: var(--ev-ink);
}

.ev .btn-outline-danger {
    --bs-btn-color: var(--ev-red);
    --bs-btn-border-color: #E3BDB9;
    --bs-btn-bg: #ffffff;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: var(--ev-red);
    --bs-btn-hover-border-color: var(--ev-red);
    --bs-btn-active-bg: var(--ev-red);
    --bs-btn-active-border-color: var(--ev-red);
}

.ev .btn-secondary {
    --bs-btn-color: var(--ev-ink);
    --bs-btn-bg: #EEE8DD;
    --bs-btn-border-color: #EEE8DD;
    --bs-btn-hover-color: var(--ev-ink);
    --bs-btn-hover-bg: #E0D8C9;
    --bs-btn-hover-border-color: #E0D8C9;
}

/* --- Étiquettes --- */
.ev .badge {
    padding: 0.5em 0.8em;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
}

.ev .badge.bg-secondary,
.ev .badge.bg-light {
    background: #EEE8DD !important;
    color: var(--ev-soft) !important;
    border-color: transparent !important;
}

.ev .badge.bg-success {
    background: #DCEFE2 !important;
    color: #175A30 !important;
}

.ev .badge.bg-warning {
    background: #FBEFC9 !important;
    color: #6B5200 !important;
}

.ev .badge.bg-danger {
    background: #F7DEDB !important;
    color: #8A1C16 !important;
}

.ev .badge.bg-info,
.ev .badge.bg-primary {
    background: #DDEAF5 !important;
    color: #1A4A72 !important;
}

.ev .badge.bg-dark {
    background: var(--ev-ink) !important;
    color: #ffffff !important;
}

/* --- Couleurs de texte --- */
.ev .text-primary { color: var(--ev-brass-deep) !important; }
.ev .text-success { color: var(--ev-green) !important; }
.ev .text-danger { color: var(--ev-red) !important; }
.ev .text-muted { color: var(--ev-muted) !important; }
.ev .text-secondary { color: var(--ev-soft) !important; }
.ev .bg-light { background-color: var(--ev-paper-2) !important; }

/* --- Messages --- */
.ev .alert {
    border-radius: 14px;
    border-width: 1px;
    font-weight: 600;
}

.ev .alert-success { --bs-alert-bg: #EAF4EC; --bs-alert-border-color: #B5D6BD; --bs-alert-color: #175A30; }
.ev .alert-danger { --bs-alert-bg: #FBECEA; --bs-alert-border-color: #E9BFBA; --bs-alert-color: #8A1C16; }
.ev .alert-warning { --bs-alert-bg: #FFF4D6; --bs-alert-border-color: #E3C566; --bs-alert-color: #5C4700; }
.ev .alert-info { --bs-alert-bg: #E9F1F8; --bs-alert-border-color: #B9D0E4; --bs-alert-color: #1A4A72; }

/* --- Formulaires --- */
.ev .form-label {
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 0.93rem;
}

.ev .form-control,
.ev .form-select {
    min-height: 46px;
    background-color: #ffffff !important;
    border: 1px solid #8F8676 !important;
    border-radius: var(--ev-r-control);
    color: var(--ev-ink) !important;
    font-weight: 500;
    box-shadow: none;
}

.ev .form-control-sm,
.ev .form-select-sm {
    min-height: 38px;
    border-radius: 8px;
}

.ev textarea.form-control {
    min-height: 100px;
}

.ev .form-control:focus,
.ev .form-select:focus {
    border-color: var(--ev-ink) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.45) !important;
}

.ev .form-control:disabled,
.ev .form-control[readonly] {
    background-color: #F1EBE1 !important;
    border-color: var(--ev-line-strong) !important;
    color: var(--ev-soft) !important;
}

.ev .form-check-input {
    border: 1px solid #8F8676;
}

.ev .form-check-input:checked {
    background-color: var(--ev-ink);
    border-color: var(--ev-ink);
}

.ev .form-range::-webkit-slider-thumb { background: var(--ev-ink); }
.ev .form-range::-moz-range-thumb { background: var(--ev-ink); }

/* --- Fenêtres --- */
.ev .modal-content {
    border: 0;
    border-radius: 20px;
    overflow: hidden;
}

.ev .modal-header,
.ev .modal-header.bg-dark {
    padding: 18px 24px;
    background: var(--ev-ink) !important;
    color: #ffffff;
    border-bottom: 2px solid var(--ev-brass);
}

.ev .modal-header .modal-title {
    font-family: var(--ev-display);
    font-weight: 400 !important;
    font-size: 1.3rem;
}

.ev .modal-body {
    padding: 22px 24px;
}

.ev .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--ev-line);
    background: var(--ev-paper-2);
}

/* ==========================================================================
   MES PRODUITS
   ========================================================================== */
.ev-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    margin-bottom: 18px;
}

/* Filtres : chaque pastille compte les produits et sert à filtrer la liste */
.ev-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ev-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 6px 0 16px;
    border: 1px solid var(--ev-line-strong);
    border-radius: 999px;
    background: #ffffff;
    color: var(--ev-ink);
    font-weight: 700;
    font-size: 0.92rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ev-filter b {
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #EEE8DD;
    color: var(--ev-soft);
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.ev-filter:hover {
    border-color: var(--ev-ink);
}

.ev-filter[aria-pressed="true"] {
    background: var(--ev-ink);
    border-color: var(--ev-ink);
    color: #ffffff;
}

.ev-filter[aria-pressed="true"] b {
    background: var(--ev-brass);
    color: var(--ev-ink);
}

.ev-search {
    position: relative;
    flex: 0 1 320px;
}

.ev-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ev-muted);
    pointer-events: none;
}

.ev-search .form-control {
    padding-left: 42px;
    border-radius: 999px;
}

.ev-count {
    margin: 0 0 10px 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ev-muted);
}

.ev-products .ev-col-img {
    width: 80px;
    padding-right: 0 !important;
}

.ev-products .ev-col-img img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--ev-line);
    background: #F1EBE1;
}

.ev-products .ev-col-name {
    min-width: 190px;
}

.ev-product-name {
    font-weight: 700;
    line-height: 1.3;
    color: var(--ev-ink);
    text-decoration: none;
}

.ev-product-name:hover {
    color: var(--ev-brass-deep);
    text-decoration: underline;
}

.ev-product-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-top: 3px;
    font-size: 0.84rem;
    color: var(--ev-muted);
}

.ev-products tr[hidden] {
    display: none !important;
}

.ev-icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--ev-line-strong);
    border-radius: 10px;
    background: #ffffff;
    color: var(--ev-ink);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ev-icon-btn:hover {
    background: var(--ev-ink);
    border-color: var(--ev-ink);
    color: #ffffff;
}

.ev-icon-btn.is-danger {
    border-color: #E3BDB9;
    color: var(--ev-red);
}

.ev-icon-btn.is-danger:hover {
    background: var(--ev-red);
    border-color: var(--ev-red);
    color: #ffffff;
}

/* Rien à afficher : une invitation à agir */
.ev-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 56px 24px;
    text-align: center;
}

.ev-empty > i {
    font-size: 2.4rem;
    color: var(--ev-line-strong);
}

.ev-empty p {
    max-width: 46ch;
    margin: 0;
    color: var(--ev-muted);
    font-weight: 600;
}

.ev-show-1250 {
    display: none;
}

@media (min-width: 1250px) {
    .ev-show-1250 {
        display: table-cell;
    }
}

/* ==========================================================================
   COMMANDES
   ========================================================================== */
.ev-order {
    margin-bottom: 20px;
}

.ev .ev-order .card {
    border-width: 1px !important;
}

.ev-order .card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 16px 24px;
    background: var(--ev-paper-2) !important;
}

.ev-order-date {
    display: inline-block;
    margin-left: 14px;
    white-space: nowrap;
}

.ev-order-num {
    font-family: var(--ev-display);
    font-size: 1.3rem;
    color: var(--ev-ink) !important;
}

.ev-order .card-body {
    padding: 22px 24px !important;
}

.ev-order h6 {
    margin-bottom: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ev-muted) !important;
    text-transform: none !important;
}

.ev-order .border-end {
    border-color: var(--ev-line) !important;
}

.ev-order img.rounded {
    border-radius: 10px !important;
    border-color: var(--ev-line) !important;
    background: #F1EBE1;
}

.ev-order-total {
    font-family: var(--ev-display);
    font-size: 1.5rem;
    color: var(--ev-ink) !important;
}

/* ==========================================================================
   LITIGES : fil de discussion
   ========================================================================== */
.ev .admin-chat-container {
    max-height: 320px;
    background: var(--ev-paper-2);
    border-color: var(--ev-line);
    border-radius: 14px;
}

.ev .admin-chat-bubble {
    border-radius: 14px;
}

.ev .admin-chat-bubble.client {
    background-color: #ffffff;
    border: 1px solid var(--ev-line);
    color: var(--ev-ink);
    border-bottom-left-radius: 4px;
}

.ev .admin-chat-bubble.admin {
    background-color: var(--ev-ink);
    color: #ffffff;
    text-align: left;
    border-bottom-right-radius: 4px;
}

/* ==========================================================================
   STATISTIQUES
   ========================================================================== */
.ev-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-r-panel);
    overflow: hidden;
}

.ev-kpi {
    padding: 22px 24px;
    border-left: 1px solid var(--ev-line);
}

.ev-kpi:first-child {
    border-left: 0;
}

.ev-kpi-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ev-muted);
}

.ev-kpi-value {
    display: block;
    font-family: var(--ev-display);
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    line-height: 1.1;
    color: var(--ev-ink);
    white-space: nowrap;
}

.ev-kpi.is-main {
    background: var(--ev-ink);
}

.ev-kpi.is-main .ev-kpi-label {
    color: #D8D0C3;
}

.ev-kpi.is-main .ev-kpi-value {
    color: var(--ev-brass);
}

/* ==========================================================================
   FORMULAIRES PRODUIT
   ========================================================================== */
.ev .preview-box {
    border-color: var(--ev-line-strong);
    border-radius: 14px;
    background-color: var(--ev-paper-2);
}

.ev .card.border-warning {
    border-color: #E3C566 !important;
}

.ev-main form.card {
    padding: 28px !important;
}

/* ==========================================================================
   CONNEXION ET INSCRIPTION
   ========================================================================== */
body.ev-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    background: var(--ev-paper) !important;
}

.ev-auth-side {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 48px 56px;
    background: var(--ev-ink);
    color: #ffffff;
    overflow: hidden;
    isolation: isolate;
}

@media (min-width: 900px) {
    .ev-auth-side {
        position: sticky;
        top: 0;
        align-self: start;
        height: 100vh;
        min-height: 560px;
    }
}

.ev-auth-side::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(80% 60% at 18% -8%, rgba(212, 175, 55, 0.5) 0%, rgba(212, 175, 55, 0.16) 42%, rgba(212, 175, 55, 0) 74%),
        radial-gradient(70% 50% at 100% 108%, rgba(154, 90, 43, 0.45) 0%, rgba(154, 90, 43, 0) 70%);
}

.ev-auth-side::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0) 0%, var(--ev-brass) 22%, var(--ev-brass) 78%, rgba(212, 175, 55, 0) 100%);
}

.ev-auth-logo {
    width: 124px;
    height: auto;
}

.ev-auth-side h1 {
    margin: 0 0 16px;
    font-family: var(--ev-display);
    font-size: clamp(2.2rem, 3.6vw, 3.3rem);
    font-weight: 400;
    line-height: 1.08;
}

.ev-auth-side p {
    max-width: 38ch;
    margin: 0;
    font-size: 1.05rem;
    color: #D8D0C3;
}

.ev-auth-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.ev-auth-points li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    color: #EDE6DA;
}

.ev-auth-points i {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.55);
    border-radius: 50%;
    color: var(--ev-brass);
}

.ev-auth-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
}

.ev-auth-form {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.ev-auth-form.is-wide {
    max-width: 720px;
}

.ev-auth-form h2 {
    margin: 0 0 6px;
    font-family: var(--ev-display);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.15;
}

.ev-auth-sub {
    margin: 0 0 26px;
    color: var(--ev-muted);
}

.ev-auth-form .btn-primary {
    min-height: 52px;
    font-size: 1.03rem;
}

.ev-auth-alt {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--ev-line);
    color: var(--ev-muted);
}

.ev-auth-alt a {
    color: var(--ev-ink);
    font-weight: 800;
    text-decoration: underline;
}

.ev-auth-alt a:hover {
    color: var(--ev-brass-deep);
}

.ev-fieldset {
    margin: 0 0 22px;
    padding: 22px 22px 6px;
    background: #ffffff;
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-r-panel);
}

.ev-fieldset legend {
    float: none;
    width: auto;
    margin: 0 0 14px;
    padding: 0;
    font-family: var(--ev-display);
    font-size: 1.25rem;
    color: var(--ev-ink);
}

.ev-req {
    color: var(--ev-red);
    font-weight: 800;
}

/* ==========================================================================
   BARRE DU BAS (téléphone)
   ========================================================================== */
.ev-bottom {
    display: none;
}

@media (max-width: 1099.98px) {
    .ev-tab {
        padding: 0 10px;
    }

    .ev-tab i {
        display: none;
    }

    .ev-add span {
        display: none;
    }

    .ev-add {
        width: 42px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 899.98px) {
    body.ev-auth {
        grid-template-columns: minmax(0, 1fr);
    }

    .ev-auth-side {
        padding: 30px 24px 34px;
        gap: 22px;
    }

    .ev-auth-side::after {
        top: auto;
        left: 0;
        width: auto;
        height: 2px;
        background: linear-gradient(90deg, rgba(212, 175, 55, 0) 0%, var(--ev-brass) 18%, var(--ev-brass) 82%, rgba(212, 175, 55, 0) 100%);
    }

    .ev-auth-logo {
        width: 84px;
    }

    .ev-auth-points {
        display: none;
    }

    .ev-auth-main {
        padding: 30px 20px 44px;
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .ev-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ev-top {
        position: static;
    }

    .ev-top-in {
        min-height: 60px;
        gap: 12px;
    }

    .ev-tabs,
    .ev-add {
        display: none;
    }

    .ev-top-actions {
        margin-left: auto;
    }

    .ev-brand img {
        width: 40px;
    }

    .ev-brand-text strong {
        max-width: 60vw;
        font-size: 1.08rem;
    }

    .ev-band-in {
        padding-top: 24px;
        padding-bottom: 28px;
    }

    .ev-main {
        padding-top: 20px;
        padding-bottom: 104px;   /* la place de la barre du bas */
    }

    .ev-bottom {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: end;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
        background: var(--ev-ink);
        border-top: 2px solid var(--ev-brass);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.22);
    }

    .ev-bottom a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 54px;
        border-radius: 12px;
        color: #CFC7BA;
        font-size: 0.72rem;
        font-weight: 700;
        text-decoration: none;
    }

    .ev-bottom a i {
        font-size: 1.1rem;
        color: #8F877A;
    }

    .ev-bottom a.is-active {
        color: #ffffff;
    }

    .ev-bottom a.is-active i {
        color: var(--ev-brass);
    }

    /* Le bouton du milieu : ajouter un produit */
    .ev-bottom a.ev-bottom-add i {
        width: 46px;
        height: 46px;
        margin-top: -22px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        border: 3px solid var(--ev-ink);
        background: var(--ev-brass);
        color: var(--ev-ink);
        font-size: 1.15rem;
    }

    .ev-bottom a.ev-bottom-add {
        color: #ffffff;
    }

    /* Liste des produits : une fiche par produit */
    .ev-products thead {
        display: none;
    }

    .ev-products,
    .ev-products tbody {
        display: block;
        width: 100%;
    }

    .ev-products tbody tr {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr) auto;
        grid-template-areas:
            "photo nom   nom"
            "photo prix  prix"
            "etats etats actions";
        align-items: center;
        gap: 6px 14px;
        padding: 16px;
        border-bottom: 1px solid var(--ev-line);
    }

    .ev-products tbody tr:last-child {
        border-bottom: 0;
    }

    .ev-products tbody td {
        padding: 0 !important;
        border: 0 !important;
        background: none !important;
        box-shadow: none !important;
    }

    .ev-products .ev-col-img { grid-area: photo; width: auto; align-self: start; }
    .ev-products .ev-col-img img { width: 64px; height: 64px; }
    .ev-products .ev-col-name { grid-area: nom; min-width: 0; }
    .ev-products .ev-col-price {
        grid-area: prix;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 2px 10px;
        text-align: left !important;
    }
    .ev-products .ev-col-states {
        grid-area: etats;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 8px;
        white-space: normal !important;
        text-align: left !important;
    }
    .ev-products .ev-col-actions { grid-area: actions; margin-top: 8px; }

    .ev-toolbar {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .ev-toolbar > * {
        min-width: 0;
        max-width: 100%;
    }

    .ev-search {
        flex: 0 0 auto;
        order: -1;
    }

    .ev-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-right: -16px;
        max-width: none;
        padding: 2px 16px 6px 0;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .ev-filters::-webkit-scrollbar {
        display: none;
    }

    .ev-filter {
        flex: 0 0 auto;
    }

    .ev-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ev-kpi {
        padding: 18px 16px;
    }

    .ev-kpi:nth-child(odd) {
        border-left: 0;
    }

    .ev-kpi:nth-child(n+3) {
        border-top: 1px solid var(--ev-line);
    }

    .ev-order .border-end {
        border-right: 0 !important;
        border-bottom: 1px solid var(--ev-line) !important;
        padding-bottom: 14px;
        margin-bottom: 14px !important;
    }

    .ev-main form.card {
        padding: 18px 16px !important;
    }

    /* Champs empilés : un peu d'air entre deux champs d'une même ligne */
    .ev-main form .row:not(.g-3) > [class*="col-md-"]:not(:last-child) {
        margin-bottom: 14px;
    }

    .ev-order-date {
        display: block;
        margin: 4px 0 0;
    }

    /* Litiges : une fiche par dossier */
    .ev-disputes,
    .ev-disputes tbody {
        display: block;
        width: 100%;
    }

    .ev-disputes thead {
        display: none;
    }

    .ev-disputes tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "sujet   statut"
            "produit produit"
            "client  client"
            "date    action";
        align-items: center;
        gap: 10px 14px;
        padding: 16px;
        border-bottom: 1px solid var(--ev-line);
    }

    .ev-disputes tbody tr:last-child {
        border-bottom: 0;
    }

    .ev-disputes tbody td {
        padding: 0 !important;
        border: 0 !important;
        background: none !important;
        box-shadow: none !important;
        min-width: 0;
    }

    .ev-disputes .ev-d-num { display: none; }
    .ev-disputes .ev-d-subject { grid-area: sujet; font-weight: 800; font-size: 1.02rem; line-height: 1.3; }
    .ev-disputes .ev-d-status { grid-area: statut; }
    .ev-disputes .ev-d-prod { grid-area: produit; }
    .ev-disputes .ev-d-client { grid-area: client; }
    .ev-disputes .ev-d-client small { overflow-wrap: anywhere; }
    .ev-disputes .ev-d-date { grid-area: date; font-size: 0.86rem; color: var(--ev-muted); }
    .ev-disputes .ev-d-action { grid-area: action; }

    .ev-fieldset {
        padding: 18px 16px 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ev *,
    .ev *::before,
    .ev *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* Étapes numérotées de la page d'inscription */
ol.ev-auth-points i {
    font-family: var(--ev-display);
    font-style: normal;
    font-size: 1.1rem;
}

/* ==========================================================================
   INSCRIPTION : ACCEPTATION DES CONDITIONS
   ========================================================================== */
.ev-consent {
    margin: 0 0 22px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid var(--ev-line-strong);
    border-radius: var(--ev-r-panel);
}

.ev-consent.is-missing {
    border-color: var(--ev-red);
    box-shadow: 0 0 0 3px rgba(163, 33, 26, 0.12);
}

.ev-consent .form-check {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-height: 0;
    margin: 0;
    padding: 0;
}

.ev-consent .form-check-input {
    flex: 0 0 auto;
    float: none;
    width: 1.4em;
    height: 1.4em;
    margin: 2px 0 0;
    border-color: var(--ev-line-strong);
    cursor: pointer;
}

.ev-consent .form-check-label {
    line-height: 1.5;
    cursor: pointer;
}

.ev-consent a {
    color: var(--ev-ink);
    font-weight: 800;
    text-decoration: underline;
}

.ev-consent a:hover {
    color: var(--ev-brass-deep);
}

.ev-consent-note {
    margin: 10px 0 0 calc(1.4em + 14px);
    font-size: 0.88rem;
    color: var(--ev-muted);
}

/* ==========================================================================
   CONDITIONS GÉNÉRALES DES VENDEURS (conditions.php)
   ========================================================================== */
.ev-terms-head {
    position: relative;
    padding: 40px 24px 46px;
    background: var(--ev-ink);
    color: #ffffff;
    overflow: hidden;
    isolation: isolate;
}

.ev-terms-head::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(60% 120% at 8% -20%, rgba(212, 175, 55, 0.5) 0%, rgba(212, 175, 55, 0.16) 42%, rgba(212, 175, 55, 0) 74%),
        radial-gradient(50% 90% at 100% 120%, rgba(154, 90, 43, 0.45) 0%, rgba(154, 90, 43, 0) 70%);
}

.ev-terms-head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0) 0%, var(--ev-brass) 22%, var(--ev-brass) 78%, rgba(212, 175, 55, 0) 100%);
}

.ev-terms-head-in {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 34px;
}

.ev-terms-logo {
    flex: 0 0 auto;
    width: 104px;
    height: auto;
}

.ev-terms-head h1 {
    margin: 0 0 10px;
    font-family: var(--ev-display);
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 400;
    line-height: 1.1;
}

.ev-terms-head p {
    max-width: 62ch;
    margin: 0;
    color: #D8D0C3;
}

.ev-terms-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 28px 24px 64px;
}

.ev-terms-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 24px;
}

.ev-terms-actions.is-end {
    margin: 28px 0 0;
}

.ev-terms-summary,
.ev-terms-toc details,
.ev-terms-body {
    background: #ffffff;
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-r-panel);
}

.ev-terms-summary {
    margin: 0 0 16px;
    padding: 24px 28px;
    border-color: var(--ev-brass);
}

.ev-terms-summary h2 {
    margin: 0 0 12px;
    font-family: var(--ev-display);
    font-size: 1.4rem;
    font-weight: 400;
}

.ev-terms-summary ul {
    margin: 0 0 14px;
    padding-left: 1.2em;
    display: grid;
    gap: 8px;
}

.ev-terms-summary li::marker {
    color: var(--ev-brass-deep);
}

.ev-terms-summary p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ev-muted);
}

.ev-terms-toc {
    margin: 0 0 16px;
}

.ev-terms-toc summary {
    padding: 16px 28px;
    font-weight: 800;
    cursor: pointer;
}

.ev-terms-toc ol {
    margin: 0;
    padding: 0 28px 20px 3.2em;
    columns: 2;
    column-gap: 40px;
}

.ev-terms-toc li {
    padding: 3px 0;
    break-inside: avoid;
}

.ev-terms-toc li::marker {
    color: var(--ev-brass-deep);
    font-weight: 800;
}

.ev-terms-body {
    padding: 38px 44px 40px;
}

.ev-terms-body section {
    scroll-margin-top: 20px;
}

.ev-terms-body section + section {
    margin-top: 30px;
    padding-top: 28px;
    border-top: 1px solid var(--ev-line);
}

.ev-terms-body h2 {
    margin: 0 0 14px;
    font-family: var(--ev-display);
    font-size: 1.55rem;
    font-weight: 400;
    line-height: 1.2;
}

.ev-terms-body h2 span {
    display: block;
    margin-bottom: 4px;
    font-family: var(--ev-text);
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--ev-brass-deep);
}

.ev-terms-body h3 {
    margin: 20px 0 8px;
    font-family: var(--ev-text);
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.3;
}

.ev-terms-body h2 + h3 {
    margin-top: 0;
}

.ev-terms-body p,
.ev-terms-body ul {
    max-width: 72ch;
    margin: 0 0 12px;
    line-height: 1.65;
}

.ev-terms-body ul {
    padding-left: 1.3em;
}

.ev-terms-body li {
    margin-bottom: 6px;
}

.ev-terms-body li::marker {
    color: var(--ev-brass-deep);
}

.ev-terms-body section > :last-child {
    margin-bottom: 0;
}

.ev-terms a:not(.btn) {
    color: var(--ev-ink);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--ev-brass);
    text-underline-offset: 3px;
}

.ev-terms a:not(.btn):hover {
    color: var(--ev-brass-deep);
}

.ev-terms a:focus-visible,
.ev-terms summary:focus-visible,
.ev-consent a:focus-visible {
    outline: 2px solid var(--ev-ink);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (max-width: 699.98px) {
    .ev-terms-head {
        padding: 28px 18px 32px;
    }

    .ev-terms-head-in {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .ev-terms-logo {
        width: 76px;
    }

    .ev-terms-main {
        padding: 20px 14px 48px;
    }

    .ev-terms-actions .btn {
        flex: 1 1 100%;
    }

    .ev-terms-summary {
        padding: 20px 18px;
    }

    .ev-terms-toc summary {
        padding: 14px 18px;
    }

    .ev-terms-toc ol {
        columns: 1;
        padding: 0 18px 16px 2.8em;
    }

    .ev-terms-body {
        padding: 24px 18px 26px;
    }

    .ev-consent {
        padding: 16px;
    }

    .ev-consent-note {
        margin-left: 0;
    }
}

@media print {
    .ev-terms-actions,
    .ev-terms-toc {
        display: none !important;
    }

    .ev-terms-head {
        padding: 0 0 12px;
        background: none;
        color: #000000;
    }

    .ev-terms-head::before,
    .ev-terms-head::after,
    .ev-terms-logo {
        display: none;
    }

    .ev-terms-head p {
        color: #000000;
    }

    .ev-terms-summary,
    .ev-terms-body {
        border: 0;
        padding: 0;
    }

    .ev-terms-main {
        padding: 0;
    }
}

/* ==========================================================================
   MES PRODUITS : afficher ou non dans la boutique, produits retirés
   ========================================================================== */
/* Le menu, puis le bouton Enregistrer dessous : la largeur de la colonne ne bouge pas */
.ev-boutique {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-left: 6px;
    vertical-align: middle;
}

.ev .ev-boutique .form-select {
    width: auto;
    min-width: 128px;
    font-weight: 700;
}

.ev .ev-boutique.is-afficher .form-select {
    border-color: #7FB08D !important;
    background-color: #F1F8F3 !important;
    color: #175A30 !important;
}

.ev .ev-boutique.is-masquer .form-select {
    border-color: #B9AE9C !important;
    background-color: #F1EBE1 !important;
    color: #4A4339 !important;
}

.ev .ev-boutique.is-pause .form-select {
    border-color: #E3C566 !important;
    background-color: #FFF4D6 !important;
    color: #5C4700 !important;
}

/* Le bouton n'apparaît que lorsque le choix a changé (sans JavaScript, il reste visible) */
.ev .ev-boutique.is-pret .btn {
    display: none;
}

.ev .ev-boutique.is-pret.is-modifie .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}

/* Lien vers les produits retirés, à côté des filtres */
.ev-retires-lien {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 6px 0 14px;
    border: 1px dashed var(--ev-line-strong);
    border-radius: 999px;
    color: var(--ev-soft);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.ev-retires-lien:hover {
    border-color: var(--ev-ink);
    color: var(--ev-ink);
}

.ev-retires-lien b,
.ev-retires-nb {
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #EEE8DD;
    color: var(--ev-soft);
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.ev-retires-nb {
    display: inline-block;
    margin-left: 6px;
}

.ev-retires-retour {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-bottom: 8px;
    color: var(--ev-ink);
    font-weight: 700;
    text-decoration: none;
}

.ev-retires-retour:hover {
    text-decoration: underline;
}

.ev-retires-note {
    margin: 0;
    padding: 14px 18px;
    border-bottom: 1px solid var(--ev-line);
    color: var(--ev-muted);
}

.ev-retires .ev-product-name {
    color: var(--ev-soft);
}

@media (max-width: 767.98px) {
    .ev-boutique {
        margin-left: 0;
    }

    .ev .ev-boutique .form-select,
    .ev .ev-boutique.is-pret.is-modifie .btn {
        min-height: 44px;
    }
}

/* ==========================================================================
   MESSAGERIE : pastille des messages non lus et bouton de la barre du haut.
   La conversation elle-même est dessinée par script/messagerie.css.
   ========================================================================== */
.ev-pastille {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--ev-brass);
    color: var(--ev-ink);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.5;
    text-align: center;
}

.ev-pastille[hidden] {
    display: none;
}

.ev-msg-lien {
    position: relative;
    display: none;
}

.ev-msg-lien .ev-pastille {
    position: absolute;
    top: -6px;
    right: -7px;
    border: 2px solid var(--ev-ink);
}

.ev-msg-lien.is-active {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--ev-ink);
}

/* Hauteur de la conversation : ce qui reste sous la barre et le bandeau */
.ev .ev-msgpage {
    --msg-hauteur: clamp(440px, calc(100vh - 300px), 820px);
}

@media (max-width: 767.98px) {
    .ev-msg-lien {
        display: inline-flex;
    }

    .ev .ev-msgpage {
        --msg-hauteur: clamp(400px, calc(100vh - 170px), 820px);
    }
}

/* ==========================================================================
   ASSISTANT : ce qu'il faut retenir aujourd'hui, puis la conversation.
   ========================================================================== */
.ev-as-lien {
    display: none;
}

.ev-as-lien.is-active {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--ev-ink);
}

.ev-as {
    max-width: 980px;
    margin: 0 auto;
}

.ev-as-points {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.ev-as-point {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 10px;
    padding: 14px 16px 14px 18px;
    border: 1px solid var(--ev-line);
    border-radius: 14px;
    background: var(--ev-surface);
    color: var(--ev-muted);
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.ev-as-point:hover {
    border-color: var(--ev-line-strong);
    color: var(--ev-muted);
}

.ev-as-point:focus-visible {
    outline: 2px solid var(--ev-brass-deep);
    outline-offset: 2px;
}

.ev-as-point i {
    grid-row: 1 / span 2;
    width: 34px;
    font-size: 1.05rem;
    text-align: center;
    color: var(--ev-line-strong);
}

.ev-as-point-nb {
    font-family: var(--ev-display);
    font-size: 1.7rem;
    line-height: 1.05;
    color: var(--ev-line-strong);
}

.ev-as-point-nom {
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
}

.ev-as-point.is-actif {
    border-color: var(--ev-line-strong);
    color: var(--ev-soft);
}

.ev-as-point.is-actif::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--ev-brass);
}

.ev-as-point.is-actif i {
    color: var(--ev-brass-deep);
}

.ev-as-point.is-actif .ev-as-point-nb {
    color: var(--ev-ink);
}

.ev-as-chat {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ev-line);
    border-radius: var(--ev-r-panel);
    background: var(--ev-surface);
    overflow: hidden;
}

.ev-as-fil {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: clamp(300px, calc(100vh - 500px), 600px);
    padding: 20px;
    overflow-y: auto;
    background: var(--ev-paper-2);
}

.ev-as-accueil {
    margin: auto;
    max-width: 560px;
    text-align: center;
    color: var(--ev-muted);
}

.ev-as-accueil[hidden] {
    display: none;
}

.ev-as-accueil p {
    margin: 0 0 14px;
    line-height: 1.5;
}

.ev-as-accueil .ev-as-accueil-titre {
    margin-bottom: 6px;
    font-family: var(--ev-display);
    font-size: 1.45rem;
    color: var(--ev-ink);
}

.ev-as-idees {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.ev-as-idee {
    min-height: 40px;
    padding: 7px 15px;
    border: 1px solid var(--ev-line-strong);
    border-radius: 999px;
    background: var(--ev-surface);
    color: var(--ev-ink);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ev-as-idee:hover {
    border-color: var(--ev-ink);
}

.ev-as-idee:focus-visible,
.ev-as-effacer:focus-visible {
    outline: 2px solid var(--ev-brass-deep);
    outline-offset: 2px;
}

.ev-as-msg {
    display: flex;
}

.ev-as-msg.is-moi {
    justify-content: flex-end;
}

.ev-as-bulle {
    max-width: min(82%, 640px);
    padding: 11px 15px;
    border: 1px solid var(--ev-line);
    border-radius: 14px 14px 14px 4px;
    background: var(--ev-surface);
    color: var(--ev-ink-2);
    font-size: 0.96rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ev-as-msg.is-moi .ev-as-bulle {
    border-color: var(--ev-ink);
    border-radius: 14px 14px 4px 14px;
    background: var(--ev-ink);
    color: #ffffff;
}

.ev-as-msg.is-attente .ev-as-bulle {
    color: var(--ev-muted);
    font-style: italic;
}

.ev-as-msg.is-erreur .ev-as-bulle {
    border-color: #E2B7B2;
    background: #FBEEEC;
    color: var(--ev-red);
}

.ev-as-saisie {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--ev-line);
}

.ev-as-saisie textarea {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 46px;
    max-height: 150px;
    padding: 11px 14px;
    border: 1px solid var(--ev-line-strong);
    border-radius: var(--ev-r-control);
    background: var(--ev-surface);
    color: var(--ev-ink);
    font: inherit;
    line-height: 1.4;
    resize: none;
}

.ev-as-saisie textarea:focus {
    outline: 2px solid var(--ev-brass-deep);
    outline-offset: 1px;
    border-color: var(--ev-ink);
}

.ev-as-saisie .btn {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 700;
}

.ev-as-pied {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    padding: 0 16px 14px;
}

.ev-as-pied p {
    flex: 1 1 320px;
    margin: 0;
    color: var(--ev-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.ev-as-effacer {
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--ev-soft);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.ev-as-effacer[hidden] {
    display: none;
}

/* Barre du haut avec six rubriques. Sur un écran de moins de 1200 px de large, les noms seuls (sans
   pictogramme) pour que tout tienne sur une ligne. Si l'écran est encore plus étroit, la rangée
   d'onglets défile sur le côté au lieu de passer sous les boutons. */
.ev-tabs {
    overflow: visible;
}

.ev-tabs::-webkit-scrollbar {
    display: none;
}

.ev-tab {
    flex: 0 0 auto;
}

@media (max-width: 1199.98px) {
    .ev-tab {
        padding: 0 10px;
    }

    .ev-tab i {
        display: none;
    }
}

@media (max-width: 919.98px) {
    .ev-tab {
        padding: 0 8px;
        font-size: 0.9rem;
    }

    .ev-tab::after {
        left: 8px;
        right: 8px;
    }

    .ev-brand-text {
        display: none;
    }
}

/* Mes produits : le bouton « Ajouter un produit », à côté de la recherche */
.ev-toolbar-fin {
    flex: 0 1 500px;
    display: flex;
    align-items: center;
    gap: 10px 12px;
    min-width: 0;
}

.ev-toolbar-fin .ev-search {
    flex: 1 1 200px;
    min-width: 0;
}

.ev-add-page {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--ev-brass);
    color: var(--ev-ink);
    font-weight: 800;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.ev-add-page:hover {
    background: #e6c85f;
    color: var(--ev-ink);
}

.ev-add-page:focus-visible {
    outline: 2px solid var(--ev-ink);
    outline-offset: 2px;
}

@media (max-width: 767.98px) {
    .ev-toolbar-fin {
        order: -1;
        flex: 0 0 auto;
        flex-direction: column;
        align-items: stretch;
    }

    .ev-toolbar-fin .ev-search {
        order: 0;
        flex: 0 0 auto;
    }

    .ev-add-page {
        justify-content: center;
        min-height: 46px;
    }
}

@media (max-width: 899.98px) {
    .ev-as-points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ev-tabs {
        gap: 0;
    }

    .ev-tab {
        padding: 0 7px;
    }
}

@media (max-width: 767.98px) {
    .ev-as-lien {
        display: inline-flex;
    }

    .ev-as-fil {
        height: clamp(280px, calc(100vh - 420px), 600px);
        padding: 14px;
    }

    .ev-as-bulle {
        max-width: 92%;
    }

    .ev-as-point {
        padding: 12px 12px 12px 14px;
    }

    .ev-as-point i {
        display: none;
    }

    .ev-as-point {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   STATISTIQUES : boutons « Par mois » / « Par année » du graphique des ventes
   ========================================================================== */
.ev .card-header.ev-graph-tete {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}

.ev-graph-choix {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ev-graph-vues {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--ev-line-strong);
    border-radius: 999px;
    background: var(--ev-surface);
}

.ev-graph-vue {
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ev-soft);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ev-graph-vue:hover {
    color: var(--ev-ink);
}

.ev-graph-vue.is-active {
    background: var(--ev-ink);
    color: #ffffff;
}

.ev-graph-vue:focus-visible,
.ev .ev-graph-annee:focus-visible {
    outline: 2px solid var(--ev-brass-deep);
    outline-offset: 2px;
}

.ev .ev-graph-annee {
    width: auto;
    min-height: 40px;
    padding-top: 0;
    padding-bottom: 0;
    border-color: var(--ev-line-strong);
    border-radius: 999px;
    font-weight: 700;
}

.ev .ev-graph-annee[hidden] {
    display: none;
}

.ev-graph-total {
    margin: 12px 0 0;
    color: var(--ev-soft);
    font-size: 0.92rem;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .ev-graph-vue {
        min-height: 40px;
    }
}

/* ==========================================================================
   LITIGES PAS ENCORE VUS : pastille rouge du lien « Litiges » (barre du haut,
   barre du bas sur téléphone) et étiquette « Nouveau » dans la liste
   ========================================================================== */
.ev-pastille-rouge {
    background: #D92D20;
    color: #ffffff;
}

.ev-bottom a {
    position: relative;
}

.ev-bottom .ev-pastille {
    position: absolute;
    top: 3px;
    left: 50%;
    margin-left: 4px;
    border: 2px solid var(--ev-ink);
}

.ev-nouveau {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    background: #D92D20;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.5;
    white-space: nowrap;
    vertical-align: middle;
}

/* ==========================================================================
   CONNEXION : lien « Mot de passe oublié ? » et petites notes
   ========================================================================== */
.ev-auth-rang {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0 12px;
}

.ev-auth-lien {
    margin-bottom: 0.5rem;
    color: var(--ev-brass-deep);
    font-size: 0.9rem;
    font-weight: 700;
}

.ev-auth-lien:hover {
    color: var(--ev-ink);
}

.ev-auth-note {
    margin: 0;
    color: var(--ev-muted);
    font-size: 0.92rem;
}

.ev-auth-note a {
    color: var(--ev-ink);
    font-weight: 700;
}

/* ------------------------------------------------------------------------------------------
   IMPORT DE PRODUITS DEPUIS UN FICHIER (pages/produits_import.php) et produits « À compléter »
   ------------------------------------------------------------------------------------------ */
.ev-add-page.ev-import-page {
    background: var(--ev-surface);
    border: 1px solid var(--ev-line-strong);
}

.ev-add-page.ev-import-page:hover {
    background: var(--ev-paper-2);
}

.ev-manque {
    margin-top: 4px;
    white-space: normal;
    max-width: 220px;
    line-height: 1.3;
}

.imp-etapes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    counter-reset: imp;
}

.imp-etapes li {
    counter-increment: imp;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--ev-surface);
    border: 1px solid var(--ev-line);
    color: var(--ev-muted);
    font-weight: 700;
    font-size: 0.88rem;
}

.imp-etapes li::before {
    content: counter(imp) ". ";
}

.imp-etapes li.is-active {
    background: var(--ev-ink);
    border-color: var(--ev-ink);
    color: #fff;
}

.imp-etapes li.is-faite {
    color: var(--ev-green);
}

.imp-lettre {
    display: inline-block;
    min-width: 26px;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--ev-paper);
    color: var(--ev-soft);
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
}

.imp-colonnes .imp-exemples div {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.imp-colonnes select {
    min-width: 220px;
}

.imp-colonnes select.is-choisi {
    border-color: var(--ev-brass-deep);
    font-weight: 700;
}

.imp-bilan {
    list-style: none;
    padding: 0;
    margin: 0;
}

.imp-bilan li {
    padding: 4px 0 4px 22px;
    position: relative;
}

.imp-bilan li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.85em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ev-line-strong);
}

.imp-bilan li.is-ok::before { background: var(--ev-green); }
.imp-bilan li.is-attention::before { background: var(--ev-brass); }

.imp-apercu tr.imp-success td:last-child { color: var(--ev-green); }
.imp-apercu tr.imp-warning td:last-child { color: var(--ev-copper); }
.imp-apercu tr.imp-danger td:last-child { color: var(--ev-red); }
.imp-apercu tr.imp-muted td { color: var(--ev-muted); }


/* ==========================================================================
   PIED DE PAGE DE LA BOUTIQUE (pages/footer.php), repris dans l'espace entreprise
   ========================================================================== */
.mk-footer {
    background-color: var(--ev-ink) !important;
    margin-top: 0 !important;
    font-family: var(--ev-text);
}

body.ev-auth .mk-footer {
    grid-column: 1 / -1;   /* sous les deux colonnes de la page de connexion */
}

.mk-footer h5 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
}

.mk-footer li a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
}

.mk-footer li a:hover {
    color: var(--ev-brass) !important;
}

.mk-footer .mk-container {
    max-width: 1320px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.mk-footer-legal {
    color: #FAF7ED;
    opacity: 0.75;
    font-size: 0.78rem;
    line-height: 1.6;
}

@media (max-width: 767.98px) {
    body.ev .ev-main:has(~ .mk-footer) {
        padding-bottom: 28px;
    }

    body.ev:has(.ev-bottom) .mk-footer {
        padding-bottom: 110px !important;   /* la place de la barre du bas */
    }
}

/* Le pied de page reste collé en bas de l'écran, même quand la page est courte */
body.ev:not(.ev-auth) {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.ev:not(.ev-auth) > .mk-footer {
    margin-top: auto !important;
}

body.ev:not(.ev-auth) > main {
    width: 100%;   /* garde la largeur des pages centrées dans cette mise en page */
}

/* Pages de connexion : le panneau sombre de gauche ne doit plus glisser par-dessus le pied de page.
   Les deux colonnes remplissent au moins l'écran, le pied de page vient en dessous, sur toute la largeur. */
@media (min-width: 900px) {
    body.ev-auth:has(> .mk-footer) {
        grid-template-rows: minmax(100vh, auto) auto;
    }

    body.ev-auth:has(> .mk-footer) .ev-auth-side {
        position: relative;
        top: auto;
        align-self: stretch;
        height: auto;
    }
}

body.ev-auth > .mk-footer {
    position: relative;
    z-index: 2;
}
