@charset "UTF-8";

:root {
    --main-color: #4f46e5;
    --dark-bg: #1f2937;
    --light-bg: #f9fafb;
    --text-dark: #111827;
    --text-light: #f3f4f6;
    --success: #047857;  /* Vert émeraude */
    --danger: #EF4444;     /* Rouge vif */
    --warning: #F59E0B;    /* Jaune foncé */
    --info: #3B82F6;       /* Bleu moyen */
    --gray: #6B7280;       /* Texte secondaire */
    --font-size-base: 0.95rem; /* Base font-size légèrement réduit */
    --font-size-medium: 1.75rem; /* Taille plus petite pour les titres */
    --font-size-large: 2.5rem; /* Taille plus petite pour les titres */
    --font-size-small: 0.85rem; /* Petite taille pour les labels et le texte secondaire */
    --ep-bg: #ffffff;
    --ep-border: #e2e8f0;
    --ep-hover: #f1f5f9;
    --ep-accent: #3b82f6;
    --ep-text: #1e293b;
    --ep-radius: 8px;
    --ep-cell-size: 40px;
}
body {
    margin: 0;
    font-family: system-ui, sans-serif;
    font-size: var(--font-size-base);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--light-bg);
}
header {
    padding: 0;
    display: flex;
    justify-content: center;
    /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05); */
    position: relative;
    width: 100vw;
    flex-direction: row;
    flex-wrap: nowrap;
    /* align-content: center; */
    align-items: center;
}
a,
a:hover,
a:focus,
a:active {
    color: var(--text-dark);
}
.layout {
    display: flex;
    overflow: hidden;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}
#header svg {
    width: 150px;
    height: auto;
}
main {
    padding: 2rem;
    padding-top: 0;
    overflow-y: auto;
    width: 60%;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}
h1 {
    font-size: var(--font-size-large);
    text-align: center;
    color: var(--main-color);
    margin-bottom: 2rem;
}

/*h1 {
    font-size: var(--font-size-large);
    text-align: center;
}
.home h1 {
    color: var(--text-light);
}*/
h2 {
    font-size: var(--font-size-medium);
}
footer {
    width: 100vw;
    color: var(--text-dark);
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
}
footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
footer ul li {
    padding: 0.5rem;
    margin-bottom: 1rem;
     display: inline-flex;
    align-items: center;
}
footer ul a {
    color: var(--text-dark);
}
footer ul a:hover,
footer ul a:active,
footer ul a:focus,
footer ul a:visited {
    color: var(--dark-bg);
}

.notice {
    display: flex;
    margin: 2rem 0;
    padding: 1rem;
    color: var(--text-dark);
    font-size: var(--font-size-base);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    background-color: white;
    font-style: italic;
}

.notice-success {
    border-left: 8px solid var(--success);
}
.notice-danger {
    border-left: 8px solid var(--danger);
}
.notice-warning {
    border-left: 8px solid var(--warning);
}
.notice-info {
    border-left: 8px solid var(--info);
}

.button {
    background: var(--main-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: var(--font-size-base);
}
.button:hover {
    background: #4338ca;
    color: white;
}

.button:disabled,
.button:disabled:hover {
    background: var(--gray);
    cursor: not-allowed;
}

.button-secondary {
    background: var(--light-bg);
    color: var(--text-dark);
}

.button-secondary:hover,
.button-secondary:active,
.button-secondary:focus {
    background: var(--light-bg);
    color: var(--text-dark);
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}
.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--danger);
    border: none;
    cursor: pointer;
    font-size: var(--font-size-base);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
    margin-top: 1rem;
}
.logout-link:hover,
.logout-link:focus {
    background: #fef2f2;
    text-decoration: underline;
    outline: 2px solid var(--danger);
    outline-offset: 2px;
    color: var(--danger);
}
.logout-link svg {
    width: 18px;
    height: 18px;
}
/* ============================================
   STYLES DE FORMULAIRE GÉNÉRIQUES ET UNIFIÉS
   ============================================ */
#login {
    max-width: 420px;
    width: 100%;
    display: block;
    margin: 0 auto;
}
#loginform {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}
.lostpassword-wrapper {
    margin: 1rem;
}
.lostpassword-wrapper a,
.lostpassword-wrapper a:visited {
    color:var(--gray);
    font-size: small;
}
.lostpassword-wrapper a:hover,
.lostpassword-wrapper a:focus,
.lostpassword-wrapper a:active {
    color:var(--main-color);
}

/* --- Labels de formulaire --- */
.form label,
form label,
.form-label {    
    display: block;
    margin: 1rem 0 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: var(--font-size-small);
}

/* --- Groupe de champs (field-group) --- */
.form-group,
.field-group {
    margin-bottom: 1.5rem;
}

/* --- Tous les champs de texte --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="search"],
select,
textarea,
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: border 0.2s, box-shadow 0.2s;
    font-size: var(--font-size-base);
    font-family: inherit;
    box-sizing: border-box;
}

/* Focus sur les champs */
input:focus,
select:focus,
textarea:focus,
.form-control:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* Champs désactivés */
input:disabled,
select:disabled,
textarea:disabled,
.form-control:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Textarea spécifique */
textarea {
    resize: vertical;
    min-height: 100px;
}

/* Select spécifique */
select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Input Groups (avec icônes) --- */
.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    position: relative;
}

.input-group input {
    flex: 1;
    border-radius: 0;
}

.input-group input:first-child {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.input-group input:last-child {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: var(--light-bg);
    border: 1px solid #d1d5db;
    color: var(--gray);
    font-size: var(--font-size-base);
    white-space: nowrap;
}

.input-group-text:first-child {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
    border-right: none;
}

.input-group-text:last-child {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    border-left: none;
}

.input-group-text svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Quand l'input a le focus, mettre en valeur le groupe */
.input-group input:focus ~ .input-group-text,
.input-group input:focus + .input-group-text {
    border-color: var(--main-color);
}

/* --- Wrapper pour password avec toggle --- */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    flex: 1;
    padding-right: 3rem;
}

.toggle-password-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 0 0.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password-btn:hover {
    color: var(--main-color);
}

.toggle-password-btn svg {
    width: 20px;
    height: 20px;
}

/* --- Checkbox standard transformée en Toggle Switch --- */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none; /* Cache la checkbox native */
}

/* Style du toggle switch pour checkbox */
.checkbox-toggle {
    position: relative;
     display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.checkbox-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray);
    transition: 0.3s;
    border-radius: 24px;
}

.checkbox-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-toggle .checkbox-toggle-slider {
    background-color: var(--main-color);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-toggle .checkbox-toggle-slider:before {
    transform: translateX(20px);
}

.checkbox-wrapper input[type="checkbox"]:disabled + .checkbox-toggle .checkbox-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-label {
    font-size: var(--font-size-base);
    color: var(--text-dark);
    cursor: pointer;
    user-select: none;
}

/* --- Radio buttons --- */
.radio-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0;
}

.radio-wrapper input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--main-color);
}

.radio-label {
    font-size: var(--font-size-base);
    color: var(--text-dark);
    cursor: pointer;
    user-select: none;
}

/* --- File Input Personnalisé --- */
.file-input-wrapper {
    position: relative;
     display: inline-flex;
    align-items: center;
    width: 100%;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
}

.file-input-label:hover {
    border-color: var(--main-color);
    background: var(--light-bg);
}

.file-input-wrapper input[type="file"]:focus + .file-input-label {
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.file-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--gray);
}

.file-input-icon svg {
    width: 100%;
    height: 100%;
}

.file-input-text {
    flex: 1;
    color: var(--gray);
    font-size: var(--font-size-base);
}

.file-input-text.has-file {
    color: var(--text-dark);
    font-weight: 500;
}

/* --- Range Slider --- */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #d1d5db;
    outline: none;
    padding: 0;
    margin: 1rem 0;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--main-color);
    cursor: pointer;
    transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--main-color);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* --- Actions de formulaire --- */
.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-actions-vertical {
    flex-direction: column;
}

.form-actions-inline {
    flex-wrap: nowrap;
}

/* --- Texte d'aide / Small --- */
.form-help,
form small,
.help-text {
    color: var(--gray);
    font-size: var(--font-size-small);
    display: block;
    margin-top: 0.25rem;
}

/* --- Messages d'erreur --- */
.form-error,
.error-message {
    color: var(--danger);
    font-size: var(--font-size-small);
    display: block;
    margin-top: 0.25rem;
}

.form-control.error,
input.error,
select.error,
textarea.error {
    border-color: var(--danger);
}

.form-control.error:focus,
input.error:focus,
select.error:focus,
textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* --- Messages de succès --- */
.form-success,
.success-message {
    color: var(--success);
    font-size: var(--font-size-small);
    display: block;
    margin-top: 0.25rem;
}

/* --- Fieldset et Legend --- */
fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

legend {
    font-weight: 600;
    color: var(--text-dark);
    padding: 0 0.5rem;
    font-size: var(--font-size-base);
}

/* --- Layout en ligne (inline forms) --- */
.form-inline {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-inline .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

/* --- Layout en grille (2 colonnes) --- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* --- Champ obligatoire (astérisque) --- */
.required-field label::after,
label.required::after {
    content: " *";
    color: var(--danger);
}

/* ============================================
   ICÔNES SVG PAR DÉFAUT (inline)
   ============================================ */

/* Vous pouvez remplacer ces SVG par vos propres icônes */

/* Icône File */
.icon-file {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z'/%3E%3C/svg%3E");
}

/* Icône URL */
.icon-url {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1'/%3E%3C/svg%3E");
}

/* Icône Phone */
.icon-phone {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z'/%3E%3C/svg%3E");
}

/* Icône Eye (visible) */
.icon-eye {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3E%3C/svg%3E");
}

/* Icône Eye Slash (masqué) */
.icon-eye-slash {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21'/%3E%3C/svg%3E");
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .form-inline {
        flex-direction: column;
    }
    
    .form-inline .form-group {
        width: 100%;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .button {
        width: 100%;
    }
}
@media (max-width: 1280px) {
    main {
        padding: 1rem;
        padding-top: 0;
        width: 80%;
    }
}
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    nav.sidebar {
        position: absolute;
        top: 112px;
        left: 0;
        height: calc(100vh - 112px);
        transform: translateX(0); /* visible par défaut */
        background: var(--dark-bg);
        width: 250px;
        z-index: 100;
        transition: transform 0.3s ease;
    }
    nav.sidebar.hidden {
        transform: translateX(-100%);
    }
    .layout {
        flex-direction: column;
    }
    main {
        padding: 1rem;
        padding-top: 0;
        width: 100%;
    }
    .info-card,
    .info-card.wide {
        width: 100% !important;
    }
    aside {
        width: auto;
        padding: 1rem;
    }
}

body.single-list {
    margin: 0;
    font-family: system-ui, sans-serif;
    font-size: var(--font-size-base);
    color: var(--text-dark);
    background-color: var(--light-bg);
    padding: 2rem;
}
body.single-list .container {
    max-width: 1200px;
    margin: 0 auto;
}
body.single-list h1 {
    font-size: var(--font-size-large);
    text-align: center;
    color: var(--main-color);
    margin-bottom: 2rem;
}
/* Barre de contrôle */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.search-box {
    flex: 1;
    min-width: 250px;
}
.search-box input {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    font-size: 0.95rem;
}
.search-box input:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}
/* Switch de vue */
.view-switch {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.view-switch button {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--gray);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: var(--font-size-base);
    transition: all 0.2s;
}
.view-switch button.active {
    background: var(--main-color);
    color: white;
}
.view-switch button:hover:not(.active) {
    background: var(--light-bg);
}
/* --- Style du Switch (Toggle) de filtrage --- */
.filter-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-base);
    color: var(--text-dark);
}
.switch {
    position: relative;
     display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray);
    transition: 0.4s;
    border-radius: 24px;
    width: inherit;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--main-color);
}
input:checked + .slider:before {
    transform: translateX(20px);
}
/* Vue Grille */
        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 1.5rem;
            margin-top: 2rem;
        }

        .product-card {
            background: white;
            border-radius: 0.5rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            overflow: hidden;
            transition: transform 0.2s, box-shadow 0.2s;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        body.logged-in .product-card {
            cursor: move;
        }

        .product-card:not(.reserved):hover {
            transform: translateY(-4px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .product-card.reserved {
            background-color: #fcebeb;
            opacity: 0.7;
        }

        .product-card.dragging {
            opacity: 0.5;
            cursor: grabbing;
        }

        .product-card.drag-over {
            border: 2px dashed var(--main-color);
        }

        .product-card img {
            width: 100%;
            height: 200px;
            object-fit: cover;
        }

        .product-card-content {
            padding: 1rem;
        }

        .product-card h2,
        .product-card h3 {
            margin: 0 0 0.5rem 0;
            font-size: 1.1rem;
            color: var(--text-dark);
        }

        .product-card .price {
            font-size: 1.25rem;
            font-weight: bold;
            color: var(--main-color);
            margin: 0.5rem 0;
        }

        .product-card .date {
            font-size: var(--font-size-small);
            color: var(--gray);
            margin-bottom: 1rem;
        }

        .product-card .comments {
            font-style: italic;
            color: var(--gray);
            margin: 1rem 0;
        }

        .product-card a {
             display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: var(--main-color);
            color: white;
            text-decoration: none;
            border-radius: 0.375rem;
            font-size: var(--font-size-small);
            transition: background 0.2s;
        }

        .product-card a:hover {
            background: #4338ca;
        }

        /* Vue Liste */
        .products-table-container {
            display: none;
            overflow-x: auto;
            background: white;
            border-radius: 0.5rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            margin-top: 2rem;
        }

        .products-table-container.active {
            display: block;
        }

        .products-table {
            width: 100%;
            border-collapse: collapse;
        }

        .products-table th,
        .products-table td {
            padding: 1rem;
            text-align: left;
            border-bottom: 1px solid #e5e7eb;
        }

        .products-table td.comments {
            font-style: italic;
            color: var(--gray)
        }

        .products-table th {
            background: var(--light-bg);
            font-weight: 600;
            color: var(--text-dark);
            cursor: pointer;
            user-select: none;
            position: relative;
        }

        .products-table th:hover {
            background: #f3f4f6;
        }

        .products-table th.sortable::after {
            content: '⇅';
            margin-left: 0.5rem;
            color: var(--gray);
            font-size: 0.8rem;
        }

        .products-table th.sort-asc::after {
            content: '↑';
            color: var(--main-color);
        }

        .products-table th.sort-desc::after {
            content: '↓';
            color: var(--main-color);
        }

        .products-table td img {
            width: 60px;
            height: 60px;
            object-fit: cover;
            border-radius: 0.375rem;
        }

        .products-table .price {
            font-weight: bold;
            color: var(--main-color);
        }

        .products-table .date {
            color: var(--gray);
            font-size: var(--font-size-small);
        }

        /*.products-table a {
            color: var(--main-color);
            text-decoration: none;
            font-weight: 500;
        }*/
        .products-table a {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: var(--main-color);
            color: white;
            text-decoration: none;
            border-radius: 0.375rem;
            font-size: var(--font-size-small);
            transition: background 0.2s;
            margin-bottom: 0.5rem;
        }

        .products-table a:hover {
            background: #4338ca;
            /* text-decoration: underline; */
        }

        .shopping-list-item,
        .products-table tbody tr {
            transition: background 0.2s;
        }

        .shopping-list-item,
         body.logged-in .products-table tbody tr {
            cursor: move;
        }

        .products-table tbody tr:hover {
            background: var(--light-bg);
        }

        .shopping-list-item.dragging,
        .products-table tbody tr.dragging {
            opacity: 0.5;
            cursor: grabbing;
        }

        .shopping-list-item.drag-over,
        .products-table tbody tr.drag-over {
            border-top: 5px solid var(--main-color);
        }

        .products-table tbody td.actions {
            text-align: center;
        }

        /* Responsive */
        @media (max-width: 768px) {
            body {
                padding: 1rem;
            }

            .controls {
                flex-direction: column;
                align-items: stretch;
            }

            .search-box {
                min-width: 100%;
            }

            .products-grid {
                grid-template-columns: 1fr;
            }

            .products-table th,
            .products-table td {
                padding: 0.75rem 0.5rem;
                font-size: var(--font-size-small);
            }
        }

        .hidden {
            display: none !important;
        }

        .no-results {
            text-align: center;
            padding: 3rem;
            color: var(--gray);
            font-size: 1.1rem;
        }

/* --- Styles de la Modal --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 4rem);
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto; /* Permet le scroll */
    padding: 2rem 0; /* Espace en haut et en bas */
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: calc(100vh - 4rem); /* Hauteur max = hauteur écran - padding */
    overflow-y: auto; /* Scroll si le contenu dépasse */
    margin: auto; /* Centre verticalement avec le scroll */
}

.modal-content h2 {
    margin-top: 0;
    color: var(--text-dark);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    position: sticky; /* Garde les boutons visibles en bas */
    bottom: 0;
    background: white; /* Fond pour masquer le contenu qui défile */
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb; /* Séparateur optionnel */
    z-index: 999;
}

/* Pour les grandes modales */
.large-modal-content {
    max-width: 600px;
}

/* Amélioration mobile */
@media (max-width: 768px) {
    .modal {
        padding: 1rem 0;
    }
    
    .modal-content {
        max-height: calc(100vh - 2rem);
        width: 95%;
        padding: 1.5rem;
    }
}
.image-preview {
    margin-top: 0.5rem;
}
.image-preview img {
    border: 3px solid var(--main-color);
    border-radius: 0.75rem;
    max-width: 150px;
    height: auto;
    opacity: 0;
    transition: opacity .35s ease;
}
.image-preview img.loaded {
    opacity: 1;
}

#alternativeImages {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 colonnes */
    gap: 5px;
    margin-top: 10px;
}
#alternativeImages img {
    width: auto;
    height: 50px;
    border: 2px solid transparent;
    cursor: pointer;
}
#alternativeImages img.selected {
    border-color: var(--success); /* Bordure verte pour l'image sélectionnée */
}

/* Styles des boutons (déjà définis) */

/* --- Indication de Réservation --- */
/* Bouton Réserver */
.reserve-btn {
     display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--success); /* Vert pour l'action */
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 0.375rem;
    font-size: var(--font-size-small);
    transition: background 0.2s;
    cursor: pointer;
}
.reserve-btn:hover {
    background: #0d9472;
}
/* Bouton Dé-réserver */
.dereserve-btn {
     display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--warning); /* Vert pour l'action */
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 0.375rem;
    font-size: var(--font-size-small);
    transition: background 0.2s;
    cursor: pointer;
}
.dereserve-btn:hover {
    background: #d88c08;
}
.products-table .reserve-btn,
.products-table .dereserve-btn {
    margin-bottom: 0.5rem;
}

.delete-btn {
     display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--danger); /* Vert pour l'action */
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 0.375rem;
    font-size: var(--font-size-small);
    transition: background 0.2s;
    cursor: pointer;
}
.delete-btn:hover {
    background: var(--danger);
}

/* Styles pour les éléments réservés */
.reserved-state {
    background-color: #fcebeb; /* Rouge très clair */
    /* pointer-events: none; // Désactive le drag and drop, le clic, etc. */
    opacity: 0.7;
}

.product-card.reserved-state {
    box-shadow: none;
}

.reserved-text {
    color: var(--danger);
    font-weight: bold;
    font-size: var(--font-size-base);
    margin: 0.5rem 0;
}

.product-card .reserve-btn,
.products-table .reserve-btn {
    /* Cache le bouton de réservation quand l'article est réservé */
     display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.product-card.reserved-state .reserve-btn,
.products-table tr.reserved-state .reserve-btn {
    display: none;
}
/* Boutons de base */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: var(--font-size-small);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.action-btn svg,
.product-card a svg,
.products-table a svg,
.reserve-btn svg,
.dereserve-btn svg,
.delete-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
/* Bouton Éditer */
.edit-btn {
    background: var(--info);
    color: white;
}

/* Encarts sous le titre */
        .info-cards {
            display: flex;
            /* gap: 1.5rem; */
            margin-bottom: 2rem;
            flex-direction: row;
            flex-wrap: wrap;
            align-items: flex-start;
            justify-content: flex-start;
            align-content: flex-start;
        }
        
        .wp-block-column,
        .info-card {
            margin: 0.75rem;
            background: white;
            padding: 1.5rem;
            border-radius: 0.5rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            width: calc(32% - 4rem);
        }

        .wp-block-column .wp-block-column {
            box-shadow: none;
        }

        .info-card.wide {
            width: calc(65% - 4rem);
        }

        .wp-block-column h2,
        .wp-block-column h3 {
            margin: 0 0 2rem 0;
            color: var(--main-color);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .wp-block-column h3 {
            color: var(--text-dark);
            margin: 0 0 1rem 0;
        }

        .wp-block-column a {
            color: var(--main-color);
        }

        .info-card h3 {
            margin: 0 0 1rem 0;
            font-size: 1.1rem;
            color: var(--text-dark);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .info-card h4 {
            margin: 0 0 1rem 0;
            color: var(--text-dark);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .info-card h3 svg,
        .info-card h4 svg {
            width: 24px;
            height: 24px;
        }

        .extension-links {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .extension-link {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            background: var(--light-bg);
            border-radius: 0.375rem;
            text-decoration: none;
            color: var(--text-dark);
            transition: all 0.2s;
            border: 1px solid #e5e7eb;
        }

        .extension-link:hover {
            background: #f3f4f6;
            border-color: var(--main-color);
            transform: translateX(4px);
        }

        .extension-link svg {
            width: 28px;
            height: 28px;
            flex-shrink: 0;
        }

        .extension-link span {
            font-weight: 500;
        }

        .add-list-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            width: auto;
            padding: 0.75rem 1rem;
            background: var(--main-color);
            color: white;
            border: none;
            border-radius: 0.375rem;
            cursor: pointer;
            font-size: var(--font-size-base);
            font-weight: 500;
            transition: background 0.2s;
            text-decoration: none;
        }

        .add-list-btn:hover {
            background: #4338ca;
            color: white;
        }

        .add-list-btn svg {
            width: 20px;
            height: 20px;
        }

        .lists-container {
            max-height: 500px;
            overflow-y: auto;
        }

        .list-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem;
            background: var(--light-bg);
            border-radius: 0.375rem;
            margin-bottom: 0.5rem;
            cursor: pointer;
            transition: all 0.2s;
            border: 2px solid transparent;
        }

        .list-item:hover {
            background: #f3f4f6;
        }

        .list-item.active {
            background: #eef2ff;
            border-color: var(--main-color);
        }

        .list-item-info {
            flex: 1;
        }

        .list-item-name {
            font-weight: 500;
            color: var(--text-dark);
            margin-bottom: 0.25rem;
        }

        .list-item-count {
            font-size: var(--font-size-small);
            color: var(--gray);
        }

        .list-item-actions {
            display: flex;
            gap: 0.5rem;
        }

        .list-item-actions button {
            padding: 0.25rem 0.5rem;
            background: transparent;
            border: none;
            cursor: pointer;
            color: var(--gray);
            transition: color 0.2s;
        }

        .list-item-actions button:hover {
            color: var(--danger);
        }

        .empty-state {
            text-align: center;
            padding: 2rem 1rem;
            color: var(--gray);
            font-size: var(--font-size-small);
        }

        .password-section {
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid #e5e7eb;
        }

        .password-section > h4 {
            margin-top: 0;
        }

        
        /* --- Styles spécifiques à la Modale de Liste --- */
.large-modal-content {
    max-width: 600px; /* Rendre la modale plus large pour la description */
    width: 90%;
}

.products-table td.editable:hover {
    cursor: pointer;
    background-color: #f7f7f7; /* Léger changement de couleur au survol */
}

/* Style de l'input en mode édition */
.products-table td.editable input[type="text"],
.products-table td.editable textarea {
    width: 100%;
    padding: 4px;
    border: 1px solid var(--main-color);
    box-sizing: border-box;
    font-size: inherit; /* Conserve la taille de police du tableau */
    font-family: inherit;
    margin: -4px; /* Compense le padding pour éviter que la cellule ne s'agrandisse trop */
}

.info-card .form-actions-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.info-card .form-actions-group .button {
    width: 100%;
}
.info-card .delete-btn-large {
    background: var(--danger) !important;
    color: white !important;
}
.info-card .delete-btn-large:hover {
    background: #c53030 !important;
}
@media (min-width: 768px) {
  .info-cards > .wide {
    grid-column: span 2;
  }
  .add-list-btn {
    width: 100%;
  }
}

/* ========================================
   SYSTÈME DE BADGES
   ======================================== */
/* Badge de base */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    transition: all 0.2s ease;
}
/* Variantes de couleurs - Solide */
.badge-primary {
    background: var(--main-color);
    color: white;
}
.badge-success {
    background: var(--success);
    color: white;
}
.badge-danger {
    background: var(--danger);
    color: white;
}
.badge-warning {
    background: var(--warning);
    color: white;
}
.badge-info {
    background: var(--info);
    color: white;
}
.badge-gray {
    background: var(--gray);
    color: white;
}
.badge-dark {
    background: var(--dark-bg);
    color: white;
}
/* Variantes subtiles (soft) */
.badge-primary-soft {
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}
.badge-success-soft {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.badge-danger-soft {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.badge-warning-soft {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}
.badge-info-soft {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}
.badge-gray-soft {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}
/* Variantes outline */
.badge-primary-outline {
    background: transparent;
    color: var(--main-color);
    border: 1.5px solid var(--main-color);
}
.badge-success-outline {
    background: transparent;
    color: var(--success);
    border: 1.5px solid var(--success);
}
.badge-danger-outline {
    background: transparent;
    color: var(--danger);
    border: 1.5px solid var(--danger);
}
.badge-warning-outline {
    background: transparent;
    color: var(--warning);
    border: 1.5px solid var(--warning);
}
.badge-info-outline {
    background: transparent;
    color: var(--info);
    border: 1.5px solid var(--info);
}
/* Tailles */
.badge-sm {
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
}
.badge-lg {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}
/* Badge avec point (dot) */
.badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    margin-left: -0.125rem;
}
/* Badge avec icône */
.badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.badge-sm svg {
    width: 12px;
    height: 12px;
}
.badge-lg svg {
    width: 16px;
    height: 16px;
}
/* Badge avec compteur */
.badge-counter {
    min-width: 20px;
    padding: 0.125rem 0.5rem;
    text-align: center;
}
/* Badge carré/rectangulaire */
.badge-square {
    border-radius: 0.25rem;
}
/* Badge animé (pulse) */
.badge-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}
/* Badge cliquable */
.badge-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}
.badge-clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.badge-clickable:active {
    transform: translateY(0);
}
/* Badge avec bouton de fermeture */
.badge-dismissible {
    padding-right: 0.5rem;
}
.badge-close {
    margin-left: 0.25rem;
    padding: 0;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.badge-close:hover {
    opacity: 1;
}
.badge-close svg {
    width: 14px;
    height: 14px;
}

/* Loader de base */
.loader {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
/* Texte de chargement */
.loader-text {
    color: var(--gray);
    font-size: var(--font-size-base);
    font-weight: 500;
    text-align: center;
}
/* Barre de progression pulsante */
.pulse-bar {
    width: 200px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.pulse-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background: var(--main-color);
    border-radius: 2px;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0% {
        left: -50%;
    }
    100% {
        left: 100%;
    }
}

/* Loader inline (dans un bouton) */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}
.btn-loading .btn-text {
    opacity: 0;
}
.btn-loading .btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.spinner {
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
.spinner circle {
    fill: none;
    stroke: var(--main-color);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 90, 150;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
}
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}
@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }
    #header,
    #productsGrid,
    .form-actions,
    .controls,
    thead,
    td.date,
    td.actions,
    .footer-generique {display: none !important;}
    #productsTableContainer,
    .td-product-url-hidden {display: block !important;}
    .post-title{font-size:var(--font-size-medium)}
}

/**
 * SHOPPING
 */
/* Header */
.shopping-list-wrapper .list-header {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}
.shopping-list-wrapper .list-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 0.5rem;
}
.shopping-list-wrapper .list-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--gray);
    font-size: var(--font-size-small);
    margin-bottom: 1.5rem;
}
.shopping-list-wrapper .list-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.shopping-list-wrapper .list-meta-item svg {
    width: 16px;
    height: 16px;
}
/* Stats */
.shopping-list-wrapper .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}
.shopping-list-wrapper .stat-card {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 0.375rem;
    text-align: center;
}
.shopping-list-wrapper .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--main-color);
}
.shopping-list-wrapper .stat-label {
    font-size: var(--font-size-small);
    color: var(--gray);
    margin-top: 0.25rem;
}
/* Add item form */
.shopping-list-wrapper .add-item-form {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}
.shopping-list-wrapper .add-item-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: var(--font-size-base);
}
.shopping-list-wrapper .add-item-form input:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.shopping-list-wrapper .btn-add {
    padding: 0.75rem 1.5rem;
    background: var(--main-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.shopping-list-wrapper .btn-add:hover {
    background: #4338ca;
    transform: translateY(-1px);
}
.shopping-list-wrapper .btn-add svg {
    width: 20px;
    height: 20px;
}
/* Filters */
.shopping-list-wrapper .filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.shopping-list-wrapper .filter-title {
    font-weight: bold;
    color:var(--gray);
}
.shopping-list-wrapper .filter-btn {
    padding: 0.5rem 1rem;
    background: white;
    color: var(--gray);
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: var(--font-size-small);
    font-weight: 500;
}
.shopping-list-wrapper .filter-btn:hover {
    border-color: var(--main-color);
    color: var(--main-color);
}
.shopping-list-wrapper .filter-btn.active {
    background: var(--main-color);
    color: white;
    border-color: var(--main-color);
}
/* Shopping list */
.shopping-list-wrapper .shopping-list {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}
.shopping-list-wrapper .shopping-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s;
    position: relative;
}
.shopping-list-wrapper .shopping-list-item:last-child {
    border-bottom: none;
}
.shopping-list-wrapper .shopping-list-item:hover {
    background: var(--light-bg);
}
/* States */
.shopping-list-wrapper .shopping-list-item.checked {
    background: #f0fdf4;
    opacity: 0.7;
}
.shopping-list-wrapper .shopping-list-item.checked .item-name {
    text-decoration: line-through;
    color: var(--gray);
}
.shopping-list-wrapper .shopping-list-item.outofstock {
    border-left: 4px solid var(--warning);
}
.shopping-list-wrapper .shopping-list-item.in-progress {
    border-left: 4px solid var(--warning);
}
/* Checkbox */
.shopping-list-wrapper .item-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.shopping-list-wrapper .item-checkbox:hover {
    border-color: var(--success);
}
.shopping-list-wrapper .shopping-list-item.checked .item-checkbox {
    background: var(--success);
    border-color: var(--success);
}
.shopping-list-wrapper .item-checkbox svg {
    width: 16px;
    height: 16px;
    stroke: white;
    display: none;
}
.shopping-list-wrapper .shopping-list-item.checked .item-checkbox svg {
    display: block;
}
/* Item content */
.shopping-list-wrapper .item-content {
    flex: 1;
    min-width: 0;
}
.shopping-list-wrapper .item-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}
.shopping-list-wrapper .item-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: var(--font-size-small);
    color: var(--gray);
}
.shopping-list-wrapper .item-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.shopping-list-wrapper .item-meta-item svg {
    width: 14px;
    height: 14px;
}
/* Badges */
.shopping-list-wrapper .item-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
}
.shopping-list-wrapper .badge-outofstock {
    background: #fff1d9;
    color: var(--warning);
}
.shopping-list-wrapper .badge-progress {
    background: #fef3c7;
    color: #92400e;
}
.shopping-list-wrapper .badge-category {
    background: #dbeafe;
    color: #1e40af;
}
/* Actions */
.shopping-list-wrapper .item-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}
.shopping-list-wrapper .shopping-list-item:hover .item-actions {
    opacity: 1;
}
.shopping-list-wrapper .action-btn {
    padding: 0.375rem;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.shopping-list-wrapper .action-btn svg {
    width: 18px;
    height: 18px;
}
.shopping-list-wrapper .action-btn:hover {
    background: var(--light-bg);
}
.shopping-list-wrapper .action-btn.btn-edit,
.shopping-list-wrapper .action-btn.btn-edit-product {
    color: var(--info);
}
.shopping-list-wrapper .action-btn.btn-outofstock {
    color: var(--warning);
}
.shopping-list-wrapper .action-btn.btn-delete {
    color: var(--danger);
}
.shopping-list-wrapper .action-btn.btn-delete:hover {
    background: #fee2e2;
}
/* Empty state */
.shopping-list-wrapper .empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray);
}
.shopping-list-wrapper .empty-state svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    opacity: 0.5;
}
/* Quick actions */
.shopping-list-wrapper .quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.shopping-list-wrapper .quick-btn {
    padding: 0.5rem 1rem;
    background: white;
    color: var(--text-dark);
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: var(--font-size-small);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.shopping-list-wrapper .quick-btn:hover {
    border-color: var(--main-color);
    color: var(--main-color);
}
.shopping-list-wrapper .quick-btn svg {
    width: 16px;
    height: 16px;
}
/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    .shopping-list-wrapper .list-header {
        padding: 1.5rem;
    }
    .shopping-list-wrapper .list-title {
        font-size: 1.5rem;
    }
    .shopping-list-wrapper .add-item-form {
        flex-direction: column;
    }
    .shopping-list-wrapper .btn-add {
        width: 100%;
        justify-content: center;
    }
    .shopping-list-wrapper .shopping-list-item {
        padding: 1rem;
    }
    .shopping-list-wrapper .item-actions {
        opacity: 1;
    }
    .shopping-list-wrapper .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .wp-block-column {padding: 0.75rem 1.5rem;}
    .wp-block-column .wp-block-column {padding: 0;}
    .wp-block-column h2,
    .wp-block-column h3 {
        margin: 0 0 1rem 0;
    }
}
/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.shopping-list-wrapper .shopping-list-item {
    animation: slideIn 0.3s ease;
}

.add-product-to-shopping {
    flex: 1;
}

.vs2-container {
    position: relative;
    font-family: system-ui, sans-serif;
    flex: 1;
    width: 100%;
}

.vs2-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
}

.vs2-dropdown {
    position: absolute;
    width: 100%;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 260px;
    overflow-y: auto;
    border-radius: 0 0 6px 6px;
    z-index: 9999;
    display: none;
}

.vs2-item {
    padding: 8px 10px;
    cursor: pointer;
}

.vs2-item:hover,
.vs2-item.active {
    background: #e0e0e0;
}

.vs2-loading {
    padding: 10px;
    text-align: center;
    font-style: italic;
    color: #666;
}

.vs2-no-results {
    padding: 10px;
    text-align: center;
    color: #999;
}

/* Le Wrapper Multi-select (simule la bordure de l'input) */
.vs2-multi-wrapper {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    background: #fff;
    cursor: text;
    min-height: 38px;
}

.vs2-multi-wrapper:focus-within {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

/* L'input réel en mode Multi doit être invisible (sans bordure) */
.vs2-mode-multi .vs2-input {
    border: none;
    outline: none;
    box-shadow: none;
    flex: 1;
    min-width: 60px; /* Espace minimum pour taper */
    padding: 4px;
    margin: 0;
}

/* Style des tags (Chips) */
.vs2-tag {
    background-color: #f0f0f1;
    border: 1px solid #dcdcde;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.vs2-tag-remove {
    cursor: pointer;
    font-weight: bold;
    color: #666;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vs2-tag-remove:hover {
    background-color: #dcdcde;
    color: #d63638;
}

#orientation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#orientation-overlay.visible {
    visibility: visible;
    opacity: 1;
}
.on-shopping-fullscreen {
    display: none;
}

/* Conteneur principal */
#emojiPicker {
    width: 100%;
    background: var(--ep-bg);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-family: system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Zone de recherche */
#emojiPicker #emojiSearch {
    width: 100%;
    padding: 12px;
    border: none;
    border-bottom: 1px solid var(--ep-border);
    background: var(--ep-bg);
    color: var(--ep-text);
    outline: none;
    font-size: 16px;
}
#emojiPicker #emojiSearch:focus {
    background: var(--ep-hover);
}

/* Barre des catégories (scroll horizontal) */
#emojiPicker #emojiCategories {
    display: flex;
    overflow-x: auto;
    padding: 8px;
    gap: 4px;
    border-bottom: 1px solid var(--ep-border);
    scrollbar-width: thin; /* Firefox */
}
#emojiPicker #emojiCategories::-webkit-scrollbar {
    height: 4px; /* Webkit */
}

/* Boutons de catégories */
#emojiPicker .cat-btn {
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    color: #64748b;
    transition: all 0.2s;
}
#emojiPicker .cat-btn:hover {
    background: var(--ep-hover);
    color: var(--ep-text);
}
#emojiPicker .cat-btn.active {
    background: var(--ep-accent);
    color: white;
}

/* Grille des emojis */
#emojiGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--ep-cell-size), 1fr));
    gap: 4px;
    padding: 8px;
    height: 300px; /* Hauteur fixe pour le scroll */
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Boutons Emojis */
#emojiGrid .emoji-btn {
    font-size: 24px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
}
#emojiGrid .emoji-btn:hover, .emoji-btn:focus {
    background-color: var(--ep-hover);
    outline: none;
}
/* Focus visible pour accessibilité */
#emojiGrid .emoji-btn:focus-visible {
    box-shadow: 0 0 0 2px var(--ep-accent);
}

/* Message "Pas de résultat" */
#emojiGrid .no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 14px;
}
