/* --- style_admin.css --- */
:root
{
    --primary: #ff4081;         
    --primary-hover: #e91e63;
    --gold: #C29B40;   
    --bg-page: #121212;       
    --bg-card: #1e1e1e;       
    --bg-input: #2c2c2c;      
    --bg-header: rgba(0, 0, 0, 0.9);
    --border-soft: rgba(255, 255, 255, 0.1);
    --border-medium: #444444;
    --text-white: #ffffff;
    --text-gray: #888888;
    --text-dark: #2c3e50;
    --sidebar-width: 260px;
}
/* On force l'utilisation des variables dynamiques */
body, .admin-wrapper, .main-content, .admin-body-bg { background-color: var(--bg-page) !important; }

/* ... tes styles login inchangés ... */
.login-body { background: var(--bg-page); display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; font-family: 'Montserrat', sans-serif; }
.login-box { background: var(--bg-card); padding: 40px; border-radius: 25px; box-shadow: 0 15px 35px rgba(0,0,0,0.5); border: 1px solid var(--border-soft); text-align: center; }
.login-box button { width: 100%; padding: 15px; background: var(--primary); border: none; border-radius: 10px; color: var(--text-white); font-weight: bold; text-transform: uppercase; cursor: pointer; transition: transform 0.2s; }

/* Boutons et Badges dynamiques */
.badge-pink { background-color: var(--primary); color: var(--text-white); box-shadow: 0 0 10px var(--primary-soft); }
.btn-save-final { background: var(--primary); color: var(--text-white); border: none; padding: 15px 40px; border-radius: 30px; font-weight: bold; cursor: pointer; box-shadow: 0 4px 15px var(--primary-soft); transition: 0.3s; }
.btn-save-final:hover { transform: scale(1.05); filter: brightness(1.1); }

.stat-number { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); margin: 5px 0; } 


.login-container { width: 100%; max-width: 400px; padding: 20px; }
.login-box h2 { color: var(--text-white); margin-bottom: 30px; text-transform: uppercase; letter-spacing: 2px; }
.login-box input { width: 100%; padding: 12px; margin-bottom: 20px; background: var(--bg-input); border: 1px solid #444; border-radius: 8px; color: var(--text-white); }
.login-box button:hover { transform: scale(1.02); }
.error-msg { background: rgba(255, 0, 0, 0.2); color: #ff5252; padding: 10px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem; }
.login-footer { margin-top: 20px; }
.login-footer a { color: #888; text-decoration: none; font-size: 0.8rem; }
/* --- COMPLÉMENTS SIDEBAR --- */
.sidebar h2 { color: var(--primary); text-align: center; padding: 0 20px 30px; font-size: 1.4rem; text-transform: uppercase; letter-spacing: 2px; }
/* Badge pour les messages non lus */
.badge { padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: bold; margin-left: 10px; }
/* Style spécifique pour le lien déconnexion */
.btn-logout { color: #ff5252 !important; transition: 0.3s; }
.btn-logout:hover { background: rgba(255, 82, 82, 0.1) !important; border-left-color: #ff5252 !important; }
.sidebar-menu { list-style: none; padding: 0; margin: 0; }
.sidebar-menu li { list-style-type: none; }
.sidebar-menu a { text-decoration: none; display: block; padding: 12px 25px; color: #888; }
.admin-wrapper { display: flex; min-height: 100vh; background: var(--bg-page); }
/* --- STRUCTURE GLOBALE --- */
.admin-wrapper { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: #1a1a1a; color: var(--text-white); position: fixed; height: 100%; overflow-y: auto; }
/*.main-content { padding-left: 40px; }*/
.main-content { flex: 1; margin-left: 260px; padding: 30px; background: var(--bg-page); min-height: 100vh; color: var(--text-white); box-sizing: border-box; }
.config-grid-system { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; margin-bottom: 100px; }
.config-section-card { background: var(--bg-card); border-radius: 12px; border: 1px solid #333; display: flex; flex-direction: column; }
.config-section-card.highlight { border-color: var(--primary); }
.card-title { padding: 15px 20px; border-bottom: 1px solid #333; color: var(--primary); font-weight: bold; text-transform: uppercase; font-size: 0.85rem; }
.card-content { padding: 20px; }
.input-row { display: flex; gap: 15px; margin-bottom: 15px; }
.input-group { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.input-group.full-width { width: 100%; margin-bottom: 15px; }
.input-group label { font-size: 0.8rem; color: #888; }
.input-group input { background: #2a2a2a; border: 1px solid #444; color: var(--text-white); padding: 10px; border-radius: 6px; width: 100%; box-sizing: border-box; }
.qr-box { display: flex; align-items: center; gap: 20px; background: #252525; padding: 15px; border-radius: 8px; }
.qr-img { width: 80px; background: var(--text-white); padding: 5px; border-radius: 4px; }
.btn-change-qr { background: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 8px 12px;  border-radius: 5px; cursor: pointer; font-size: 0.8rem; }
.footer-actions { position: fixed; bottom: 0; left: 260px; right: 0; padding: 20px; background: rgba(18, 18, 18, 0.95); border-top: 1px solid #333; display: flex; justify-content: center; }
.admin-header h1 { font-size: 1.8rem; color: var(--text-dark); margin-bottom: 5px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; margin-top: 30px; }
.stat-card { background: #4a4a4a; padding: 25px; border-radius: 15px; display: flex; align-items: center; gap: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); border: 1px solid #333; transition: transform 0.3s ease; }
.stat-card:hover { transform: translateY(-5px); }
.stat-icon { font-size: 2.5rem; background: #fff0f5; width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.stat-details p { margin: 0; color: var(--text-white); text-transform: uppercase; font-size: 0.8rem; font-weight: 600; letter-spacing: 1px; }
.stat-details small { color: #bbb; }
h1, h2, h3, .stat-number { font-family: 'Montserrat', sans-serif; font-weight: 700; }
/* --- HEADER DE PAGE --- */
.content-header-flex { display: flex; justify-content: space-between; align-items: flex-end; max-width: 900px; }
.btn-add-pro { background: var(--primary); color: var(--text-white); text-decoration: none; padding: 12px 25px; border-radius: 10px; font-weight: 600; box-shadow: 0 4px 15px var(--primary-soft); transition: 0.3s; }
.card-table { background: #545b62; border-radius: 15px; padding: 10px; box-shadow: 0 8px 20px rgba(0,0,0,0.15); overflow: hidden; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 15px 20px; color: #ecf0f1; font-size: 0.85rem; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-table td { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-white); vertical-align: middle; }
.td-ordre { font-weight: bold; color: #bdc3c7; }
.presta-name { font-weight: 600; color: var(--text-dark); }
.td-prix { font-weight: 700; color: var(--primary); }
.status-pill { padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.pill-active { background: #eafff0; color: #27ae60; }
.pill-inactive { background: #fff0f0; color: #e74c3c; }
.actions-group { display: flex; gap: 10px; justify-content: flex-end; }
.btn-edit-small { background: rgba(255,255,255,0.9); color: #5d6d7e; padding: 8px 15px; border-radius: 6px; text-decoration: none; font-size: 0.8rem; font-weight: 600; border: none; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: 0.2s; }
.btn-edit-small:hover { opacity: 1; filter: grayscale(0); background: #f8f9fa; border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.btn-del-small { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; background: #fff5f5; border: 1px solid #fed7d7; border-radius: 8px; text-decoration: none; font-size: 1.1rem; transition: all 0.2s ease; filter: grayscale(1); opacity: 0.5; cursor: pointer; }
.btn-del-small:hover { opacity: 1; filter: grayscale(0) sepia(100%) hue-rotate(-50deg) saturate(300%); background: #fff5f5; border-color: #f56565; transform: scale(1.1); }
/* --- MINIATURES DES PRESTATIONS --- */
.presta-thumbnail-container { position: relative; width: 64px; height: 64px; }
.presta-thumb { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid #e1e8ed; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.order-badge { position: absolute; bottom: -5px; right: -5px; background: var(--text-dark); color: var(--text-white); font-size: 0.65rem; padding: 2px 5px; border-radius: 4px; font-weight: 600; border: 1px solid rgba(255,255,255,0.2); }
.status-overlay { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.4); border-radius: 10px; align-items: center; justify-content: center; font-size: 1.5rem; z-index: 2; }
.is-inactive .status-overlay { display: flex; }
.is-inactive .presta-thumb { filter: grayscale(1) opacity(0.6); border-color: #ff5252; }
.is-inactive .order-badge { background: #e74c3c; }
/* --- FORMULAIRE PRO --- */
.card-form-pro { background: #4a4a4a; padding: 30px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); color: var(--text-white); max-width: 900px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.full-width { grid-column: span 2; }
.form-group label { font-size: 0.85rem; color: #999; font-weight: 600; display: block; margin-bottom: 8px; }
.form-group input[type="text"], .form-group input[type="number"], .form-group textarea { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 8px; font-family: inherit; transition: 0.3s; }
.form-group input:focus { border-color: var(--primary); outline: none; background: #333; box-shadow: 0 0 0 3px rgba(255, 64, 129, 0.1); }
/* Photo Preview */
.upload-preview-container { display: flex; align-items: center; gap: 15px; }
.img-preview { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 2px solid #f3f4f6; }
/* --- SWITCH DESIGN --- */
.checkbox-pro { display: flex; align-items: center; gap: 15px; margin-top: 10px; background: rgba(255, 255, 255, 0.05); padding: 15px; border-radius: 10px; border: 1px solid var(--border-soft); }
.checkbox-pro span { color: var(--text-white); font-size: 0.9rem; }
.switch { position: relative; display: inline-block; width: 50px; 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: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 3px; background-color: var(--text-white); transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #27ae60; }
input:checked + .slider:before { transform: translateX(26px); }
.form-actions-bar { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border-soft); text-align: right; }
.header-form-container { max-width: 900px; margin: 0 0 30px 0; }
.btn-retour-pro { background: var(--text-dark); color: var(--text-white); text-decoration: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; transition: 0.3s; }
.btn-retour-pro:hover { background: #1a252f; transform: translateX(-5px); }
/* --- SPECIFIQUE MESSAGES --- */
.msg-unread-row { background: rgba(255, 64, 129, 0.05); border-left: 4px solid var(--primary); }
.msg-read-row { opacity: 0.8; }
.td-date { font-size: 0.85rem; color: #bbb; }
.sender-name { font-weight: 600; color: var(--text-white); margin-bottom: 2px; }
.sender-email { font-size: 0.8rem; color: var(--primary); }
.sender-tel { font-size: 0.75rem; color: #888; }
.subject-text { font-weight: 500; color: #eee; }
.msg-preview { color: #aaa; font-style: italic; font-size: 0.85rem; }
.highlight-pink { color: var(--primary); font-weight: bold; font-size: 1.2rem; }
.btn-check-small { background: #27ae60; color: var(--text-white); width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; border-radius: 8px; text-decoration: none; transition: 0.3s; }
.btn-check-small:hover { background: #2ecc71; transform: scale(1.1); }
.empty-msg { text-align: center; padding: 50px; color: #666; font-style: italic; }
.txt-right { text-align: right; }
/* --- VIEW MESSAGE & CHAT DESIGN --- */
.view-msg-container { max-width: 900px; margin-top: 20px; }
.chat-bubble { background: var(--bg-card); border-radius: 20px; padding: 25px; margin-bottom: 40px; border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 10px 30px rgba(0,0,0,0.2); position: relative; }
.bubble-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 15px; }
.sender-info { display: flex; gap: 15px; align-items: center; }
.sender-avatar { width: 45px; height: 45px; background: var(--primary); color: var(--text-white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.2rem; }
.msg-subject { font-size: 1.4rem; color: #fff; margin: 0; }
.msg-meta { font-size: 0.9rem; color: #888; margin: 5px 0 0; }
.msg-date { font-size: 0.8rem; color: #666; }
.bubble-content { line-height: 1.6; color: #eee; font-size: 1.05rem; padding: 10px 0; }
.bubble-footer { margin-top: 15px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,0.1); font-size: 0.85rem; color: var(--primary); }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.templates-pills { display: flex; gap: 12px; margin-bottom: 15px; }
.pill { background: #2a2a2a; border: 1px solid #444; color: var(--text-white); padding: 8px 16px; border-radius: 20px; cursor: pointer; font-size: 0.85rem; font-weight: 500; transition: all 0.3s ease; display: flex; align-items: center; gap: 6px; }
.pill:hover { background: var(--primary); border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255, 64, 129, 0.3); color: var(--text-white); }
.pill:active { transform: translateY(0); }
.chat-bubble.sent { margin-left: auto; background: var(--bg-card); border-right: 4px solid var(--primary); border-left: none; text-align: right; }
.chat-bubble.sent .bubble-header { flex-direction: row; }
/* --- CONFIGURATION PRO --- */
.admin-body-bg { background-color: var(--bg-page); color: #eee; }
.config-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 25px; margin-bottom: 100px; }
.config-card { background: var(--bg-card); border-radius: 15px; border: 1px solid #333; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.highlight-card { border: 1px solid rgba(255, 64, 129, 0.3); }
.card-header { background: #252525; padding: 15px 20px; font-weight: 700; color: var(--primary); border-bottom: 1px solid #333; text-transform: uppercase; font-size: 0.9rem; }
.card-body { padding: 20px; }
.form-row { display: flex; gap: 20px; margin-bottom: 15px; }
.form-group { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.flex-3 { flex: 3; }
.flex-1 { flex: 1; }
.form-group input { background: var(--bg-input); border: 1px solid #444; color: #fff; padding: 12px; border-radius: 8px; font-size: 0.95rem; transition: 0.3s; }
.qr-management { display: flex; align-items: center; gap: 25px; background: #252525; padding: 15px; border-radius: 12px; margin-top: 10px; }
.qr-preview-large { width: 100px; height: 100px; background: var(--text-white); padding: 5px; border-radius: 8px; }
.input-file-hidden { display: none; }
.btn-outline-small { padding: 8px 15px; border: 1px solid var(--primary); color: var(--primary); border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-weight: 600; }
.sticky-actions { position: fixed; bottom: 20px; left: 270px; right: 20px; z-index: 100; }
.btn-save-large { width: 100%; background: var(--primary); color: var(--text-white); border: none; padding: 18px; border-radius: 12px; font-weight: 700; font-size: 1.1rem; cursor: pointer; box-shadow: 0 5px 25px rgba(255, 64, 129, 0.4); transition: 0.3s; }
.btn-save-large:hover { transform: translateY(-3px); filter: brightness(1.1); }
.alert-success-pro { background: rgba(39, 174, 96, 0.2); color: #2ecc71; padding: 15px; border-radius: 10px; margin-bottom: 25px; border: 1px solid #27ae60; }
.alert-msg { padding: 15px; border-radius: 10px; margin-bottom: 20px; max-width: 900px; }
.alert-success { background: rgba(39, 174, 96, 0.2); color: #2ecc71; border: 1px solid #27ae60; }
.alert-error { background: rgba(231, 76, 60, 0.2); color: #e74c3c; border: 1px solid #e74c3c; }
#reponse_texte { background: var(--bg-input); border: 1px solid #444; color: var(--text-white); padding: 15px; font-size: 1rem; }
/* --- RESPONSIVE ADMIN --- */
/* Pour les tablettes et mobiles */
@media (max-width: 768px)
{
	.login-container { padding: 10px; max-width: 90%; }
	.login-box { padding: 30px 20px; border-radius: 20px; }
	.login-box h2 { font-size: 1.4rem; }
	.admin-grid { grid-template-columns: 1fr; }
	.main-content { margin-left: 0 !important; padding: 15px; }
	.sidebar { width: 100%; height: auto; position: relative; padding: 10px; }
}