:root {
    --vert-principal: #2E7D32;
    --vert-clair: #C8E6C9;
    --orange-bati: #FF6D00;
    --indigo-premium: #1A237E;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --bleu-titre: #1565C0;
    --bleu-equipe: #0277BD;
    --bleu-equipe-clair: #E1F5FE;
    --teal-visuel: #00695C;
    --teal-visuel-clair: #E0F2F1;
    --orange-rapport: #E65100;
    --orange-rapport-clair: #FFF3E0;
    --indigo-chat: #303F9F;
    --indigo-chat-clair: #E8EAF6;
    --rose-action: #C2185B;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }

/* SPLASH SCREEN PREMIUM */
#loader-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, #283593, #1A237E) !important;
    display: none; flex-direction: column; align-items: center; justify-content: center;
    z-index: 10000;
}
#loader-screen.active { display: flex; }
.loader-logo { font-size: 80px !important; display: block; filter: drop-shadow(0 0 10px rgba(255,109,0,0.5)); margin-bottom: 10px !important; }
.loader-title { color: white !important; font-size: 42px !important; font-weight: 800 !important; letter-spacing: 2px !important; margin-bottom: 15px !important; }
.loader-title span { color: var(--orange-bati); }
.loader-quote { color: white !important; font-size: 16px !important; font-weight: 400 !important; max-width: 80%; line-height: 1.4; min-height: 50px; margin-bottom: 30px !important; opacity: 0.9; }
.loader-bar-container { width: 200px !important; height: 4px !important; background: rgba(255,255,255,0.1) !important; border-radius: 10px !important; overflow: hidden; }
.loader-bar { height: 100% !important; background: var(--orange-bati) !important; box-shadow: 0 0 10px var(--orange-bati); }

/* LOGIN SCREEN PREMIUM */
#login-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://images.unsplash.com/photo-1541888946425-d81bb19480c5?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover; background-position: center;
    display: none; align-items: center; justify-content: center;
    z-index: 9999;
}
#login-screen.active { display: flex; }
.login-overlay {
    position: absolute; top:0; left:0; width:100%; height:100%;
    background: linear-gradient(135deg, rgba(26,35,126,0.9), rgba(46,125,50,0.8));
}
.login-card {
    position: relative; width: 90%; max-width: 400px;
    background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border); border-radius: 24px;
    padding: 40px 30px; text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    z-index: 2;
}
.login-card h1 { color: white; font-size: 32px; margin-bottom: 10px; font-weight: 800; }
.login-card h1 span { color: var(--orange-bati); }
.login-card p { color: rgba(255,255,255,0.7); font-size: 14px; margin-bottom: 30px; }

.form-group-premium { margin-bottom: 20px; text-align: left; }
.form-group-premium label { display: block; color: white; font-size: 13px; margin-bottom: 8px; margin-left: 5px; opacity: 0.9; }
.input-premium {
    width: 100%; padding: 15px; border-radius: 12px;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    color: white; font-size: 16px; outline: none; transition: 0.3s;
}
.input-premium:focus { border-color: var(--orange-bati); background: rgba(255,255,255,0.15); }

.btn-login-premium {
    width: 100%; padding: 16px; border-radius: 12px; border: none;
    background: linear-gradient(90deg, #FF6D00, #FF9100);
    color: white; font-size: 17px; font-weight: 700; cursor: pointer;
    transition: 0.3s; margin-top: 10px; box-shadow: 0 6px 20px rgba(255,109,0,0.4);
}

body {
    font-family: 'DM Sans', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.phone-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: white;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
@media (max-width: 480px) {
    .phone-container {
        max-width: 100%;
        box-shadow: none;
    }
}
.screen {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: white;
    box-sizing: border-box;
}
.screen.active { display: flex; position: relative; }
.slide-in { animation: slideIn 0.3s forwards; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* Headers */
.form-header {
    background: var(--bleu-titre);
    color: white;
    padding: 20px 20px 20px 20px;
    border-bottom: 2px solid rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.form-header.green { background: var(--vert-principal); }
.form-header.blue { background: linear-gradient(135deg, var(--bleu-equipe), #0288D1); }
.form-header.purple { background: linear-gradient(135deg, var(--violet-custom), #9C27B0); }
.form-header.teal { background: linear-gradient(135deg, var(--teal-visuel), #26A69A); }
.form-header.orange { background: linear-gradient(135deg, var(--orange-rapport), #FF8F00); }
.form-header.indigo { background: linear-gradient(135deg, var(--indigo-chat), #5C6BC0); }
.form-header h2 { margin-bottom: 5px; font-size: 22px; margin-left: 10px; }
.form-header p { font-size: 14px; opacity: 0.9; margin-left: 10px; }
.back-arrow {
    position: absolute;
    left: 20px;
    font-size: 24px;
    cursor: pointer;
    color: white;
    transition: transform 0.2s;
}
.back-arrow:hover { transform: translateX(-3px); }

.scroll-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 25px 20px;
    padding-bottom: 100px;
    background: var(--gris-fond);
}

/* App Bars */
.app-bar {
    background: linear-gradient(135deg, var(--vert-principal), #388E3C);
    color: white;
    padding: 15px 20px;
    padding-top: 25px;
    z-index: 10;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.app-bar.blue { background: linear-gradient(135deg, var(--bleu-equipe), #0288D1); }
.app-bar.teal { background: linear-gradient(135deg, var(--teal-visuel), #26A69A); }
.app-bar.orange { background: linear-gradient(135deg, var(--orange-rapport), #FF8F00); }
.app-bar.indigo { background: linear-gradient(135deg, var(--indigo-chat), #5C6BC0); }
.app-bar h1 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 24px; }

/* Form Elements */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #333; font-weight: 600; font-size: 14px; }
.form-control {
    width: 100%; padding: 15px; border: 2px solid #e0e0e0; border-radius: 8px;
    font-family: inherit; font-size: 16px; background: white; transition: all 0.2s;
}
.form-control:focus { border-color: var(--teal-visuel); outline: none; box-shadow: 0 0 0 3px rgba(0,137,123,0.1); }

/* Photo Grid */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 15px; }
.photo-card {
    position: relative; border-radius: 8px; overflow: hidden; background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08); aspect-ratio: 1; cursor: pointer; transition: transform 0.2s;
}
.photo-card:hover { transform: scale(1.02); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; }
.photo-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 30px 10px 10px; color: white;
}
.photo-overlay h4 { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.photo-badge {
    position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,0.6); color: white;
    padding: 4px 8px; border-radius: 8px; font-size: 10px; font-weight: 600; backdrop-filter: blur(4px);
}
.photo-delete {
    position: absolute; top: 8px; right: 8px; width: 28px; height: 28px;
    background: rgba(236, 64, 122, 0.9); border: none; border-radius: 50%; color: white;
    font-size: 14px; cursor: pointer; display: none; align-items: center; justify-content: center;
}
.photo-card:hover .photo-delete { display: flex; }

.upload-area {
    border: 3px dashed #ccc; border-radius: 16px; padding: 30px; text-align: center;
    background: #fafafa; transition: all 0.2s; cursor: pointer;
}
.upload-area:hover { border-color: var(--teal-visuel); background: var(--teal-visuel-clair); }
.upload-area .icon { font-size: 48px; margin-bottom: 12px; }

.camera-buttons { display: flex; gap: 10px; margin-top: 15px; }
.camera-btn {
    flex: 1; padding: 14px; border: 2px solid #e0e0e0; background: white; border-radius: 8px;
    cursor: pointer; font-weight: 600; font-size: 13px; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.camera-btn:hover { border-color: var(--teal-visuel); background: var(--teal-visuel-clair); }
.camera-btn.primary { background: linear-gradient(135deg, var(--teal-visuel), #26A69A); border-color: transparent; color: white; }

.image-preview { width: 100%; border-radius: 8px; margin-top: 15px; display: none; }
.image-preview.show { display: block; }

.date-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.date-display { background: white; padding: 10px 16px; border-radius: 8px; font-weight: 600; color: #333; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.date-nav { display: flex; gap: 8px; }
.date-nav button { width: 40px; height: 40px; border: none; background: white; border-radius: 10px; font-size: 18px; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.date-nav button:hover { background: var(--teal-visuel-clair); }

/* Corps Filter */
.corps-filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 15px; }
.corps-filter::-webkit-scrollbar { display: none; }
.corps-filter-btn {
    padding: 8px 14px; border: 2px solid #e0e0e0; background: white; border-radius: 20px;
    font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.corps-filter-btn.active { background: var(--teal-visuel-clair); border-color: var(--teal-visuel); color: var(--teal-visuel); }
.corps-filter-btn.custom { border-color: var(--violet-custom); }
.corps-filter-btn.custom.active { background: var(--violet-custom-clair); color: var(--violet-custom); }

/* Summary */
.summary-card { background: linear-gradient(135deg, var(--teal-visuel-clair), #B2DFDB); border-radius: 8px; padding: 18px; margin-bottom: 20px; }
.summary-card h3 { font-size: 12px; color: var(--teal-visuel); margin-bottom: 12px; text-transform: uppercase; font-weight: 600; }
.summary-stats { display: flex; justify-content: space-around; text-align: center; }
.summary-stat .num { font-size: 32px; font-weight: 700; color: #004D40; font-family: 'Space Grotesk', sans-serif; }
.summary-stat .label { font-size: 11px; color: #00695C; margin-top: 4px; }

/* Action Bar */
.action-bar {
    position: absolute; bottom: 0; left: 0; right: 0; background: white;
    padding: 15px 20px 25px 20px; display: flex; gap: 10px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05); z-index: 50; flex-shrink: 0;
}
.btn-back { flex: 1; padding: 15px; background: #E0E0E0; color: #555; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.btn-back:hover { background: #d0d0d0; }
.btn-next { flex: 2; padding: 15px; background: var(--bleu-titre); color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; font-family: inherit; box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3); transition: all 0.2s; }
.btn-next:hover { transform: translateY(-2px); }
.btn-next.green { background: var(--vert-principal); }
.btn-next.blue { background: linear-gradient(135deg, var(--bleu-equipe), #0288D1); }
.btn-next.purple { background: linear-gradient(135deg, var(--violet-custom), #9C27B0); }
.btn-next.teal { background: linear-gradient(135deg, var(--teal-visuel), #26A69A); }
.btn-next.orange { background: linear-gradient(135deg, var(--orange-rapport), #FF8F00); }
.btn-next.indigo { background: linear-gradient(135deg, var(--indigo-chat), #5C6BC0); }

/* Cards */
.card {
    background: white; border-radius: 8px; padding: 18px; margin-bottom: 12px;
    border-left: 6px solid var(--vert-principal); display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); position: relative; transition: all 0.2s;
}
.card:hover { transform: translateX(4px); }
.card.alert { background-color: #FFFDE7; border-left-color: #FFC107; }
.card-info h3 { font-weight: 600; color: var(--bleu-titre); margin-bottom: 4px; }
.card-info p { font-size: 12px; color: #666; }
.stock-value { font-size: 20px; font-weight: 700; color: var(--vert-principal); font-family: 'Space Grotesk', sans-serif; }
.badge { padding: 4px 10px; border-radius: 20px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.badge.ok { background: var(--vert-clair); color: var(--vert-principal); }
.badge.warning { background: #FFECB3; color: #FF8F00; }
.delete-btn { position: absolute; top: 8px; right: 8px; background: none; border: none; color: #ccc; cursor: pointer; font-size: 14px; transition: all 0.2s; width: 24px; height: 24px; border-radius: 50%; }
.delete-btn:hover { color: var(--rose-action); background: rgba(236,64,122,0.1); }

/* Team Cards */
.team-card {
    background: white; border-radius: 8px; padding: 16px; margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04); border-left: 5px solid var(--bleu-equipe); position: relative;
}
.team-card.custom-corps { border-left-color: var(--bleu-equipe); }
.team-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.team-card-header h4 { font-weight: 600; color: var(--bleu-titre); font-size: 15px; }
.team-count { background: var(--bleu-equipe-clair); color: var(--bleu-equipe); padding: 4px 12px; border-radius: 20px; font-weight: 700; font-size: 14px; font-family: 'Space Grotesk', sans-serif; }
.team-card.custom-corps .team-count { background: var(--violet-custom-clair); color: var(--violet-custom); }
.team-times { display: flex; gap: 20px; font-size: 12px; color: #666; }

/* Corps grid */
.corps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.corps-btn {
    padding: 12px 8px; border: 2px solid #e0e0e0; background: white; border-radius: 8px; cursor: pointer;
    font-weight: 600; font-size: 11px; transition: 0.2s; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative;
}
.corps-btn:hover { transform: translateY(-2px); }
.corps-btn.active { background: var(--bleu-equipe-clair); border-color: var(--bleu-equipe); color: var(--bleu-equipe); }
.corps-btn.custom { border-color: var(--bleu-equipe); }
.corps-btn.custom.active { background: var(--bleu-equipe-clair); color: var(--bleu-equipe); }
.corps-btn .icon { font-size: 20px; }
.corps-btn .corps-delete { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; background: var(--rose-action); border: none; border-radius: 50%; color: white; font-size: 10px; cursor: pointer; display: none; align-items: center; justify-content: center; }
.corps-btn:hover .corps-delete { display: flex; }

.corps-add-btn { 
    width: 100% !important; margin-top: 15px;
    padding: 15px; border: 2px dashed var(--bleu-equipe); background: var(--bleu-equipe-clair); border-radius: 12px; cursor: pointer; 
    font-weight: 700; font-size: 13px; transition: 0.2s; text-align: center; display: flex !important; align-items: center; justify-content: center; gap: 10px; color: var(--bleu-equipe); text-transform: uppercase;
    position: relative; z-index: 100 !important;
}
.corps-add-btn:hover { background: #B3E5FC; transform: translateY(-2px); }
.corps-add-btn .plus-icon { font-size: 20px; }

/* Time inputs */
.time-row { display: flex; gap: 12px; }
.time-field { flex: 1; }
.time-field label { display: block; font-size: 12px; color: #666; margin-bottom: 6px; }
.time-field input { width: 100%; padding: 14px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 18px; font-family: 'Space Grotesk', sans-serif; font-weight: 600; text-align: center; }
.time-field input:focus { border-color: var(--bleu-equipe); outline: none; }

/* FAB */
.fab {
    position: absolute; bottom: 85px; right: 20px; width: 62px; height: 62px;
    background: linear-gradient(135deg, var(--teal-visuel), #26A69A); border-radius: 50%;
    display: flex !important; justify-content: center; align-items: center; color: white; font-size: 32px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); cursor: pointer; z-index: 999 !important; border: 3px solid white; transition: all 0.2s;
}
.fab:hover { transform: scale(1.1); }
.fab-stock { background: linear-gradient(135deg, var(--rose-action), #F06292); }
.fab-team { background: linear-gradient(135deg, var(--bleu-equipe), #0288D1); }
.fab-finance { bottom: 145px !important; }
.fab-secondary {
    position: absolute; bottom: 150px; right: 25mm; width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--bleu-titre), #283593); border-radius: 50%;
    display: flex; justify-content: center; align-items: center; color: white; font-size: 22px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); cursor: pointer; z-index: 20; border: none; transition: all 0.2s;
}
.fab-secondary:hover { transform: scale(1.1); }

/* Bottom Nav */
.bottom-nav { height: 70px; background: white; border-top: 1px solid #eee; display: flex; justify-content: space-around; align-items: center; padding-bottom: 10px; flex-shrink: 0; }
.nav-item { text-align: center; font-size: 10px; color: #999; cursor: pointer; transition: all 0.2s; padding: 8px; border-radius: 12px; }
.nav-item:hover { background: rgba(46,125,50,0.05); }
.nav-item.active { color: var(--vert-principal); }
.nav-item.active.blue { color: var(--bleu-equipe); }
.nav-item.active.teal { color: var(--teal-visuel); }
.nav-item.active.orange { color: var(--orange-rapport); }
.nav-item.active.indigo { color: var(--indigo-chat); }
.nav-icon { font-size: 20px; display: block; margin-bottom: 2px; }

/* Toast */
.toast { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); background: rgba(46, 125, 50, 0.95); color: white; padding: 20px 40px; border-radius: 8px; font-weight: 600; z-index: 20000; transition: transform 0.3s; text-align: center; backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.toast.show { transform: translate(-50%, -50%) scale(1); }
.toast.blue { background: rgba(2, 119, 189, 0.95); }
.toast.purple { background: rgba(123, 31, 162, 0.95); }
.toast.teal { background: rgba(0, 137, 123, 0.95); }
.toast.orange { background: rgba(230, 81, 0, 0.95); }
.toast.indigo { background: rgba(48, 63, 159, 0.95); }
.toast.error { background: rgba(198, 40, 40, 0.95); }
.info-box { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); border-left: 4px solid #2196F3; padding: 14px; margin-bottom: 20px; border-radius: 8px; font-size: 13px; color: #1565C0; }
.info-box.teal { background: linear-gradient(135deg, var(--teal-visuel-clair), #B2DFDB); border-left-color: var(--teal-visuel); color: #00695C; }
.info-box.purple { background: linear-gradient(135deg, #F3E5F5, #E1BEE7); border-left-color: #9C27B0; color: #7B1FA2; }
.info-box.orange { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); border-left-color: #FF8F00; color: #E65100; }
.spacer { height: 200px; display: block; }

/* History specific */
.history-btn { width: 100%; padding: 16px; background: linear-gradient(135deg, #E65100, #F57C00); color: white; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; box-shadow: 0 4px 15px rgba(230, 81, 0, 0.25); transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 15px; }
.history-btn:hover { transform: translateY(-2px); }

.period-selector { display: flex; gap: 8px; margin-bottom: 15px; }
.period-btn { flex: 1; padding: 10px 6px; border: 2px solid #e0e0e0; background: white; border-radius: 10px; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.period-btn.active { background: #FFF3E0; border-color: var(--orange-alert); color: var(--orange-alert); }

.history-card {
    background: white; border-radius: 8px; padding: 14px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    position: relative; overflow: hidden;
}
.history-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.history-card.entree::before { background: var(--vert-principal); }
.history-card.sortie::before { background: var(--rose-action); }

.history-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.history-card.entree .history-icon { background: var(--vert-clair); }
.history-card.sortie .history-icon { background: #FFEBEE; }

.history-details { flex: 1; min-width: 0; }
.history-details h4 { font-weight: 600; font-size: 14px; color: #333; margin-bottom: 2px; }
.history-details p { font-size: 11px; color: #888; }

.history-qty { text-align: right; flex-shrink: 0; }
.history-qty .value { font-weight: 700; font-size: 16px; font-family: 'Space Grotesk', sans-serif; }
.history-card.entree .history-qty .value { color: var(--vert-principal); }
.history-card.sortie .history-qty .value { color: var(--rose-action); }

.summary-card-orange { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); border-radius: 8px; padding: 16px; margin-bottom: 20px; display: flex; justify-content: space-around; text-align: center; }
.summary-item h5 { font-size: 11px; color: #E65100; margin-bottom: 4px; text-transform: uppercase; }
.summary-item .num { font-size: 24px; font-weight: 700; color: #BF360C; font-family: 'Space Grotesk', sans-serif; }

.date-inputs { display: flex; gap: 10px; margin-bottom: 15px; }
.date-field { flex: 1; }
.date-field label { display: block; font-size: 11px; color: #666; margin-bottom: 4px; }
.date-field input { width: 100%; padding: 10px 12px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 14px; font-family: inherit; }

.empty-state { text-align: center; padding: 40px 20px; color: #999; }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 14px; }

/* Image Modal */
.image-modal {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.95); z-index: 200;
    display: none; flex-direction: column; align-items: center; justify-content: center; padding: 20px;
}
.image-modal.show { display: flex; }
.image-modal img { max-width: 100%; max-height: 70%; border-radius: 12px; }
.image-modal-close { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; background: rgba(255,255,255,0.2); border: none; border-radius: 50%; color: white; font-size: 20px; cursor: pointer; }
.image-modal-info { margin-top: 20px; text-align: center; color: white; }
.image-modal-info h3 { font-size: 18px; margin-bottom: 8px; }
.image-modal-info p { font-size: 14px; opacity: 0.8; }

/* Icon Picker */
.icon-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 16px; background: white; border-radius: 12px; border: 2px solid #e0e0e0; }
.icon-option { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 20px; border: 2px solid transparent; border-radius: 8px; cursor: pointer; transition: all 0.2s; background: #f5f5f5; }
.icon-option:hover { background: var(--violet-custom-clair); border-color: var(--violet-custom); }
.icon-option.selected { background: var(--violet-custom-clair); border-color: var(--violet-custom); box-shadow: 0 0 0 2px var(--violet-custom); }

/* Report Section Styles */
.report-section { background: white; border-radius: 8px; padding: 16px; margin-bottom: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.report-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.report-section-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.report-section-icon.stock { background: var(--vert-clair); }
.report-section-icon.team { background: var(--bleu-equipe-clair); }
.report-section-icon.visuel { background: var(--teal-visuel-clair); }
.report-section-title { font-weight: 600; color: #333; font-size: 15px; }
.report-mini-stat { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.report-mini-stat:last-child { border-bottom: none; }
.report-mini-stat .label { color: #666; font-size: 13px; }
.report-mini-stat .value { font-weight: 600; color: #333; font-size: 13px; }

/* Chat Styles */
.chat-container { display: flex; flex-direction: column; gap: 12px; }
.chat-bubble { max-width: 85%; padding: 12px 14px; border-radius: 16px; position: relative; }
.chat-bubble.incoming { background: white; border-bottom-left-radius: 4px; align-self: flex-start; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.chat-bubble.outgoing { background: linear-gradient(135deg, var(--indigo-chat), #5C6BC0); color: white; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-bubble-header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.chat-avatar { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.chat-bubble.incoming .chat-avatar { background: var(--indigo-chat-clair); color: var(--indigo-chat); }
.chat-bubble.outgoing .chat-avatar { background: rgba(255,255,255,0.2); color: white; }
.chat-author { font-weight: 600; font-size: 12px; }
.chat-bubble.incoming .chat-author { color: var(--indigo-chat); }
.chat-bubble.outgoing .chat-author { color: white; }
.chat-time { font-size: 10px; opacity: 0.7; }
.chat-bubble.incoming .chat-time { color: #999; }
.chat-message-text { font-size: 14px; line-height: 1.4; }
.chat-input-container { position: absolute; bottom: 70px; left: 0; right: 0; background: white; padding: 10px 15px; border-top: 1px solid #eee; display: flex; gap: 10px; align-items: center; }
.chat-input-wrapper { flex: 1; display: flex; align-items: center; background: #f5f5f5; border-radius: 24px; padding: 0 15px; }
.chat-input { flex: 1; border: none; background: transparent; padding: 12px 0; font-size: 14px; font-family: inherit; outline: none; }
.chat-send-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: linear-gradient(135deg, var(--indigo-chat), #5C6BC0); color: white; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.chat-send-btn:hover { transform: scale(1.05); }

/* Auth & Settings Styles */
.auth-container { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 30px; background: white; }
.auth-logo { font-size: 48px; margin-bottom: 20px; }
.auth-title { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; color: var(--bleu-titre); margin-bottom: 10px; }
.auth-subtitle { color: #666; margin-bottom: 40px; text-align: center; }
.auth-form { width: 100%; max-width: 300px; }
.auth-btn { width: 100%; padding: 16px; background: var(--vert-principal); color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 10px; transition: all 0.2s; }
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(46,125,50,0.3); }
.auth-btn.secondary { background: white; color: var(--bleu-titre); border: 2px solid var(--bleu-titre); }
.auth-link { display: block; text-align: center; margin-top: 20px; color: var(--bleu-equipe); font-weight: 600; font-size: 14px; cursor: pointer; }

.sub-card { background: white; border-radius: 20px; padding: 24px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin: 20px 0; border: 2px solid var(--vert-principal); }
.sub-price { font-size: 48px; font-weight: 700; color: var(--vert-principal); font-family: 'Space Grotesk', sans-serif; }
.sub-features { text-align: left; margin: 20px 0; }
.sub-feature { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.sub-feature .icon { color: var(--vert-principal); font-weight: bold; }

.settings-icon { font-size: 24px; cursor: pointer; padding: 5px; }

.site-card { background: white; border-radius: 8px; padding: 20px; margin-bottom: 15px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); cursor: pointer; border-left: 5px solid var(--vert-principal); transition: all 0.2s; position: relative; }
.site-card:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.1); }
.site-card h3 { font-weight: 600; color: #333; margin-bottom: 5px; }
.site-card p { font-size: 12px; color: #888; }
.site-card .locked-icon { float: right; font-size: 18px; color: var(--orange-alert); }
.site-card .delete-site-btn {
    position: absolute; top: 10px; right: 10px; background: rgba(236, 64, 122, 0.1); border: none; color: var(--rose-action); font-size: 18px; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.site-card .delete-site-btn:hover { background: var(--rose-action); color: white; }

/* Logo Blend Magic for Transparency feeling */
.auth-logo-img img, .form-header img {
    mix-blend-mode: multiply;
}

.hidden { display: none !important; }

.report-photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.report-photo-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1px solid #eee; }

.support-inbox-item { background: white; padding: 15px; border-radius: 12px; margin-bottom: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); cursor: pointer; border-left: 4px solid var(--rose-action); transition: all 0.2s; }
.support-inbox-item:hover { transform: translateX(3px); }
.support-inbox-item h4 { font-size: 15px; color: #333; margin-bottom: 4px; }
.support-inbox-item p { font-size: 12px; color: #666; }
.support-inbox-item .time { font-size: 10px; color: #999; float: right; }

/* Unlock Modal */
.unlock-modal {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 300;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.unlock-modal.show { display: flex; }
.unlock-content { background: white; padding: 30px; border-radius: 20px; width: 100%; text-align: center; }
.unlock-icon { font-size: 48px; margin-bottom: 15px; }
.unlock-title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.unlock-input { width: 100%; padding: 15px; border: 2px solid #e0e0e0; border-radius: 12px; font-size: 20px; text-align: center; letter-spacing: 8px; margin-bottom: 15px; }
.unlock-input:focus { border-color: var(--vert-principal); outline: none; }
.unlock-error { color: var(--rose-action); font-size: 12px; margin-bottom: 10px; min-height: 15px; }

.large-photo-report { width: 100%; margin-bottom: 15px; border-radius: 12px; border: 1px solid #eee; overflow: hidden; background: #f9f9f9; }
.large-photo-report img { width: 100%; height: auto; display: block; }
.large-photo-report .desc { padding: 12px; font-size: 13px; color: #444; font-weight: 500; background: white; }

/* Admin User Card */
.admin-user-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border-left: 4px solid var(--bleu-equipe);
}
.admin-user-card.inactive { border-left-color: #ccc; opacity: 0.8; }
.admin-user-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.admin-user-actions { display: flex; gap: 8px; margin-top: 10px; }
.admin-user-actions button { flex: 1; padding: 8px; font-size: 11px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

    @keyframes load-progress { 0% { transform: translateX(-100%); } 100% { transform: translateX(0); } }
    .loader-word { opacity: 0; display: inline-block; animation: word-fade 0.5s forwards; margin-right: 5px; }
    @keyframes word-fade { 0% { opacity: 0; transform: translateY(5px); } 100% { opacity: 1; transform: translateY(0); } }

    .pricing-card {
        background: white;
        border-radius: 12px;
        padding: 15px 10px;
        text-align: center;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        border: 1px solid #eee;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        justify-content: center;
        cursor: pointer;
        position: relative;
        overflow: hidden;
    }
    .pricing-card:active { transform: scale(0.95); background: #f9f9f9; }
    .pricing-card.solo { border-top: 4px solid var(--bleu-equipe); }
    .pricing-card.ent { border-top: 4px solid var(--orange-principal); }
    .pricing-card .p-title { font-size: 10px; font-weight: 700; color: #888; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
    .pricing-card .p-price { font-size: 19px; font-weight: 800; color: #222; font-family: 'Space Grotesk', sans-serif; }
    .pricing-card::after { content: '\u2192'; position: absolute; bottom: 5px; right: 8px; font-size: 10px; color: #ccc; }

/* Notifications Admin */
.notif-badge {
    background: var(--rose-action);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.notif-dot-small {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: var(--rose-action);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(255,0,0,0.5);
}

#admin-section { position: relative; }

@keyframes rotate-refresh { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.camera-buttons { display: flex; gap: 10px; margin-top: 15px; }
.camera-btn { flex: 1; padding: 12px; border-radius: 10px; border: 1px solid #ddd; background: white !important; cursor: pointer; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; color: #333 !important; }
.camera-btn.primary { background: var(--teal-visuel) !important; color: white !important; border: none; }
.camera-btn:active { transform: scale(0.95); }

/* Skeleton & Loading */
.skeleton {
    background: #e0e0e0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.loading-spinner {
    width: 30px; height: 30px;
    border: 3px solid rgba(46, 125, 50, 0.1);
    border-top: 3px solid var(--vert-principal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.skeleton-list { display: flex; flex-direction: column; gap: 15px; }
.skeleton-card {
    height: 90px; width: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
}
/* Finance Filter Bar */
.finance-filter-bar {
    display: flex;
    gap: 10px;
    margin: 0 15px 15px 15px;
    padding: 2px;
}
.filter-btn {
    flex: 1;
    padding: 10px 5px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: white;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.filter-btn.active {
    background: #F9A825;
    color: white;
    border-color: #F9A825;
    box-shadow: 0 4px 12px rgba(249, 168, 37, 0.3);
    transform: translateY(-1px);
}
.filter-btn:active {
    transform: scale(0.95);
}

/* Finance Summary Footer */
.summary-footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    margin-top: -5px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.03);
}
#summary-label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#summary-total {
    font-size: 18px;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
}

/* ==================== MODERN PREMIUM HEADER (BATI+) ==================== */
.app-bar, .form-header {
    border-bottom-left-radius: 30px !important;
    border-bottom-right-radius: 30px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    padding-bottom: 25px !important;
    border-bottom: none !important; /* Supprime la ligne plate pour un rendu plus fluide */
}

/* Ajustement pour que l'ombre ne soit pas coupée par les écrans */
.screen {
    overflow: visible !important;
}

/* ==================== SYSTÈME DE NOTIFICATIONS ==================== */
.notif-bell-container {
    margin-left: auto;
    margin-right: 15px;
    position: relative;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    z-index: 100;
}
.notif-bell-container:active { transform: scale(0.9); }

.notif-badge-global {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF5252;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: none; /* Masqué si 0 */
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.notification-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 5px solid #ddd;
    transition: all 0.2s;
    position: relative;
}
.notification-card.unread {
    border-left-color: #FF5252;
    background: #FFF8F8;
}
.notification-card .notif-date {
    font-size: 10px;
    color: #999;
    margin-bottom: 5px;
    display: block;
}
.notification-card .notif-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.admin-notif-box {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    margin-top: 30px;
    border: 1px solid #e0e0e0;
}
.admin-notif-box h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-clear-all {
    font-size: 12px;
    font-weight: 700;
    color: white;
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
}

/* Correction chevauchement flèche retour / titre Notifications */
#notifications-screen .app-bar h1 {
    margin-left: 40px !important;
}

/* --- AMÉLIORATION UX : BOUTON TÉLÉCHARGEMENT APK & REDUCTION TAILLE BOUTONS APP-BAR --- */
.settings-icon {
    font-size: 20px !important;
    padding: 4px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.settings-icon:active { transform: scale(0.9); }

.notif-bell-container {
    margin-left: 0 !important; /* Géré dynamiquement pour l'alignement */
    margin-right: 12px !important;
    font-size: 19px !important;
}

.download-apk-btn {
    margin-left: auto; /* Pousse l'ensemble du groupe d'icônes à droite */
    margin-right: 12px;
    position: relative;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
    z-index: 100;
    color: white;
}
.download-apk-btn:active { transform: scale(0.9); }

/* Upload Area for Admin APK */
.admin-notif-box .upload-area {
    transition: background-color 0.2s, border-color 0.2s;
}
.admin-notif-box .upload-area:hover {
    background-color: #E8F5E9 !important;
    border-color: #2E7D32 !important;
}


