Files
projetecho/static/style.css

269 lines
4.8 KiB
CSS

/* --- COULEURS GLOBALES ET THEME SOMBRE --- */
body {
background-color: #0f172a;
color: #e2e8f0;
}
.navbar {
background-color: #1e293b !important;
border-bottom: 1px solid #334155;
}
/* --- DESIGN DES WIDGETS (CARTES) --- */
.card {
background-color: #1e293b;
border: 1px solid #334155;
min-height: 320px;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}
/* Les 4 cartes principales gardent une hauteur cohérente (alignement propre) */
.row.g-4 > [class*="col-"] {
display: flex;
}
.row.g-4 > [class*="col-"] > .card {
width: 100%;
}
.card-meteo {
border-top: 4px solid #38bdf8;
}
.card-solaire {
border-top: 4px solid #fbbf24;
}
.card-batterie {
border-top: 4px solid #34d399;
}
.card-admin {
border-top: 4px solid #f87171;
}
/* --- ANIMATION DU HEARTBEAT PRINCIPAL --- */
.status-dot {
width: 14px;
height: 14px;
display: inline-block;
background-color: #64748b;
border-radius: 50%;
}
.pulse-online {
background-color: #22c55e;
box-shadow: 0 0 12px #22c55e;
animation: pulse-green 2s infinite;
}
.pulse-offline {
background-color: #ef4444;
box-shadow: 0 0 15px #ef4444;
}
@keyframes pulse-green {
0% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
}
100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
}
}
/* --- TYPOGRAPHIE ET ELEMENTS VISUELS --- */
.data-value {
color: #e0f2fe;
text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}
.placeholder-box {
border: 2px dashed #475569;
background-color: #0f172a;
color: #94a3b8;
}
/* =========================================
BLOC ÉTAT DU SYSTÈME
========================================= */
.system-status-item {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 10px;
padding: 10px 14px;
}
.sys-dot {
width: 10px;
height: 10px;
border-radius: 50%;
flex-shrink: 0;
display: inline-block;
}
.sys-label {
font-size: 13px;
font-weight: 600;
color: #e2e8f0;
}
.sys-badge {
font-size: 11px;
font-weight: 600;
padding: 2px 8px;
border-radius: 20px;
background: rgba(255, 255, 255, 0.06);
color: #94a3b8;
border: 1px solid rgba(255, 255, 255, 0.08);
}
.sys-badge-ok {
background: rgba(52, 211, 153, 0.12);
color: #34d399;
border-color: rgba(52, 211, 153, 0.2);
}
.sys-badge-err {
background: rgba(239, 68, 68, 0.12);
color: #ef4444;
border-color: rgba(239, 68, 68, 0.2);
}
/* =========================================
WIDGET SOLAIRE (renommé Mesures Électriques)
========================================= */
.gauge-container {
position: relative;
width: 160px;
height: 160px;
margin: 0 auto 15px;
}
.gauge-bg,
.gauge-fill {
position: absolute;
top: 0;
left: 0;
width: 160px;
height: 160px;
}
.gauge-bg circle,
.gauge-fill circle {
fill: none;
stroke-width: 18;
stroke-linecap: round;
}
.gauge-bg circle {
stroke: #0f172a;
}
.gauge-fill circle {
stroke: url(#gaugeGradient);
stroke-dasharray: 283;
stroke-dashoffset: 283;
transition: stroke-dashoffset 1s ease;
transform: rotate(180deg);
transform-origin: center;
}
.gauge-value {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
width: 100%;
}
.gauge-value .number {
font-size: 32px;
font-weight: 700;
color: #facc15;
line-height: 1;
}
.gauge-value .unit {
font-size: 14px;
color: #94a3b8;
font-weight: 600;
}
.stats {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.stat-card {
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 10px;
padding: 10px;
}
.stat-label {
font-size: 10px;
color: #64748b;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 4px;
}
.stat-value {
font-size: 16px;
font-weight: 700;
color: #e2e8f0;
}
.stat-value .stat-unit {
font-size: 11px;
color: #64748b;
font-weight: 600;
}
.sol-status-bar {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 14px;
background: rgba(34, 197, 94, 0.08);
border: 1px solid rgba(34, 197, 94, 0.15);
border-radius: 12px;
}
.sol-status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #22c55e;
animation: blink-sol 1.5s ease-in-out infinite;
}
@keyframes blink-sol {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.4;
}
}
.sol-status-text {
font-size: 12px;
color: #22c55e;
font-weight: 600;
}