@font-face { font-family: "PoppinsR"; src: url("../fonts/Poppins-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "PoppinsB"; src: url("../fonts/Poppins-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

* { box-sizing: border-box; margin: 0; padding: 0; font-family: "PoppinsR", sans-serif; font-weight: 400; -webkit-tap-highlight-color: transparent; }
*, *::before, *::after { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
input, textarea { -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text; }

html, body { height: 100vh; height: 100dvh; width: 100vw; overflow: hidden; background-color: #ffffff; color: #1E2B50; }

.app-container { display: flex; flex-direction: column; justify-content: space-between; align-items: center; height: 100%; width: 100%; max-width: 520px; margin: 0 auto; padding: 0; text-align: center; }

/* Header */
.header { width: 100%; background-color: #F1F1F1; padding: 12px 16px; display: flex; justify-content: flex-start; align-items: center; gap: 1rem;height:70px;}
.btn-back-header {margin-left:auto;border:1px solid #888888;border-radius:5px;display: flex; align-items: center; justify-content: center; text-decoration: none; padding: 12px;color: inherit; font-size: 0.85rem; font-family: 'PoppinsB', sans-serif;aspect-ratio: 1/1;}
.logo-img { height: 40px; width: auto; object-fit: contain; }
.title-group { text-align: left; }
.title-group h1 { font-family: "PoppinsB", sans-serif; font-size: 1.15rem; color: #1E2B50; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.5px; padding-top: 0; }
.title-group p { font-size: 0.85rem; color: #666666; margin-top: 2px; }

/* Section Scanner */
.scanner-section {overflow:auto;display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; flex: 1; margin: 8px 0; gap: 12px; padding: 0 16px; }
.scan-area { width: 100%; max-width: 340px; height: 300px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background-color: #fafafa; position: relative; overflow: hidden; }
.info-scan{padding:1rem 0.25rem;font-family: "PoppinsB", sans-serif; font-size: 1.15rem; color: #1E2B50; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.5px;}
#reader { width: 100% !important; height: 100% !important; border: none !important; }
#reader video { width: 100% !important; height: 100% !important; object-fit: cover !important; border-radius: 13px; }
#reader__scan_region { width: 100% !important; height: 100% !important; display: flex; align-items: center; justify-content: center; }
#reader__dashboard { display: none !important; }
.search-input-group { display: flex; flex-direction: column; gap: 20px; width: 100%; margin-bottom: 12px; }
.search-results-area { max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; width: 100%; margin-bottom: 12px; }
.search-result-item { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 16px; border-radius: 8px; border: 1px solid #cbd5e1; background: #ffffff; cursor: pointer; text-decoration: none; color: inherit; width: 100%; box-sizing: border-box; }
.search-result-item.valid { border-color: #2cbb36; background-color: #eaf5eb; color: #1e2b50; }
.search-result-item.empty { border-color: #f87171; background-color: #fee2e2; color: #dc2626; font-weight: 600; cursor: default; }
.company-name { font-family: 'PoppinsB', sans-serif; font-size: 0.95rem; }
.company-sub { font-size: 0.75rem; color: #64748b; margin-top: 2px; }
/* Lisibilité de l'en-tête */
.result-company-title { font-family: 'PoppinsB', sans-serif; font-size: 1.1rem; color: #1e2b50; margin-bottom: 2px; }
.result-company-subtitle { font-size: 0.85rem; color: #334155; font-weight: 500; margin-bottom: 14px; opacity: 0.9; }

/* Conteneur de liste */
.presence-list { display: flex; flex-direction: column; gap: 8px; width: 100%; box-sizing: border-box;}

/* Bouton carte individuel */
.presence-btn { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: #ffffff; border: 1.5px solid #cbd5e1; border-radius: 10px; cursor: pointer; user-select: none; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

.presence-name { font-family: 'PoppinsB', sans-serif; font-size: 0.92rem; color: #1e293b; }

/* Badge d'état à droite */
.presence-badge { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; background: #f1f5f9; color: #94a3b8; font-size: 0.75rem; font-weight: 600; transition: all 0.2s ease; }

.check-icon { display: none; }

/* État SÉLECTIONNÉ / PRÉSENT */
.presence-btn.active { background: #f0fdf4; border-color: #2cbb36; box-shadow: 0 2px 6px rgba(44, 187, 54, 0.15); }
.presence-btn.active .presence-name { color: #14532d; }
.presence-btn.active .presence-badge { background: #2cbb36; color: #ffffff; }
.presence-btn.active .check-icon { display: block; }

.result-panel { width: 100%; max-width: 340px; display: none; text-align: center;user-select: none;}
.result-panel *{user-select: none;}
.result-panel .result-panel-inner{width:340px;min-height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:16px;}
.result-panel.valid .result-panel-inner{ background-color: #2cbb36; color: #ffffff;min-height:unset;}
.result-panel.invalid .result-panel-inner { background-color: #c62828; border: 2px solid #b71c1c; color: #ffffff; }
.result-status { font-size: 2rem; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: "PoppinsB", sans-serif; font-weight: 700; }
.result-detail {width:100%; font-size: 1.05rem; line-height: 1.5; }
.result-detail strong {color: #ffffff;font-family: "PoppinsB", sans-serif; font-weight: normal; }

/* Footer */
.footer { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px 12px 16px; }
.btn-primary { width: 100%; max-width: 300px; padding: 14px 20px; background-color: #1E2B50; color: #ffffff; border: none; border-radius: 25px; text-transform: uppercase; letter-spacing: 1px; font-size: 0.85rem; cursor: pointer; transition: opacity 0.2s; outline: none; font-family: "PoppinsB", sans-serif; font-weight: 700; }
.btn-secondary { width: 100%; max-width: 300px; padding: 14px 20px; background:linear-gradient(to right, #E10213, #E84912); color: #ffffff; border: none; border-radius: 25px; text-transform: uppercase; letter-spacing: 1px; font-size: 0.85rem; cursor: pointer; transition: opacity 0.2s; outline: none; font-family: "PoppinsB", sans-serif; font-weight: 700; }
.btn-big{padding:2rem 20px;max-width:100%;border-radius:3rem;font-size:1.15rem;text-decoration: none;}
.btn-primary:active { opacity: 0.85; }
.btn-reset { background: none; border: none; color: #888888; font-size: 0.8rem; text-decoration: underline; cursor: pointer; padding: 6px 12px; }
.btn-reset:hover { color: #1E2B50; }
.demo-trigger { display: flex; gap: 8px; margin-top: 4px; }
.btn-demo { padding: 4px 10px; font-size: 0.7rem; border-radius: 12px; border: 1px solid #ccc; background: #fff; color: #555; cursor: pointer; }

/* Formulaire de Connexion Exposant */
.login-section { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; flex: 1; padding: 0 24px; }
.login-form { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; text-align: left; gap: 6px; }
.form-group label { font-size: 0.85rem; color: #1E2B50; font-family: "PoppinsB", sans-serif; font-weight: normal; }
.form-input { width: 100%; padding: 14px 16px; border: 1px solid #E0E0E0; border-radius: 12px; font-size: 0.95rem; background-color: #FAFAFA; color: #1E2B50; outline: none; transition: border-color 0.2s, background-color 0.2s; }
.form-input:focus { border-color: #1E2B50; background-color: #FFFFFF; }
.error-message { background-color: #fde8e8; color: #c62828; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; text-align: center; border: 1px solid #f8b4b4; }
.login-submit { margin-top: 8px; width: 100%; }

/* Commande */
.order-content {width:100%;flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 24px;overflow:auto;}
.order-form { display: flex; flex-direction: column; gap: 20px;flex-grow: 1;}
.order-section { background: #ffffff; border-radius: 12px; padding: 16px; border:1px solid #E0E0E0; }
.section-title { font-family: 'PoppinsB', sans-serif; font-size: 1rem; color: #1e2b50; margin-top: 0; margin-bottom: 12px; border-bottom: 2px solid #f1f5f9; padding-bottom: 6px; }
.search-input-wrapper { display: flex; gap: 8px; }
.btn-search { white-space: nowrap; padding: 0 16px; }
.client-card { margin-top: 12px; padding: 12px; background: #eaf5eb; border: 1px solid #2cbb36; border-radius: 8px; }
.client-card-title { font-family: 'PoppinsB', sans-serif; font-size: 0.95rem; color: #1e2b50; }
.client-card-detail { font-size: 0.8rem; color: #475569; margin-top: 2px; }
.article-add-grid { display: flex; gap: 8px; margin-bottom: 12px; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.order-lines-container { margin-top: 16px; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.order-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.order-table th { background: #f8fafc; color: #475569; padding: 8px 12px; font-family: "PoppinsB", sans-serif; font-weight: normal; text-align: left; border-bottom: 1px solid #e2e8f0; }
.order-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; color: #1e293b; }
.empty-row td { color: #94a3b8; font-style: italic; padding: 16px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.btn-delete-line { background: none; border: none; color: #dc2626; cursor: pointer; font-weight: bold; padding: 4px 8px;display:inline-flex}
.form-textarea { resize: vertical; min-height: 80px; font-family: inherit; }
.order-actions { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.header-main-group { display: flex; align-items: center; gap: 12px; }
.header-back-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; padding: 8px 12px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 8px; color: inherit; font-size: 0.85rem; font-family: 'PoppinsB', sans-serif; }

/* Jeu */
.scanner-section-jeu .result-panel{flex-grow:1;padding-top:1rem;flex-direction: column;}
.scanner-section-jeu .result-panel.invalid .result-status{color:#dc2626;}
.scanner-section-jeu .result-panel.invalid .result-detail{color:#dc2626;}
.result-panel .result-panel-inner.result-panel-inner-jeu{width:340px;height:auto;min-height:unset;}
.result-panel.valid .result-panel-inner.result-panel-inner-jeu, .result-panel.invalid .result-panel-inner.result-panel-inner-jeu {background-color: transparent;border:0;}
#game-actions{margin-top: 20px; display: none; flex-direction: column; gap: 10px; align-items: center;}
.game-stats-container {width:100%; display: flex; flex-direction: column; gap: 12px; margin-top: 8px; align-items: center; }
.client-name { font-size: 1.15rem;color: #1E2B50; text-transform: uppercase; letter-spacing: 0.5px;font-family: "PoppinsB", sans-serif;}
.stats-grid { display: flex; justify-content: center; gap: 12px; width: 100%; }
.stat-box { background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 8px 12px; flex: 1; max-width: 134px; text-align: center; }
.stat-label { display: block; font-size: 0.75rem; color: #6c757d; text-transform: uppercase; margin-bottom: 2px; }
.stat-value { font-size: 1.1rem; font-weight: 600; color: #343a40; }
.stat-highlight { background: #eef2ff; border: 2px solid #1E2B50; border-radius: 10px; padding: 10px 16px; width: 100%; max-width: 280px; box-sizing: border-box; }
.stat-highlight .stat-label { color: #1E2B50; font-family: "PoppinsB", sans-serif; }
.stat-highlight .stat-value { font-size: 1.6rem; color: #1E2B50;font-family: "PoppinsB", sans-serif; }
.client-header-area { text-align: center; margin-bottom: 16px; }
.visites-badge { display: inline-block; margin-top: 6px; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem;font-family: "PoppinsB", sans-serif;}
.visites-badge.valid { background: #eaf5eb; color: #2cbb36; border: 1px solid #2cbb36; }
.visites-badge.pending { background: #fee2e2; color: #dc2626; border: 1px solid #f87171; }

.stats-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.stat-box-3 { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat-box-3.highlight { background: #eaf5eb;border: 1px solid #45d34e;}
.stat-icon { width: 35px; height: 35px; margin-bottom: 4px; }
.stat-value { font-family: 'PoppinsB', sans-serif; font-size: 1.2rem; color: #1e2b50; line-height: 1.1; }
.stat-label { font-size: 0.72rem; color: #64748b; margin-top: 2px; }
/* Popup */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(30, 43, 80, 0.95); z-index: 9999; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; }
.modal-card {display:flex;flex-direction:column;background: #ffffff; border-radius: 12px; padding: 24px; max-width: 400px; width: 100%; text-align: center; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);height:100%;}
.modal-title { margin-top: 0; font-family: 'PoppinsB', sans-serif; font-size: 1.2rem; color: #1e293b;margin-bottom:10px;}
.modal-client { font-size: 1rem; color: #475569; margin: 16px 0 24px 0; font-weight: 600; }
.modal-actions { display: flex; gap: 12px; flex-direction: column;flex-grow: 1;}
.btn-confirm { width: 100%;cursor: pointer; }
.btn-cancel { width: 100%; background: none; border: none; color: inherit; text-decoration: underline; cursor: pointer; padding: 8px;margin-top:auto;}
/* Commerciaux */
.dashboard-body { height: 100dvh; overflow: hidden; margin: 0; padding: 0; }
.dashboard-layout { display: flex; flex-direction: column; height: 100dvh; box-sizing: border-box; width: 100%; max-width: 100%; }

.dashboard-fixed-section { width: 100%; box-sizing: border-box; flex-shrink: 0; padding:1rem; }
.dashboard-scrollable-section { width: 100%; box-sizing: border-box; display: flex; flex-direction: column; flex: 1; overflow: hidden;padding:1rem;padding-top:0;}

.challenge-card { width: 100%; box-sizing: border-box; background: #ffffff; border: 1px solid #F1F1F1; border-radius: 12px; padding: 12px 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
.challenge-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.challenge-title { font-family: 'PoppinsB', sans-serif; font-size: 0.9rem; color: #1e2b50; }
.challenge-score { background: linear-gradient(90deg, #0B7FBB 0%, #57BEB1 100%); color: #fff; font-size: 0.72rem; padding: 2px 8px; border-radius: 12px;font-family: "PoppinsB", sans-serif; }

.goal-progress-wrapper { position: relative; width: 100%; box-sizing: border-box; height: 12px; background: #F1F1F1; border-radius: 10px; margin: 16px 0 12px 0; }
.goal-progress-bar { height: 100%; background: linear-gradient(90deg, #0B7FBB 0%, #57BEB1 100%); border-radius: 10px; transition: width 0.6s ease; }

.step-milestone { position: absolute; top: -5px; width: 22px; height: 22px; background: #ffffff; border: 2px solid #cbd5e1; border-radius: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; }
.step-milestone.reached { background: #dc2626; border-color: #f87171; }
.step-label { position: absolute; bottom: -18px; font-size: 0.68rem; color: #1E2B50;font-family: "PoppinsB", sans-serif; }
.step-milestone.reached .step-label { color: #dc2626; }

.tokens-stats-grid { width: 100%; box-sizing: border-box; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.token-box { width: 100%; box-sizing: border-box; background: #ffffff; border: 1px solid #F1F1F1; border-radius: 10px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.token-icon { width: 26px; height: 26px; }
.token-value { font-family: 'PoppinsB', sans-serif; font-size: 1rem; color: #1e2b50; line-height: 1; }
.token-label { font-size: 0.7rem; color: #64748b; display: block; }

.section-title-group { width: 100%; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.section-title-group h2{font-family: 'PoppinsB', sans-serif;font-size: 0.9rem;color: #1e2b50;}
.badge-count { background: #F1F1F1; color: #334155; font-size: 0.72rem; padding: 2px 8px; border-radius: 12px;font-family: "PoppinsB", sans-serif; }

.filter-pills { width: 100%; box-sizing: border-box; display: flex; gap: 0.5rem; margin: 0.5rem 0 0.5rem 0; overflow-x: auto; flex-shrink: 0; }
.pill-btn { background: #f1f5f9; border: 1px solid #cbd5e1; padding: 5px 10px; border-radius: 20px; font-size: 0.75rem; color: #475569; white-space: nowrap; cursor: pointer; }
.pill-btn.active { background: #1e2b50; color: #ffffff; border-color: #1e2b50; }

.portfolio-list { width: 100%; box-sizing: border-box; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 2px; }

.client-card { width: 100%; box-sizing: border-box; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 6px 10px; }
.client-card-main { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.client-info-area { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }

.client-title {text-align:left;font-family: 'PoppinsB', sans-serif; font-size: 0.82rem; color: #1e2b50; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-card-metrics { display: flex; align-items: center; gap: 10px; font-size: 0.72rem; color: #475569; }

.metric-group { color: #64748b; }
.metric-label { font-size: 0.68rem; color: #94a3b8; }

.status-tag { font-size: 0.65rem; padding: 1px 6px; border-radius: 4px; line-height: 1.2; }
.tag-present { background: #dcfce7; color: #15803d; }
.tag-absent { background: #f1f5f9; color: #64748b; }

.btn-info-text { background: #f1f5f9; border: 1px solid #cbd5e1; color: #1e2b50; font-family: 'PoppinsB', sans-serif; font-size: 0.7rem; padding: 4px 8px; border-radius: 4px; cursor: pointer; flex-shrink: 0; }
.btn-info-text:active { background: #1e2b50; color: #ffffff; border-color: #1e2b50; }
.detail-box { width: 100%; box-sizing: border-box; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; }
.detail-box h4 { font-family: 'PoppinsB', sans-serif; font-size: 0.85rem; color: #1e2b50; margin-bottom: 6px; }
.detail-grid { font-size: 0.82rem; color: #334155; display: flex; flex-direction: column; gap: 4px; }
.order-item-row { display: flex; justify-content: space-between; font-size: 0.8rem; padding: 4px 0; border-bottom: 1px dashed #cbd5e1; }

.footer-shadow{background:#F1F1F1;padding:1rem;}
.btn-logout{text-decoration: none;width:auto;padding-left:2rem;padding-right: 2rem;}


@media (min-width: 768px) { 
    html, body { background-color: #f4f5f7; display: flex; justify-content: center; align-items: center; } 
    .app-container { height: 90vh; max-height: 720px; background-color: #ffffff; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); overflow: hidden; } 
    .modal-card {height:auto;}
}

@media (min-width: 992px) { 
    html, body { background-color: #f4f5f7; display: flex; justify-content: center; align-items: center; } 
    .app-container { height: 90vh; max-height: 90%;max-width:990px;} 
    .result-panel .result-panel-inner, .result-panel, .result-panel .result-panel-inner.result-panel-inner-jeu{max-width:100%;width:100%;}
}


