Fichiers
site-principal/tools/apply-gws-refonte.js
T
2026-10-11 01:57:33 +02:00

840 lignes
56 KiB
JavaScript
Brut Annotations Historique

Ce fichier contient des caractères Unicode ambigus.
Ce fichier contient des caractères Unicode qui peuvent être confondus avec d'autres caractères. Si vous pensez que c'est intentionnel, vous pouvez ignorer cet avertissement. Utilisez le bouton Échappe pour les dévoiler.
#!/usr/bin/env node
/**
* tools/apply-gws-refonte.js
*
* Refonte complète et harmonisation de Gastinel Weather Studio (GWS) sur gastinel.me :
* 1. Intégration du sas/hub de téléchargement dédié (#gws)
* 2. Harmonisation de la Direction Artistique (DA darkroom alpine, cyan givre #38bdf8 / #0284c7)
* 3. Remplacement du tag obsolète "Disponible prochainement au téléchargement" par des boutons actifs (.exe / .gws / hub)
* 4. Guide anti-SmartScreen Windows Defender pas-à-pas avec schémas
* 5. Empreinte d'intégrité SHA-256 avec bouton de copie 1-clic et commande PowerShell
* 6. Connexion live à l'API de mise à jour (https://gastinel.me/gws/api/v1/update/windows/x86_64/0.0.0)
* 7. Mise à jour de la navigation SPA (.spa-nav), du footer et du routeur
*/
const fs = require('fs');
const path = require('path');
const ROOT_DIR = path.resolve(__dirname, '..');
const INDEX_HTML = path.join(ROOT_DIR, 'index.html');
console.log('[GWS-REFONTE] Lecture de index.html...');
let html = fs.readFileSync(INDEX_HTML, 'utf8');
const eol = html.includes('\r\n') ? '\r\n' : '\n';
// 1. MISE À JOUR DE LA NAVIGATION SPA (.spa-nav CSS)
const oldSpaNavCss = `.spa-nav { position:sticky; top:0; z-index:6000; display:flex; gap:6px; background:#fff; border-bottom:1px solid #e8e8e8; padding:12px 18px; overflow-x:auto; }
.spa-nav a { color:#444; font-family:var(--font-sans); font-weight:500; font-size:.78rem; text-transform:uppercase; letter-spacing:1px; text-decoration:none; padding:6px 12px; border-radius:4px; white-space:nowrap; transition:.25s; }
.spa-nav a:hover, .spa-nav a.active { color:#000; background:rgba(0,0,0,.06); }
body.spa-nav-hidden .spa-nav { display:none; }`;
const newSpaNavCss = `.spa-nav { position:sticky; top:0; z-index:6000; display:flex; gap:6px; background:#fff; border-bottom:1px solid #e8e8e8; padding:12px 18px; overflow-x:auto; }
.spa-nav a { color:#444; font-family:var(--font-sans); font-weight:500; font-size:.78rem; text-transform:uppercase; letter-spacing:1px; text-decoration:none; padding:6px 12px; border-radius:4px; white-space:nowrap; transition:.25s; }
.spa-nav a:hover, .spa-nav a.active { color:#000; background:rgba(0,0,0,.06); }
.spa-nav a.spa-nav-gws { color:#0284c7; border:1px solid rgba(2,132,199,.35); background:rgba(56,189,248,.08); font-weight:700; display:inline-flex; align-items:center; gap:6px; }
.spa-nav a.spa-nav-gws:hover, .spa-nav a.spa-nav-gws.active { background:#0284c7; color:#fff; border-color:#0284c7; }
.spa-nav .nav-gws-pulse { width:7px; height:7px; border-radius:50%; background:#38bdf8; display:inline-block; box-shadow:0 0 8px #38bdf8; }
body.spa-nav-hidden .spa-nav { display:none; }`;
if (html.includes(oldSpaNavCss.replace(/\n/g, eol))) {
html = html.replace(oldSpaNavCss.replace(/\n/g, eol), newSpaNavCss.replace(/\n/g, eol));
console.log('✓ CSS .spa-nav mis à jour avec le style Weather Studio.');
} else {
console.log('ℹ Remplacement souple de .spa-nav CSS...');
html = html.replace(/\.spa-nav a:hover, \.spa-nav a\.active \{ color:#000; background:rgba\(0,0,0,\.06\); \}/,
`.spa-nav a:hover, .spa-nav a.active { color:#000; background:rgba(0,0,0,.06); }${eol}.spa-nav a.spa-nav-gws { color:#0284c7; border:1px solid rgba(2,132,199,.35); background:rgba(56,189,248,.08); font-weight:700; display:inline-flex; align-items:center; gap:6px; }${eol}.spa-nav a.spa-nav-gws:hover, .spa-nav a.spa-nav-gws.active { background:#0284c7; color:#fff; border-color:#0284c7; }${eol}.spa-nav .nav-gws-pulse { width:7px; height:7px; border-radius:50%; background:#38bdf8; display:inline-block; box-shadow:0 0 8px #38bdf8; }`);
console.log('✓ CSS .spa-nav mis à jour.');
}
// 2. CSS DARKROOM ALPINE POUR #apps ET #gws
const oldAppsCssRegex = /#apps \{ font-family:'Inter'[\s\S]*?#apps \.app-card-top \{ flex-direction:column; align-items:flex-start; gap:12px; \}\s*\}/;
const newDarkroomCss = `/* ==========================================================================
DA DARKROOM ALPINE : MES APPLICATIONS (#apps) & SAS WEATHER STUDIO (#gws)
========================================================================== */
#apps {
font-family: var(--font-sans);
color: #f1f5f9;
background: #06090f;
background-image:
radial-gradient(ellipse 80% 50% at 50% 0%, rgba(2, 132, 199, 0.18), transparent 70%),
radial-gradient(circle 500px at 90% 20%, rgba(56, 189, 248, 0.06), transparent 50%);
line-height: 1.6;
}
#apps .apps-pad { max-width: 1120px; margin: 0 auto; padding: 70px 24px 100px; }
#apps .apps-header { border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 32px; margin-bottom: 48px; }
#apps .apps-header h1 { font-family: 'Comfortaa', cursive; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -.5px; margin: 0 0 14px 0; color: #fff; text-shadow: 0 2px 14px rgba(56, 189, 248, 0.15); }
#apps .apps-intro { font-size: 1.02rem; color: #94a3b8; max-width: 680px; margin: 0 0 18px 0; line-height: 1.65; }
#apps .apps-note { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); border-radius: 4px; padding: 5px 12px; background: rgba(56, 189, 248, 0.08); }
#apps .apps-category { margin-bottom: 65px; }
#apps .apps-category-header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid rgba(56, 189, 248, 0.25); padding-bottom: 12px; margin-bottom: 20px; }
#apps .apps-category-title { font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; margin: 0; color: #fff; }
#apps .apps-category-count { font-size: .78rem; font-weight: 600; color: #38bdf8; letter-spacing: .5px; text-transform: uppercase; }
#apps .apps-category-desc { font-size: .92rem; color: #94a3b8; margin: 0 0 28px 0; line-height: 1.5; }
#apps .apps-detailed-list { display: flex; flex-direction: column; gap: 40px; }
#apps .app-card-detailed { border: 1px solid rgba(56, 189, 248, 0.16); border-radius: 10px; background: rgba(14, 22, 37, 0.78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 34px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); transition: border-color .2s ease, transform .2s ease; }
#apps .app-card-detailed:hover { border-color: rgba(56, 189, 248, 0.4); }
#apps .app-card-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
#apps .app-title-group { display: flex; align-items: center; gap: 16px; }
#apps .app-icon-img { width: 48px; height: 48px; border-radius: 8px; border: 1px solid rgba(56, 189, 248, 0.3); background: #0a0f18; padding: 2px; object-fit: contain; flex-shrink: 0; box-shadow: 0 0 12px rgba(56, 189, 248, 0.15); }
#apps .app-main-title { font-size: 1.4rem; font-weight: 700; color: #fff; margin: 0; letter-spacing: -.3px; }
#apps .app-status-tag { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: #94a3b8; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 4px; padding: 6px 12px; white-space: nowrap; }
/* Status badge disponible & actions rapides GWS */
#apps .app-status-badge.available { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: #38bdf8; background: rgba(2, 132, 199, 0.15); border: 1px solid rgba(56, 189, 248, 0.4); border-radius: 4px; padding: 6px 14px; white-space: nowrap; box-shadow: 0 0 10px rgba(56, 189, 248, 0.15); }
#apps .app-status-badge .badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px #10b981; }
#apps .app-status-actions-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
#apps .app-btn-download-quick { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); color: #fff; font-weight: 700; font-size: .84rem; text-decoration: none; padding: 8px 16px; border-radius: 6px; box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35); transition: all .2s ease; }
#apps .app-btn-download-quick:hover { background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%); transform: translateY(-1px); color: #fff; box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4); }
#apps .app-btn-hub-quick { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.06); color: #f1f5f9; font-weight: 600; font-size: .84rem; text-decoration: none; padding: 8px 14px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.15); transition: all .2s ease; }
#apps .app-btn-hub-quick:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
#apps .app-pitch { font-size: 1.05rem; font-weight: 600; color: #38bdf8; font-style: italic; border-left: 3px solid #0284c7; padding-left: 14px; margin: 0 0 22px 0; }
#apps .app-problem { background: rgba(10, 15, 26, 0.7); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 6px; padding: 18px 20px; margin-bottom: 24px; }
#apps .app-problem h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: #38bdf8; margin: 0 0 8px 0; }
#apps .app-problem p { font-size: .92rem; color: #cbd5e1; margin: 0; line-height: 1.65; }
#apps .app-hero-visual { border-radius: 6px; overflow: hidden; border: 1px solid rgba(56, 189, 248, 0.2); margin: 22px 0 26px; background: #080d16; }
#apps .app-hero-visual img { width: 100%; height: auto; display: block; }
#apps .app-visual-caption { font-size: .78rem; color: #94a3b8; padding: 8px 14px; border-top: 1px solid rgba(255, 255, 255, 0.06); background: rgba(10, 15, 26, 0.9); }
#apps .app-features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
#apps .app-feature-card { background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 6px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
#apps .app-feature-card h4 { font-size: .88rem; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; color: #fff; margin: 0 0 8px 0; }
#apps .app-feature-card p { font-size: .88rem; color: #94a3b8; line-height: 1.6; margin: 0; }
#apps .app-feature-media { margin-top: 14px; border-radius: 4px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); }
#apps .app-feature-media img { width: 100%; height: auto; display: block; }
#apps .app-meta-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
#apps .app-meta-grid.two-cols { grid-template-columns: 1fr 1fr; }
#apps .app-meta-item { background: rgba(10, 15, 26, 0.6); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 6px; padding: 16px 18px; }
#apps .app-meta-item h5 { font-size: .76rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: #38bdf8; margin: 0 0 6px 0; }
#apps .app-meta-item p { font-size: .86rem; color: #cbd5e1; margin: 0; line-height: 1.55; }
/* Bloc intégrité rapide dans la fiche */
#apps .app-inline-integrity { margin-top: 20px; background: rgba(5, 8, 15, 0.8); border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 6px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .82rem; }
#apps .app-inline-integrity code { font-family: var(--font-mono, monospace); color: #7dd3fc; font-size: .78rem; word-break: break-all; }
#apps .app-inline-copy-btn { background: rgba(56, 189, 248, 0.15); border: 1px solid rgba(56, 189, 248, 0.3); color: #38bdf8; padding: 4px 10px; border-radius: 4px; font-size: .74rem; font-weight: 600; cursor: pointer; transition: all .2s; }
#apps .app-inline-copy-btn:hover { background: rgba(56, 189, 248, 0.3); color: #fff; }
/* Grille compacte des projets annoncés */
#apps .apps-compact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
#apps .app-card-compact { border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 6px; background: rgba(14, 22, 37, 0.6); overflow: hidden; transition: border-color .2s ease, background .2s ease; }
#apps .app-card-compact:hover { border-color: rgba(56, 189, 248, 0.3); background: rgba(14, 22, 37, 0.85); }
#apps .app-card-compact[open] { background: rgba(14, 22, 37, 0.95); border-color: rgba(56, 189, 248, 0.45); }
#apps .app-compact-summary { list-style: none; padding: 18px 20px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; user-select: none; }
#apps .app-compact-summary::-webkit-details-marker { display: none; }
#apps .app-compact-info { display: flex; flex-direction: column; gap: 4px; }
#apps .app-compact-name { font-size: 1.05rem; font-weight: 700; margin: 0; color: #fff; letter-spacing: -.2px; }
#apps .app-compact-status { font-size: .72rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .8px; }
#apps .app-compact-arrow { width: 14px; height: 14px; fill: #64748b; transition: transform .25s ease, fill .25s ease; flex-shrink: 0; }
#apps .app-card-compact[open] .app-compact-arrow { transform: rotate(180deg); fill: #38bdf8; }
#apps .app-compact-body { padding: 0 20px 18px 20px; border-top: 1px solid rgba(255, 255, 255, 0.06); margin-top: 2px; padding-top: 14px; }
#apps .app-keywords { font-size: .88rem; font-weight: 600; color: #38bdf8; margin-bottom: 8px; letter-spacing: .2px; line-height: 1.4; }
#apps .app-timeline { font-size: .8rem; color: #94a3b8; line-height: 1.4; }
@media (max-width: 850px) {
#apps .app-meta-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
#apps .apps-pad { padding: 45px 18px 60px; }
#apps .app-card-detailed { padding: 22px 18px; }
#apps .app-features-grid, #apps .app-meta-grid.two-cols { grid-template-columns: 1fr; }
#apps .apps-compact-grid { grid-template-columns: 1fr; }
#apps .app-card-top { flex-direction: column; align-items: flex-start; gap: 12px; }
}
/* ==========================================================================
CSS DU HUB DÉDIÉ WEATHER STUDIO (#gws)
========================================================================== */
#gws {
font-family: var(--font-sans);
color: #f1f5f9;
background: #05080f;
background-image:
radial-gradient(ellipse 80% 50% at 50% 0%, rgba(2, 132, 199, 0.22), transparent 70%),
radial-gradient(circle 600px at 90% 20%, rgba(56, 189, 248, 0.08), transparent 60%),
radial-gradient(circle 500px at 10% 70%, rgba(14, 165, 233, 0.06), transparent 50%);
min-height: 100vh;
padding: 60px 0 100px;
}
#gws .container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
#gws .gws-hero { text-align: center; padding-bottom: 60px; }
#gws .gws-badge-row { display: inline-flex; align-items: center; gap: 10px; background: rgba(15, 23, 42, 0.85); border: 1px solid rgba(56, 189, 248, 0.25); padding: 6px 16px; border-radius: 30px; margin-bottom: 24px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
#gws .status-dot { width: 8px; height: 8px; background-color: #10b981; border-radius: 50%; box-shadow: 0 0 8px #10b981; animation: pulse-dot 2s infinite ease-in-out; }
#gws .status-text { font-size: 0.78rem; font-weight: 600; color: #38bdf8; letter-spacing: 0.5px; text-transform: uppercase; }
#gws .gws-hero h1 { font-family: 'Comfortaa', cursive; font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 700; color: #fff; letter-spacing: -0.02em; margin: 0 0 16px 0; line-height: 1.15; text-shadow: 0 2px 20px rgba(56, 189, 248, 0.15); }
#gws .gws-hero-subtitle { font-size: clamp(1.05rem, 2.2vw, 1.35rem); color: #7dd3fc; max-width: 780px; margin: 0 auto 20px auto; font-weight: 500; line-height: 1.5; }
#gws .gws-hero-desc { font-size: 0.98rem; color: #94a3b8; max-width: 700px; margin: 0 auto 40px auto; line-height: 1.65; }
#gws .download-action-box { background: rgba(14, 22, 37, 0.82); border: 1px solid rgba(56, 189, 248, 0.25); border-radius: 16px; padding: 36px 30px; max-width: 840px; margin: 0 auto; box-shadow: 0 20px 45px rgba(0,0,0,0.4), 0 0 30px rgba(56, 189, 248, 0.08); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); position: relative; overflow: hidden; }
#gws .download-action-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, #38bdf8, transparent); }
#gws .download-options-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: stretch; }
@media (max-width: 768px) { #gws .download-options-grid { grid-template-columns: 1fr; } }
#gws .primary-download-card { background: linear-gradient(145deg, rgba(2, 132, 199, 0.15), rgba(15, 23, 42, 0.7)); border: 1px solid rgba(56, 189, 248, 0.4); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
#gws .primary-download-card:hover { transform: translateY(-2px); border-color: #38bdf8; box-shadow: 0 10px 30px rgba(2, 132, 199, 0.25); }
#gws .btn-main-download { display: inline-flex; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); color: #fff; font-weight: 700; font-size: 1.05rem; padding: 16px 22px; border-radius: 6px; text-decoration: none; box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4); transition: all 0.2s ease; margin-top: 18px; }
#gws .btn-main-download:hover { background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(56, 189, 248, 0.5); color: #fff; }
#gws .btn-main-download svg { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }
#gws .alt-download-card { background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; transition: border-color .2s ease, background .2s ease; }
#gws .alt-download-card:hover { border-color: rgba(255, 255, 255, 0.2); background: rgba(15, 23, 42, 0.8); }
#gws .btn-alt-download { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: rgba(255, 255, 255, 0.06); color: #f1f5f9; font-weight: 600; font-size: 0.95rem; padding: 14px 18px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.15); text-decoration: none; transition: all 0.2s ease; margin-top: 18px; }
#gws .btn-alt-download:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
#gws .card-title-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
#gws .card-title { font-size: 1.12rem; font-weight: 700; color: #fff; margin: 0; }
#gws .card-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 3px 8px; border-radius: 4px; }
#gws .tag-recommended { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
#gws .tag-nosmartscreen { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
#gws .card-desc { font-size: 0.86rem; color: #94a3b8; margin: 0; line-height: 1.5; }
#gws .card-meta-list { font-size: 0.78rem; color: #64748b; margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
#gws .api-live-bar { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.07); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: #94a3b8; }
#gws .api-status-badge { display: inline-flex; align-items: center; gap: 6px; color: #10b981; font-weight: 500; }
#gws .api-status-badge svg { width: 14px; height: 14px; fill: currentColor; }
#gws .api-refresh-btn { background: none; border: none; color: #38bdf8; cursor: pointer; font-size: 0.8rem; font-family: inherit; padding: 0; text-decoration: underline; transition: opacity .2s; }
#gws .sha-section { padding: 45px 0; }
#gws .sha-card { background: rgba(14, 22, 37, 0.78); border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 10px; padding: 26px 30px; position: relative; }
#gws .sha-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
#gws .sha-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 700; color: #fff; }
#gws .sha-title svg { width: 20px; height: 20px; fill: #38bdf8; }
#gws .sha-code-container { display: flex; align-items: center; gap: 12px; background: #04060a; border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; overflow-x: auto; }
#gws .sha-hash { font-family: var(--font-mono, monospace); font-size: 0.84rem; color: #7dd3fc; letter-spacing: 0.5px; word-break: break-all; flex: 1; }
#gws .copy-btn { background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.3); color: #38bdf8; padding: 6px 14px; border-radius: 4px; font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s ease; }
#gws .copy-btn:hover { background: rgba(56, 189, 248, 0.25); color: #fff; border-color: #38bdf8; }
#gws .copy-btn.copied { background: rgba(16, 185, 129, 0.15); border-color: #10b981; color: #10b981; }
#gws .sha-terminal-cmd { font-size: 0.8rem; color: #94a3b8; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; background: rgba(0, 0, 0, 0.35); padding: 8px 12px; border-radius: 4px; border-left: 3px solid #0284c7; }
#gws .sha-terminal-cmd code { font-family: var(--font-mono, monospace); color: #cbd5e1; }
#gws .smartscreen-section { padding: 60px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
#gws .section-intro-header { text-align: center; max-width: 750px; margin: 0 auto 40px auto; }
#gws .section-tag { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 1.5px; color: #38bdf8; font-weight: 700; margin-bottom: 8px; display: inline-block; }
#gws .section-intro-header h2 { font-family: 'Comfortaa', cursive; font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 700; color: #fff; margin: 0 0 14px 0; }
#gws .section-intro-header p { color: #94a3b8; font-size: 0.98rem; margin: 0; }
#gws .transparency-banner { background: rgba(2, 132, 199, 0.08); border: 1px solid rgba(56, 189, 248, 0.25); border-left: 4px solid #38bdf8; border-radius: 10px; padding: 22px 26px; margin-bottom: 40px; display: flex; gap: 18px; align-items: flex-start; }
#gws .transparency-icon { width: 28px; height: 28px; fill: #38bdf8; flex-shrink: 0; margin-top: 2px; }
#gws .transparency-content h3 { font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0 0 8px 0; }
#gws .transparency-content p { font-size: 0.9rem; color: #cbd5e1; margin: 0; line-height: 1.6; }
#gws .steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; }
@media (max-width: 900px) { #gws .steps-grid { grid-template-columns: 1fr; } }
#gws .step-card { background: rgba(14, 22, 37, 0.78); border: 1px solid rgba(56, 189, 248, 0.16); border-radius: 10px; padding: 24px; display: flex; flex-direction: column; position: relative; transition: transform .25s ease, border-color .25s ease; }
#gws .step-card:hover { transform: translateY(-3px); border-color: #38bdf8; }
#gws .step-num-badge { width: 32px; height: 32px; border-radius: 50%; background: rgba(56, 189, 248, 0.15); border: 1px solid #38bdf8; color: #38bdf8; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; margin-bottom: 16px; }
#gws .step-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0 0 8px 0; }
#gws .step-text { font-size: 0.88rem; color: #94a3b8; margin: 0 0 18px 0; line-height: 1.55; flex: 1; }
#gws .mockup-window { background: #004275; border-radius: 6px; padding: 16px; color: #fff; font-size: 0.78rem; box-shadow: 0 8px 20px rgba(0,0,0,0.4); border: 1px solid rgba(255, 255, 255, 0.2); user-select: none; }
#gws .mockup-header { font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
#gws .mockup-header svg { width: 16px; height: 16px; fill: #fff; }
#gws .mockup-body { color: #e0f2fe; line-height: 1.4; margin-bottom: 12px; }
#gws .mockup-link-target { color: #fff; text-decoration: underline; font-weight: 700; padding: 2px 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); display: inline-block; }
#gws .mockup-btn-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
#gws .mockup-btn { padding: 6px 14px; font-size: 0.76rem; border-radius: 3px; font-weight: 600; border: none; cursor: default; }
#gws .mockup-btn-primary { background: #38bdf8; color: #00223d; font-weight: 700; box-shadow: 0 0 10px rgba(56, 189, 248, 0.6); }
#gws .mockup-btn-secondary { background: rgba(255, 255, 255, 0.15); color: #fff; }
#gws .changelog-section { padding: 60px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
#gws .timeline-list { display: flex; flex-direction: column; gap: 28px; max-width: 860px; margin: 0 auto; }
#gws .timeline-card { background: rgba(14, 22, 37, 0.78); border: 1px solid rgba(56, 189, 248, 0.16); border-radius: 10px; padding: 28px; position: relative; }
#gws .timeline-card.is-latest { border-color: rgba(56, 189, 248, 0.5); box-shadow: 0 0 25px rgba(56, 189, 248, 0.08); }
#gws .timeline-card.is-latest::before { content: 'Dernière Version'; position: absolute; top: -10px; right: 24px; background: #38bdf8; color: #05080f; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 2px 10px; border-radius: 20px; }
#gws .timeline-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); padding-bottom: 12px; margin-bottom: 18px; }
#gws .timeline-version { font-family: 'Comfortaa', cursive; font-size: 1.35rem; font-weight: 700; color: #fff; margin: 0; }
#gws .timeline-date { font-size: 0.82rem; color: #94a3b8; }
#gws .changelog-items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
#gws .changelog-items li { font-size: 0.92rem; color: #cbd5e1; position: relative; padding-left: 20px; line-height: 1.5; }
#gws .changelog-items li::before { content: '▸'; position: absolute; left: 0; color: #38bdf8; }
#gws .visuals-section { padding: 60px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
#gws .visuals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 768px) { #gws .visuals-grid { grid-template-columns: 1fr; } }
#gws .visual-card { background: rgba(14, 22, 37, 0.78); border: 1px solid rgba(56, 189, 248, 0.16); border-radius: 10px; overflow: hidden; transition: transform .25s ease, border-color .25s ease; }
#gws .visual-card:hover { transform: translateY(-3px); border-color: #38bdf8; }
#gws .visual-card img { width: 100%; height: auto; display: block; }
#gws .visual-caption { padding: 14px 18px; font-size: 0.86rem; color: #94a3b8; border-top: 1px solid rgba(255, 255, 255, 0.06); background: rgba(10, 15, 24, 0.9); }
#gws .specs-section { padding: 60px 0 80px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
#gws .specs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { #gws .specs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { #gws .specs-grid { grid-template-columns: 1fr; } }
#gws .spec-box { background: rgba(14, 22, 37, 0.78); border: 1px solid rgba(56, 189, 248, 0.16); border-radius: 6px; padding: 18px; }
#gws .spec-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: #38bdf8; font-weight: 700; margin-bottom: 6px; }
#gws .spec-val { font-size: 0.95rem; font-weight: 600; color: #fff; margin-bottom: 4px; }
#gws .spec-note { font-size: 0.8rem; color: #64748b; }
`;
if (!oldAppsCssRegex.test(html)) {
console.error('[ERREUR] Impossible de trouver le bloc CSS #apps existant');
process.exit(1);
}
html = html.replace(oldAppsCssRegex, newDarkroomCss);
console.log('✓ CSS #apps modernisé en darkroom alpine et styles #gws intégrés.');
// 3. NAVIGATION HTML (spa-nav)
const oldNavRegex = /<nav class="spa-nav">[\s\S]*?<\/nav>/;
const newNavHtml = `<nav class="spa-nav">
<a href="#accueil" data-spa="accueil">Accueil</a>
<a href="#portfolio" data-spa="portfolio">Portfolio</a>
<a href="#realisations" data-spa="realisations">Réalisations</a>
<a href="#apropos" data-spa="apropos">L'envers du Décor</a>
<a href="#apps" data-spa="apps">Écosystème &amp; Apps</a>
<a href="#gws" data-spa="gws" class="spa-nav-gws"><span class="nav-gws-pulse"></span>Weather Studio</a>
<a href="#news" data-spa="news">Carnet de bord</a>
</nav>`;
if (!oldNavRegex.test(html)) {
console.error('[ERREUR] Impossible de trouver le bloc <nav class="spa-nav">');
process.exit(1);
}
html = html.replace(oldNavRegex, newNavHtml);
console.log('✓ Navigation HTML .spa-nav enrichie avec Écosystème et Weather Studio.');
// 4. FICHE GWS DANS #apps : REMPLACEMENT DU TAG OBSOLÈTE PAR DES ACTIONS ACTIVES ET SHA-256
const oldGwsTopCardRegex = /<article class="app-card-detailed" id="app-weather-studio">[\s\S]*?<div class="app-card-top">[\s\S]*?<span class="app-status-tag">Disponible prochainement au téléchargement<\/span>[\s\S]*?<\/div>/;
const newGwsTopCardHtml = `<article class="app-card-detailed" id="app-weather-studio">
<div class="app-card-top">
<div class="app-title-group">
<img src="assets/apps/gastinel-weather-studio/icone.webp" alt="Icône Gastinel Weather Studio" class="app-icon-img" width="48" height="48" loading="lazy">
<div>
<h3 class="app-main-title">Gastinel Weather Studio</h3>
<div style="font-size:0.78rem;color:#38bdf8;font-weight:600;margin-top:2px;">Station logicielle d'analyse microclimatique du Vercors</div>
</div>
</div>
<div class="app-status-actions-wrap">
<span class="app-status-badge available"><span class="badge-dot"></span>Disponible &middot; v0.3.5 (Windows 64-bit)</span>
<a href="https://gastinel.me/gws/downloads/Gastinel_Weather_Studio_0.3.5_x64-setup.exe" class="app-btn-download-quick" download>
<svg class="svg-icon" viewBox="0 0 448 512" aria-hidden="true" style="width:14px;height:14px;"><path d="M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"/></svg>
<span>Télécharger (.exe)</span>
</a>
<a href="#gws" data-spa="gws" class="app-btn-hub-quick">
<span>Hub &amp; Guide Defender ➔</span>
</a>
</div>
</div>`;
if (!oldGwsTopCardRegex.test(html)) {
console.error('[ERREUR] Impossible de trouver le bloc en-tête de Gastinel Weather Studio');
process.exit(1);
}
html = html.replace(oldGwsTopCardRegex, newGwsTopCardHtml);
console.log('✓ En-tête de la fiche GWS mis à jour avec badges de disponibilité et boutons de téléchargement direct.');
// Ajout du bloc d'intégrité rapide à la fin de la fiche GWS dans #apps
const oldGwsCardEndRegex = /<\/div>\s*<\/article>\s*<article class="app-card-detailed" id="app-vercors-map">/;
const newGwsCardEndHtml = ` <div class="app-inline-integrity">
<div>
<span style="color:#38bdf8;font-weight:700;margin-right:6px;">Empreinte officielle SHA-256 :</span>
<code>6B2935E732A35175D01F586D7D8578DF63FB445444460464039FEBC7EA841CCA</code>
</div>
<button type="button" class="app-inline-copy-btn" data-copy="6B2935E732A35175D01F586D7D8578DF63FB445444460464039FEBC7EA841CCA">Copier le hash</button>
</div>
</div>
</article>
<article class="app-card-detailed" id="app-vercors-map">`;
if (!oldGwsCardEndRegex.test(html)) {
console.error('[ERREUR] Impossible de trouver la fin de la fiche GWS');
process.exit(1);
}
html = html.replace(oldGwsCardEndRegex, newGwsCardEndHtml);
console.log('✓ Bloc intégrité SHA-256 1-clic injecté dans la fiche GWS.');
// 5. INJECTION DE LA SECTION #gws DANS INDEX.HTML
const appsSectionEndRegex = /<\/section>\s*<section id="deroulement" class="spa-section">/;
const gwsSectionHtml = `</section>
<!-- ==========================================================================
SECTION SPA DÉDIÉE : SAS & HUB OFFICIEL GASTINEL WEATHER STUDIO (#gws)
========================================================================== -->
<section id="gws" class="spa-section">
<div class="container">
<!-- En-tête héroïque -->
<div class="gws-hero" id="spa-gws-telecharger">
<div class="gws-badge-row">
<div class="status-dot"></div>
<span class="status-text">Station microclimatique &middot; Canal de distribution officiel</span>
</div>
<h1>Gastinel Weather Studio</h1>
<p class="gws-hero-subtitle">« Traquer, comparer, comprendre le froid. »</p>
<p class="gws-hero-desc">
Suite d'investigation thermique et cartographique conçue pour l'instrumentation des dépressions fermées et trous à froid (TAF) du massif du Vercors. Binaire autonome, sans dépendance logicielle lourde, compilé en code machine natif en Rust.
</p>
<!-- Boîte de téléchargement direct -->
<div class="download-action-box">
<div class="download-options-grid">
<!-- Option 1 : Installateur Standard (.exe) -->
<div class="primary-download-card">
<div>
<div class="card-title-row">
<h3 class="card-title">Installateur Windows</h3>
<span class="card-tag tag-recommended">Recommandé</span>
</div>
<p class="card-desc">Assistant d'installation complet pour Windows 10 &amp; 11 (64-bit).</p>
<div class="card-meta-list">
<span>Architecture : <strong>x86_64 native (Rust + Tauri)</strong></span>
<span>Poids : <strong>~3.6 Mo</strong> &middot; Version : <strong id="spaHeroVersionLabel">v0.3.5</strong></span>
</div>
</div>
<a href="https://gastinel.me/gws/downloads/Gastinel_Weather_Studio_0.3.5_x64-setup.exe" class="btn-main-download" id="spaHeroDownloadBtnExe" download>
<svg viewBox="0 0 448 512" aria-hidden="true"><path d="M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"/></svg>
<span>Télécharger l'installateur (.exe)</span>
</a>
</div>
<!-- Option 2 : Paquet de mise à jour (.gws) -->
<div class="alt-download-card">
<div>
<div class="card-title-row">
<h3 class="card-title">Paquet Autonome</h3>
<span class="card-tag tag-nosmartscreen">Sans SmartScreen</span>
</div>
<p class="card-desc">Archive cryptographiquement signée, ouvrable directement au sein de GWS sans alerte antivirus.</p>
<div class="card-meta-list">
<span>Format : <strong>Archive .gws (manifeste + binaire)</strong></span>
<span>Idéal si GWS est déjà installé ou pour mise à jour rapide.</span>
</div>
</div>
<a href="https://gastinel.me/gws/downloads/update-0.3.5.gws" class="btn-alt-download" id="spaHeroDownloadBtnGws" download>
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line></svg>
<span>Télécharger le paquet (.gws)</span>
</a>
</div>
</div>
<!-- API Live Bar -->
<div class="api-live-bar">
<div class="api-status-badge">
<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>
<span id="spaApiStatusMessage">Connecté au canal de version en direct (gastinel.me/gws/api/v1)</span>
</div>
<button type="button" class="api-refresh-btn" id="spaApiRefreshBtn">Vérifier les mises à jour</button>
</div>
</div>
</div>
<!-- Section Intégrité SHA-256 -->
<div class="sha-section">
<div class="sha-card">
<div class="sha-header">
<div class="sha-title">
<svg viewBox="0 0 24 24"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></svg>
<span>Empreinte cryptographique officielle (SHA-256)</span>
</div>
<span style="font-size:0.78rem;color:#94a3b8;">Contrôle d'intégrité strict avant exécution</span>
</div>
<div class="sha-code-container">
<span class="sha-hash" id="spaSha256Value">6B2935E732A35175D01F586D7D8578DF63FB445444460464039FEBC7EA841CCA</span>
<button type="button" class="copy-btn" id="spaCopyShaBtn" aria-label="Copier le hash SHA-256">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
<span id="spaCopyShaText">Copier le hash</span>
</button>
</div>
<div class="sha-terminal-cmd">
<div>
<span style="color:#38bdf8;font-weight:600;margin-right:6px;">Commande PowerShell :</span>
<code>Get-FileHash "Gastinel_Weather_Studio_*.exe" -Algorithm SHA256</code>
</div>
<button type="button" class="copy-btn" id="spaCopyCmdBtn" style="padding:4px 10px;font-size:0.74rem;">
Copier la commande
</button>
</div>
</div>
</div>
<!-- Guide Pas-à-Pas Anti-SmartScreen / Windows Defender -->
<div class="smartscreen-section">
<div class="section-intro-header">
<span class="section-tag">Transparence & Sécurité</span>
<h2>Installation sereine sous Windows</h2>
<p>
Lors du premier lancement d'un exécutable indépendant, Microsoft Defender SmartScreen peut afficher un écran bleu de prévention. Voici la marche à suivre pas-à-pas en toute sérénité.
</p>
</div>
<!-- Explication transparente -->
<div class="transparency-banner">
<svg class="transparency-icon" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>
<div class="transparency-content">
<h3>Pourquoi Windows affiche-t-il cet avertissement ?</h3>
<p>
Gastinel Weather Studio est un logiciel artisanal développé dans le Vercors, compilé localement en Rust natif, sans publicité ni télémétrie commerciale. Microsoft impose un certificat d'entreprise payant (EV, plusieurs centaines d'euros par an) pour dispenser les applications de cet écran. En l'absence de ce certificat commercial, Windows alerte par défaut sur les binaires récents. Le code est sain et certifié par l'empreinte SHA-256 ci-dessus.
</p>
</div>
</div>
<!-- Grille 3 étapes interactives -->
<div class="steps-grid">
<!-- Étape 1 -->
<div class="step-card">
<div class="step-num-badge">1</div>
<h3 class="step-title">L'écran d'alerte apparaît</h3>
<p class="step-text">
Windows affiche la fenêtre bleue « Windows a protégé votre ordinateur ». Ne cliquez pas sur « Ne pas exécuter ». Cliquez sur le lien textuel discret <strong>« Informations complémentaires »</strong>.
</p>
<div class="mockup-window">
<div class="mockup-header">
<svg viewBox="0 0 24 24"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></svg>
<span>Windows a protégé votre ordinateur</span>
</div>
<div class="mockup-body">
Microsoft Defender SmartScreen a empêché le démarrage d'une application non reconnue...<br><br>
<span class="mockup-link-target">Informations complémentaires ➔</span>
</div>
<div class="mockup-btn-row">
<div class="mockup-btn mockup-btn-secondary">Ne pas exécuter</div>
</div>
</div>
</div>
<!-- Étape 2 -->
<div class="step-card">
<div class="step-num-badge">2</div>
<h3 class="step-title">Débloquer l'exécution</h3>
<p class="step-text">
Les détails du fichier s'affichent (« Application : Gastinel Weather Studio »). Le bouton <strong>« Exécuter quand même »</strong> apparaît alors en bas à droite. Cliquez dessus.
</p>
<div class="mockup-window">
<div class="mockup-header">
<svg viewBox="0 0 24 24"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></svg>
<span>Windows a protégé votre ordinateur</span>
</div>
<div class="mockup-body" style="font-size:0.72rem;">
Application : <strong>Gastinel_Weather_Studio_setup.exe</strong><br>
Éditeur : <strong>Théo Gastinel</strong>
</div>
<div class="mockup-btn-row">
<div class="mockup-btn mockup-btn-primary">Exécuter quand même ➔</div>
<div class="mockup-btn mockup-btn-secondary">Ne pas exécuter</div>
</div>
</div>
</div>
<!-- Étape 3 -->
<div class="step-card">
<div class="step-num-badge">3</div>
<h3 class="step-title">Lancement instantané</h3>
<p class="step-text">
L'assistant d'installation ou l'application se lance normalement. Windows mémorise votre choix et ne vous redemandera plus cette confirmation pour les lancements ultérieurs.
</p>
<div class="mockup-window" style="background:#0a1726;border-color:rgba(16,185,129,0.3);">
<div class="mockup-header" style="color:#10b981;">
<svg viewBox="0 0 24 24" style="fill:#10b981;"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>
<span>Installation autorisée</span>
</div>
<div class="mockup-body" style="color:#94a3b8;">
Le binaire est vérifié et s'exécute dans un environnement local sécurisé. Vos projets de terrain sont prêts.
</div>
<div class="mockup-btn-row">
<div class="mockup-btn" style="background:#10b981;color:#040d1a;font-weight:700;">Prêt à l'emploi ✓</div>
</div>
</div>
</div>
</div>
</div>
<!-- Changelog & Nouveautés Grand Format -->
<div class="changelog-section">
<div class="section-intro-header">
<span class="section-tag">Historique des versions</span>
<h2>Nouveautés & Évolutions</h2>
<p>Retrouvez le journal exhaustif des évolutions architecturales et fonctionnelles de Gastinel Weather Studio.</p>
</div>
<div class="timeline-list">
<!-- v0.3.5 / v0.3.4 -->
<article class="timeline-card is-latest">
<div class="timeline-top">
<h3 class="timeline-version">Version 0.3.5 &middot; Affinage Cartographique & Ergonomie</h3>
<span class="timeline-date">23 septembre 2026</span>
</div>
<ul class="changelog-items">
<li><strong>Carte de terrain allégée :</strong> Remplacement de l'infobulle volumineuse par un badge compact sombre et contrasté (nom, altitude, typologie de cuvette) au survol des stations.</li>
<li><strong>Création intuitive de stations :</strong> Suppression des bandeaux textuels encombrants et du bouton flottant ; création directe de points d'acquisition par clic droit géoréférencé ou appui long tactile.</li>
<li><strong>Guide de démarrage pas-à-pas :</strong> Nouveau guide visuel au premier lancement présentant les grands principes de l'inversion thermique et des TAF, réactivable à tout moment depuis les Paramètres.</li>
<li><strong>Format de paquet souverain <code>.gws</code> :</strong> Intégration de la distribution autonome évitant les déclenchements SmartScreen lors des mises à jour incrémentales.</li>
<li><strong>Moteur d'analyse synchrone :</strong> Alignement temporel automatique des séries brutes issues de loggers hétérogènes.</li>
</ul>
</article>
<!-- v0.3.3 & v0.3.2 -->
<article class="timeline-card">
<div class="timeline-top">
<h3 class="timeline-version">Version 0.3.3 &amp; 0.3.2 &middot; Décodage USB RC-5 Natif</h3>
<span class="timeline-date">23 septembre 2026</span>
</div>
<ul class="changelog-items">
<li><strong>Pilote Elitech RC-5 / RC-5+ direct :</strong> Décodage direct des trames USB propriétaires sans dépendre de logiciels constructeurs fermés.</li>
<li><strong>Filtrage thermique physique :</strong> Détection automatisée des capteurs enfouis sous le manteau neigeux modifiant artificiellement la cinétique thermique.</li>
<li><strong>Supervision mémoire :</strong> Réduction de 40% de l'empreinte RAM lors de la manipulation de séries dépassant 50 000 points.</li>
</ul>
</article>
<!-- v0.3.1 & v0.3.0 -->
<article class="timeline-card">
<div class="timeline-top">
<h3 class="timeline-version">Version 0.3.0 &middot; Architecture Tauri 2 & Dossiers HTML</h3>
<span class="timeline-date">19 septembre 2026</span>
</div>
<ul class="changelog-items">
<li><strong>Moteur d'exportation universel :</strong> Génération de classeurs d'analyse HTML autonomes et interactifs, lisibles hors-ligne sans installation.</li>
<li><strong>Interconnexion API Infoclimat :</strong> Synchronisation automatique des données de la station Grande Moucherolle et des balises Davis Vantage Pro 2 environnantes.</li>
<li><strong>Classification à 4 degrés morphologiques :</strong> Grille de lecture spécifique à la volumétrie des dépressions alpines (fond de doline vs crête d'écoulement).</li>
</ul>
</article>
</div>
</div>
<!-- Captures d'écran Grand Format -->
<div class="visuals-section">
<div class="section-intro-header">
<span class="section-tag">Aperçu en situation</span>
<h2>Conçu pour le terrain et le laboratoire</h2>
<p>Une ergonomie unifiée pensée pour les conditions extrêmes, calquée sur les standards de précision technique.</p>
</div>
<div class="visuals-grid">
<div class="visual-card">
<img src="assets/apps/gastinel-weather-studio/studio.webp" alt="Comparateur multi-séries thermiques" loading="lazy" width="1200" height="648">
<div class="visual-caption">Interface Studio : confrontation synchronisée des minima radiatifs et identification des anomalies de refroidissement.</div>
</div>
<div class="visual-card">
<img src="assets/apps/gastinel-weather-studio/accueil.webp" alt="Carte topographique du Vercors" loading="lazy" width="1200" height="653">
<div class="visual-caption">Cartographie IGN haute précision : indexation des reliefs et création géoréférencée des stations d'observation.</div>
</div>
<div class="visual-card">
<img src="assets/apps/gastinel-weather-studio/logger.webp" alt="Importation de logger USB" loading="lazy" width="500" height="694" style="max-height:450px;object-fit:cover;object-position:top;">
<div class="visual-caption">Module d'acquisition directe : lecture immédiate des loggers Elitech RC-5 sans pilote externe.</div>
</div>
<div class="visual-card" style="display:flex;flex-direction:column;justify-content:center;padding:30px;background:linear-gradient(145deg,rgba(2,132,199,0.1),rgba(15,23,42,0.8));">
<h3 style="font-family:'Comfortaa',cursive;color:#fff;font-size:1.4rem;margin:0 0 12px 0;">Souveraineté des données de mesure</h3>
<p style="color:#94a3b8;font-size:0.92rem;line-height:1.6;margin:0 0 20px 0;">
Chaque température enregistrée reste stockée dans une base SQLite locale sur votre propre machine. Aucune télémétrie, aucune transmission vers un serveur distant, aucune dépendance au cloud.
</p>
<a href="#spa-gws-telecharger" class="btn-main-download" style="margin-top:0;align-self:flex-start;">
<span>Télécharger Gastinel Weather Studio</span>
</a>
</div>
</div>
</div>
<!-- Spécifications & Exigences système -->
<div class="specs-section">
<div class="section-intro-header">
<span class="section-tag">Spécifications techniques</span>
<h2>Exigences minimales du système</h2>
</div>
<div class="specs-grid">
<div class="spec-box">
<div class="spec-label">Système d'exploitation</div>
<div class="spec-val">Windows 10 / 11</div>
<div class="spec-note">Architecture 64-bit (x86_64)</div>
</div>
<div class="spec-box">
<div class="spec-label">Mémoire vive (RAM)</div>
<div class="spec-val">&lt; 200 Mo</div>
<div class="spec-note">Empreinte ultra-légère en exécution</div>
</div>
<div class="spec-box">
<div class="spec-label">Espace disque</div>
<div class="spec-val">~35 Mo</div>
<div class="spec-note">Binaire compact + runtime WebView2</div>
</div>
<div class="spec-box">
<div class="spec-label">Matériel supporté</div>
<div class="spec-val">Elitech RC-5 / RC-5+</div>
<div class="spec-note">USB natif, CSV/XLS, Davis VP2</div>
</div>
</div>
</div>
</div>
</section>
<section id="deroulement" class="spa-section">`;
if (!appsSectionEndRegex.test(html)) {
console.error('[ERREUR] Impossible de trouver la fin de la section #apps');
process.exit(1);
}
html = html.replace(appsSectionEndRegex, gwsSectionHtml);
console.log('✓ Section SPA dédiée #gws insérée avec succès dans index.html.');
// 6. ROUTEUR SPA (ROUTES, go(route) et Modules.gws)
const oldRoutesRegex = /var ROUTES=\['accueil','portfolio','realisations','apropos','apps','application','deroulement','termes','news','carnet'\];/;
const newRoutesStr = `var ROUTES=['accueil','portfolio','realisations','apropos','apps','application','gws','telechargement','deroulement','termes','news','carnet'];`;
if (!oldRoutesRegex.test(html)) {
console.error('[ERREUR] Impossible de trouver la déclaration de var ROUTES');
process.exit(1);
}
html = html.replace(oldRoutesRegex, newRoutesStr);
console.log('✓ Déclaration var ROUTES étendue avec gws et telechargement.');
// Redirection de telechargement vers gws dans go(route)
const oldGoRouteCheck = `if(route==='application') route='apps';`;
const newGoRouteCheck = `if(route==='application') route='apps';${eol} if(route==='telechargement') route='gws';`;
if (!html.includes(oldGoRouteCheck)) {
console.error('[ERREUR] Impossible de trouver oldGoRouteCheck');
process.exit(1);
}
html = html.replace(oldGoRouteCheck, newGoRouteCheck);
console.log('✓ Router go(route) mis à jour pour rediriger telechargement vers gws.');
// Ajout du module Modules.gws et enrichissement de Modules.apps
const oldModulesAppsRegex = /apps:function\(root\)\{\s*initSmoothDetails\(root\);\s*\},/;
const newModulesAppsStr = `apps:function(root){
initSmoothDetails(root);
var copyBtn = root.querySelector('.app-inline-copy-btn');
if(copyBtn){
copyBtn.addEventListener('click', function(){
var hash = copyBtn.getAttribute('data-copy');
if(navigator.clipboard && hash){
navigator.clipboard.writeText(hash).then(function(){
var orig = copyBtn.textContent;
copyBtn.textContent = 'Hash copié !';
setTimeout(function(){ copyBtn.textContent = orig; }, 2000);
});
}
});
}
},
gws:function(root){
var API_URL = 'https://gastinel.me/gws/api/v1/update/windows/x86_64/0.0.0';
var DEFAULT_VERSION = '0.3.5';
// Copie SHA-256
var copyShaBtn = root.querySelector('#spaCopyShaBtn');
var sha256Value = root.querySelector('#spaSha256Value');
var copyShaText = root.querySelector('#spaCopyShaText');
if (copyShaBtn && sha256Value) {
copyShaBtn.addEventListener('click', function() {
var text = sha256Value.textContent.trim();
if (navigator.clipboard) {
navigator.clipboard.writeText(text).then(function() {
copyShaBtn.classList.add('copied');
if (copyShaText) copyShaText.textContent = 'Hash copié !';
setTimeout(function() {
copyShaBtn.classList.remove('copied');
if (copyShaText) copyShaText.textContent = 'Copier le hash';
}, 2200);
});
}
});
}
// Copie Commande PowerShell
var copyCmdBtn = root.querySelector('#spaCopyCmdBtn');
if (copyCmdBtn) {
copyCmdBtn.addEventListener('click', function() {
var cmd = 'Get-FileHash "Gastinel_Weather_Studio_*.exe" -Algorithm SHA256';
if (navigator.clipboard) {
navigator.clipboard.writeText(cmd).then(function() {
copyCmdBtn.textContent = 'Commande copiée !';
setTimeout(function() { copyCmdBtn.textContent = 'Copier la commande'; }, 2000);
});
}
});
}
// Interrogation de l'API en direct
function checkLive() {
var statusMsg = root.querySelector('#spaApiStatusMessage');
var heroVer = root.querySelector('#spaHeroVersionLabel');
var exeBtn = root.querySelector('#spaHeroDownloadBtnExe');
var gwsBtn = root.querySelector('#spaHeroDownloadBtnGws');
if (statusMsg) statusMsg.textContent = 'Interrogation de l\\'API gastinel.me en cours...';
fetch(API_URL, { cache: 'no-cache' })
.then(function(resp) {
if (!resp.ok && resp.status !== 204) throw new Error('HTTP ' + resp.status);
if (resp.status === 204) return null;
return resp.json();
})
.then(function(data) {
if (data && data.version) {
var v = data.version;
if (heroVer) heroVer.textContent = 'v' + v;
if (data.url && exeBtn) exeBtn.href = data.url;
if (gwsBtn) gwsBtn.href = 'https://gastinel.me/gws/downloads/update-' + v + '.gws';
if (statusMsg) statusMsg.textContent = 'Dernière version confirmée en ligne : v' + v + ' (Canal stable)';
} else {
if (statusMsg) statusMsg.textContent = 'Version courante vérifiée : v' + DEFAULT_VERSION;
}
})
.catch(function() {
if (statusMsg) statusMsg.textContent = 'Canal officiel actif · Version locale par défaut v' + DEFAULT_VERSION;
});
}
var refreshBtn = root.querySelector('#spaApiRefreshBtn');
if (refreshBtn) {
refreshBtn.addEventListener('click', function(e) {
e.preventDefault();
checkLive();
});
}
checkLive();
},`;
if (!oldModulesAppsRegex.test(html)) {
console.error('[ERREUR] Impossible de trouver Modules.apps');
process.exit(1);
}
html = html.replace(oldModulesAppsRegex, newModulesAppsStr);
console.log('✓ Modules.apps et Modules.gws connectés avec gestion du presse-papier et de l\'API live.');
// 7. FOOTER : AJOUT D'UN LIEN DIRECT VERS LE HUB WEATHER STUDIO
const oldFooterBottomRegex = /<div class="footer-bottom">© 2026 THÉO - SOLUTIONS VISUELLES & ACQUISITION OPTIQUE \|/;
const newFooterBottomStr = `<div class="footer-bottom">© 2026 THÉO - SOLUTIONS VISUELLES & ACQUISITION OPTIQUE | <a href="#gws" data-spa="gws" style="color:#38bdf8;font-weight:600;">Téléchargement GWS</a> |`;
if (oldFooterBottomRegex.test(html)) {
html = html.replace(oldFooterBottomRegex, newFooterBottomStr);
console.log('✓ Lien Téléchargement GWS ajouté dans le footer.');
}
// 8. ÉCRITURE DU FICHIER MIS À JOUR
fs.writeFileSync(INDEX_HTML, html, 'utf8');
console.log('🎉 SUCCÈS : _Site/index.html mis à jour intégralement !');