@charset "utf-8";
		:root { --primary: #722F37; --secondary: #c5a059; --bg-color: #f4f6f8; --bg-card: #ffffff; --text-dark: #1a202c; --text-light: #718096; --border-color: #e2e8f0; --input-bg: #f8fafc; --shadow-color: rgba(0, 0, 0, 0.1); }
        [data-theme="dark"] { --primary: #8e3f49; --secondary: #d4b57a; --bg-color: #121418; --bg-card: #1e2229; --text-dark: #e2e8f0; --text-light: #a0aec0; --border-color: #2d3748; --input-bg: #2d3748; --shadow-color: rgba(0, 0, 0, 0.5); }
        body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-dark); margin: 0; padding-bottom: 20px; transition: background-color 0.3s, color 0.3s; }
        
        #publicModeBanner { display: none; background: var(--secondary); color: white; text-align: center; padding: 8px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; position: sticky; top: 0; z-index: 1001; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
        
        header { background: var(--bg-card); padding: 12px 20px; text-align: center; position: sticky; top: 0; z-index: 1000; box-shadow: 0 1px 3px var(--shadow-color); border-top: 4px solid var(--primary); display: flex; justify-content: space-between; align-items: center; transition: background-color 0.3s; }
        .header-logo-container { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-grow: 1; }
        .header-logo { height: 32px; object-fit: contain; }
        .header-subtitle { font-family: 'Montserrat', sans-serif; font-size: 0.65rem; font-weight: 700; color: var(--primary); text-transform: uppercase; margin-top: 2px; letter-spacing: 0.5px; }
        .header-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--primary); padding: 5px; }
        
        #authScreen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-color); z-index: 5000; display: none; flex-direction: column; justify-content: center; align-items: center; padding: 20px; box-sizing: border-box; }
        .auth-card { background: var(--bg-card); padding: 30px; border-radius: 20px; box-shadow: 0 4px 6px -1px var(--shadow-color); width: 100%; max-width: 350px; text-align: center; transition: all 0.3s; }
        .auth-logo { width: 180px; height: auto; margin: 0 auto 20px; display: block; }
        .auth-card h2 { font-family: 'Montserrat', sans-serif; color: var(--primary); margin-bottom: 20px; font-size: 1.2rem; }
        .auth-input { width: 100%; padding: 12px; border: 1px solid var(--border-color); background: var(--input-bg); color: var(--text-dark); border-radius: 8px; box-sizing: border-box; font-family: 'Inter', sans-serif; font-size: 1rem; }
        .input-group { position: relative; margin-bottom: 15px; width: 100%; }
        .input-group .auth-input { padding-right: 40px; margin-bottom: 0; }
        .password-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--text-light); font-size: 1.2rem; user-select: none; }
        .auth-btn { width: 100%; padding: 12px; background: var(--primary); color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 1rem; }
        .auth-links { margin-top: 15px; display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; }
        .auth-link { color: var(--text-light); cursor: pointer; text-decoration: underline; }
        
        #appContent { display: none; }
        .container { padding: 15px; max-width: 600px; margin: 0 auto; }
        .search-container { position: relative; margin-bottom: 20px; }
        input.search-bar { width: 100%; padding: 14px 20px 14px 45px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-dark); outline: none; box-sizing: border-box; }
        .search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); opacity: 0.4; color: var(--text-dark); }
        .location-group { margin-bottom: 10px; }
        .location-header { font-family: 'Montserrat', sans-serif; font-size: 1rem; font-weight: 700; color: var(--secondary); margin: 25px 0 10px 5px; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--border-color); padding-bottom: 5px; cursor: pointer; user-select: none; }
        .loc-icon { font-size: 0.8rem; color: var(--secondary); transition: transform 0.3s ease; }
        .wine-card { background: var(--bg-card); border-radius: 16px; padding: 16px 16px 16px 24px; margin-bottom: 16px; box-shadow: 0 4px 6px -1px var(--shadow-color); position: relative; overflow: hidden; border: 1px solid var(--border-color); display: flex; flex-direction: column; transition: all 0.3s ease; }
        .wine-card.out-of-stock { opacity: 0.7; background-color: var(--bg-color); border: 1px dashed var(--border-color); }
        .wine-card.out-of-stock .wine-img, .wine-card.out-of-stock .wine-placeholder { filter: grayscale(1); opacity: 0.6; }
        .color-strip { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
        .bg-Rouge { background-color: #922B21; } .bg-Blanc { background-color: #F4D03F; } .bg-Rosé { background-color: #F5B7B1; } .bg-Pétillant { background-color: #D7BDE2; } .bg-Digestif { background-color: #F9E79F; }
        .wine-compact { display: flex; align-items: center; gap: 12px; cursor: pointer; }
        .expand-icon { color: var(--text-light); font-size: 0.9rem; transition: transform 0.3s ease; margin-left: 5px; flex-shrink: 0; }
        .wine-expanded { margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--border-color); display: none; }
        .wine-img-container { width: 60px; height: 80px; flex-shrink: 0; margin: 0; }
        .wine-titles-block { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 80px; }
        .wine-img, .wine-placeholder { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; background-color: var(--input-bg); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
        .wine-placeholder.bg-Rouge { background: #fee2e2; } .wine-placeholder.bg-Blanc { background: #fef3c7; }
        .wine-domaine { font-size: 0.75rem; text-transform: uppercase; color: var(--text-light); font-weight: 700; margin-bottom: 2px; }
        .wine-nom { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.1rem; line-height: 1.2; color: var(--text-dark); margin-bottom: 4px; }
        .wine-appellation-row { font-family: 'Montserrat', sans-serif; font-size: 0.85rem; color: var(--secondary); font-weight: 600; display: flex; align-items: center; gap: 4px; }
        .wine-details-block { display: flex; flex-direction: column; gap: 2px; }
        .wine-details-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
        .detail-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--input-bg); border: 1px solid var(--border-color); padding: 4px 8px; border-radius: 8px; font-size: 0.8rem; color: var(--text-light); font-weight: 500; }
        .dot-color { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,0.1); }
        .wine-cepage-row, .wine-accords { font-size: 0.85rem; color: var(--text-light); margin-bottom: 6px; display: flex; align-items: flex-start; gap: 6px; font-weight: 500; line-height: 1.4; }
        .wine-accords { font-size: 0.75rem; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; width: 100%; box-sizing: border-box; }
        .accord-badge { background: var(--secondary); color: white; padding: 4px 8px; border-radius: 6px; font-weight: 600; }
        .card-toolbar { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; width: 100%; }
        .stock-pill { display: flex; align-items: center; background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 20px; padding: 2px; }
		.btn-qty-h { width: 26px; height: 26px; border-radius: 50%; border: none; background: var(--bg-card); color: var(--text-dark); font-weight: 700; cursor: pointer; box-shadow: 0 1px 2px var(--shadow-color); display: flex; align-items: center; justify-content: center; padding: 0; font-size: 1rem; }
        .qty-val-h { min-width: 24px; text-align: center; font-weight: 700; color: var(--primary); font-size: 0.9rem; }
        .wine-card.out-of-stock .qty-val-h { color: var(--text-light); }
        .actions-row { display: flex; gap: 8px; margin-left: auto; }
        .tags-container { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; padding: 8px; background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 10px; margin-top: 5px; }
        .tag-pill { background: var(--border-color); color: var(--text-dark); padding: 4px 10px; border-radius: 15px; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; font-weight: 500; }
        .tag-remove { cursor: pointer; color: var(--text-light); font-weight: bold; font-size: 1rem; line-height: 1; margin-left: 2px; }
        .btn-add-tag { background: var(--primary); color: white; border: none; border-radius: 8px; width: 44px; font-size: 1.2rem; font-weight: bold; cursor: pointer; flex-shrink: 0; }
        
        .accord-chip { padding: 5px 12px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; font-size: 0.85rem; cursor: pointer; user-select: none; transition: all 0.2s; white-space: nowrap; }
        .accord-chip:hover { border-color: var(--secondary); }
        .accord-chip.selected { background: var(--secondary); color: white; border-color: var(--secondary); font-weight: 600; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
        .tag-pill.accord-pill { background: var(--secondary); color: white; border: none; }
        .tag-pill.accord-pill .tag-remove { color: rgba(255,255,255,0.8); }

		.app-footer { position: fixed; bottom: 0; left: 0; width: 100%; text-align: center; padding: 8px 0; background: var(--bg-card); color: var(--text-light); font-size: 0.75rem; z-index: 800; border-top: 1px solid var(--border-color); box-shadow: 0 -2px 10px var(--shadow-color); transition: background-color 0.3s; }
        .app-footer b { color: var(--primary); }
        .app-footer.auth-mode { position: absolute; bottom: 20px; padding-bottom: 0; width: 100%; }
        
/* Conteneur des boutons flottants */
        .fab-container { position: fixed; bottom: 25px; right: 25px; display: flex; flex-direction: column; gap: 10px; z-index: 900; align-items: flex-end; }
        
        .fab-btn { width: 56px; height: 56px; background: var(--primary); color: white; border-radius: 16px; border: none; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s, background-color 0.2s; }
        .fab-btn:active { transform: scale(0.95); }
        .fab-secondary { background: var(--bg-card); color: var(--primary); border: 2px solid var(--primary); width: 48px; height: 48px; border-radius: 50%; }
        
        /* Menu Extras */
        .extras-menu { position: fixed; bottom: 90px; right: 25px; background: var(--bg-card); border-radius: 16px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.4); display: flex; flex-direction: column; overflow: hidden; transform: scale(0); transform-origin: bottom right; opacity: 0; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 890; border: 1px solid var(--border-color); }
        .extras-menu.open { transform: scale(1); opacity: 1; }
        .extras-item { background: transparent; border: none; padding: 15px 20px; text-align: left; font-family: 'Inter', sans-serif; font-weight: 600; color: var(--text-dark); border-bottom: 1px solid var(--border-color); cursor: pointer; display: flex; align-items: center; gap: 10px; font-size: 0.95rem; transition: background 0.2s; white-space: nowrap; }
        .extras-item:last-child { border-bottom: none; }
        .extras-item:hover { background: var(--input-bg); }
        .extras-item span { font-size: 1.2rem; }
        

        #addModal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: 2000; justify-content: center; align-items: center; }
        .modal-content { background: var(--bg-card); padding: 24px; border-radius: 24px; width: 90%; max-width: 500px; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3); }
        .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
        .modal-header h2 { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--text-dark); font-size: 1.5rem; }
        .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .form-full { grid-column: span 2; }
        .form-group label { font-weight: 600; color: var(--text-dark); margin-bottom: 8px; font-size: 0.85rem; display: block; }
        .form-group input, .form-group select, .form-group textarea { background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 10px; padding: 14px; font-family: 'Inter', sans-serif; width: 100%; box-sizing: border-box; color: var(--text-dark); font-size: 0.95rem; }
        .form-group input:focus, .form-group select:focus, .form-group textarea:focus { background: var(--bg-card); border-color: var(--primary); outline: none; }
        .form-group textarea { resize: vertical; min-height: 80px; }
        
        .catalog-search-wrap { position: relative; margin-bottom: 15px; }
        #inCatalogSearch { border: 2px solid var(--secondary); background-color: var(--input-bg); font-weight: 600; }
        #inCatalogSearch::placeholder { font-weight: normal; color: var(--text-light); }
        .suggestions-box { position: absolute; top: 100%; left: 0; width: 100%; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; box-shadow: 0 4px 15px var(--shadow-color); z-index: 100; max-height: 250px; overflow-y: auto; display: none; margin-top: 5px; }
        .suggestion-item { padding: 12px 15px; border-bottom: 1px solid var(--border-color); cursor: pointer; display: flex; align-items: center; gap: 10px; }
        .suggestion-item:hover { background: var(--input-bg); }
        .sugg-img { width: 30px; height: 40px; object-fit: contain; background: var(--input-bg); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
        .sugg-text strong { color: var(--text-dark); display: block; }
        .sugg-text span { font-size: 0.75rem; color: var(--text-light); }
        
        .wine-comment { font-size: 0.85rem; color: var(--text-light); background: var(--input-bg); padding: 10px 14px; border-radius: 8px; border-left: 3px solid var(--secondary); margin-top: 10px; font-style: italic; line-height: 1.4; }
        
        .modal-actions { display: flex; gap: 10px; margin-top: 20px; }
        .btn-save { flex: 1; background: var(--primary); color: white; font-family: 'Montserrat', sans-serif; font-weight: 600; border-radius: 10px; padding: 14px; font-size: 1rem; border: none; cursor: pointer; }
        .btn-cancel { background: transparent; color: var(--text-light); border: 1px solid var(--border-color); padding: 12px; border-radius: 6px; font-family: 'Montserrat', sans-serif; font-weight: 600; cursor: pointer; }
        
        .image-modal { display: none; position: fixed; z-index: 3000; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.95); align-items: center; justify-content: center; }
        .modal-content-img { margin: auto; display: block; width: auto; height: auto; max-width: 90%; max-height: 80vh; border-radius: 5px; }
        .close-img { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; cursor: pointer; }
		
		/* FOOTER */
		.footer-gnatus {
			text-align: center;
			font-size: 0.75rem;
			color: var(--text-light);
			padding: 20px 0 90px 0; /* Laisse la place aux boutons */
			width: 100%;
			margin-top: auto; /* Le pousse tout en bas même si la liste est vide */
			pointer-events: none; /* Ne bloquera JAMAIS les clics */
			position: relative;
			z-index: 1;
		}

/* --- CORRECTION CLAVIER MOBILE (Accents) --- */
input, 
textarea, 
[contenteditable="true"] {
    -webkit-user-select: auto !important;
    user-select: auto !important;
    /* Force le clavier à ne pas "avaler" les accents */
}

/* --- PASTILLES NOTIFICATIONS FORUM --- */
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background-color: #e53e3e;
    border-radius: 50%;
    border: 2px solid var(--primary);
    display: none; /* Masqué par défaut */
}

.menu-badge {
    display: none; /* Masqué par défaut */
    background-color: #e53e3e;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: bold;
    text-transform: uppercase;
}