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

1822 lignes
58 KiB
JavaScript

const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');
const SITE_DIR = path.resolve(__dirname, '..');
const ACTUAL_DIR = path.resolve(SITE_DIR, '../Actual_Website');
const GWS_HTML_PATH = path.join(SITE_DIR, 'gws/index.html');
const INDEX_HTML_PATH = path.join(SITE_DIR, 'index.html');
console.log('[STRUCTURE-GWS] Début de la refonte structurelle...');
// =========================================================================
// 1. GÉNÉRATION DE gws/index.html AVEC SÉPARATION STRICTE & EXPLICATION DES PAQUETS
// =========================================================================
const fullGwsPageHtml = `<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gastinel Weather Studio — Présentation & Téléchargement officiel (Windows 64-bit)</title>
<meta name="description" content="Gastinel Weather Studio (GWS) : station logicielle d'analyse microclimatique et traque des trous à froid (TAF) du Vercors. Présentation complète des fonctionnalités et espace de téléchargement officiel (.exe et .gws).">
<link rel="canonical" href="https://gastinel.me/gws/">
<meta name="robots" content="index, follow, max-image-preview:large">
<meta name="author" content="Théo Gastinel">
<!-- Open Graph / Twitter Cards -->
<meta property="og:type" content="website">
<meta property="og:locale" content="fr_FR">
<meta property="og:url" content="https://gastinel.me/gws/">
<meta property="og:site_name" content="Gastinel Weather Studio — Station de recherche microclimatique">
<meta property="og:title" content="Gastinel Weather Studio — Présentation & Téléchargement officiel">
<meta property="og:description" content="Station logicielle dédiée à l'investigation des dépressions fermées et trous à froid du Vercors. Décodage USB Elitech RC-5 natif, comparateur multi-séries et cartographie haute précision.">
<meta property="og:image" content="https://gastinel.me/assets/apps/gastinel-weather-studio/studio.webp">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="648">
<meta name="twitter:card" content="summary_large_image">
<!-- Schema.org SoftwareApplication -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "Gastinel Weather Studio",
"operatingSystem": "Windows 10, Windows 11 (64-bit)",
"applicationCategory": "WeatherApplication",
"softwareVersion": "0.4.0",
"fileFormat": "application/x-msdownload",
"fileSize": "3.6MB",
"downloadUrl": "https://gastinel.me/gws/downloads/Gastinel_Weather_Studio_0.4.0_x64-setup.exe",
"author": {
"@type": "Person",
"name": "Théo Gastinel",
"url": "https://gastinel.me/"
},
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "EUR"
}
}
</script>
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 500'%3E%3Ccircle cx='250' cy='250' r='230' fill='%231e4d8b'/%3E%3Cpath d='M 80 280 L 170 210 L 210 230 L 250 140 L 290 190 L 330 160 L 420 280' fill='none' stroke='%23fff' stroke-width='24' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E">
<link rel="preload" href="../assets/fonts/inter-latin.woff2" as="font" type="font/woff2" crossorigin>
<style>
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('../assets/fonts/inter-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('../assets/fonts/inter-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('../assets/fonts/inter-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('../assets/fonts/inter-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
/* Charte officielle Gastinel Weather Studio (src/styles.css) */
--blue-900: #123a6b;
--blue-700: #1e4d8b;
--blue-500: #3a72bd;
--blue-050: #eef3fa;
--grey-900: #1a1d21;
--grey-700: #3f464f;
--grey-500: #6b7480;
--grey-300: #b9c0c9;
--grey-200: #e8eaed;
--grey-100: #f1f3f5;
--bg: #fafbfc;
--card-bg: #ffffff;
--danger: #b3261e;
--danger-bg: #fdeceb;
--warn: #8a5a00;
--warn-bg: #fff6e5;
--ok: #1c6b45;
--ok-bg: #e9f5ef;
--radius-sm: 6px;
--radius-md: 8px;
--radius-lg: 12px;
--shadow-sm: 0 1px 2px rgba(18, 58, 107, 0.05);
--shadow-md: 0 1px 3px rgba(18, 58, 107, 0.08), 0 4px 12px rgba(18, 58, 107, 0.04);
--shadow-lg: 0 8px 24px rgba(18, 58, 107, 0.08);
--font-sans: 'Inter', system-ui, -apple-system, sans-serif;
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
margin: 0;
padding: 0;
background-color: var(--bg);
color: var(--grey-900);
font-family: var(--font-sans);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
.page-wrapper {
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Header & Navigation */
.gws-nav {
position: sticky;
top: 0;
z-index: 50;
background: rgba(255, 255, 255, 0.96);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-bottom: 1px solid var(--grey-200);
box-shadow: var(--shadow-sm);
padding: 12px 24px;
}
.gws-nav-inner {
max-width: 1200px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 16px;
}
.gws-brand {
display: flex;
align-items: center;
gap: 12px;
text-decoration: none;
color: var(--grey-900);
}
.gws-nav-icon {
width: 36px;
height: 36px;
border-radius: var(--radius-sm);
border: 1px solid var(--grey-200);
background: #ffffff;
padding: 2px;
}
.gws-brand-title {
font-weight: 700;
font-size: 1.15rem;
letter-spacing: -0.3px;
color: var(--blue-900);
}
.gws-brand-badge {
font-size: 0.68rem;
text-transform: uppercase;
letter-spacing: 0.8px;
background: var(--blue-050);
color: var(--blue-700);
border: 1px solid #d4e2f4;
padding: 2px 8px;
border-radius: 4px;
font-weight: 700;
}
/* Onglets Majeurs de Navigation (Présentation vs Téléchargements) */
.gws-mode-switch {
display: flex;
align-items: center;
gap: 6px;
background: var(--grey-100);
padding: 4px;
border-radius: var(--radius-md);
border: 1px solid var(--grey-200);
}
.gws-tab-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 18px;
font-size: 0.88rem;
font-weight: 600;
color: var(--grey-700);
text-decoration: none;
border-radius: 6px;
transition: all 0.15s ease;
}
.gws-tab-btn:hover {
color: var(--blue-900);
}
.gws-tab-btn.active {
background: #ffffff;
color: var(--blue-700);
box-shadow: 0 1px 3px rgba(18, 58, 107, 0.1);
}
.gws-tab-btn .tab-badge-accent {
background: var(--blue-700);
color: #fff;
font-size: 0.7rem;
padding: 1px 6px;
border-radius: 10px;
}
.gws-back-site {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 0.84rem;
font-weight: 600;
color: var(--grey-700);
background: var(--grey-100);
border: 1px solid var(--grey-200);
padding: 7px 14px;
border-radius: var(--radius-sm);
text-decoration: none;
transition: all 0.15s ease;
}
.gws-back-site:hover {
background: var(--grey-200);
color: var(--grey-900);
}
/* Container */
.container {
max-width: 1140px;
margin: 0 auto;
padding: 0 20px;
}
/* Hero Commun */
.gws-page-hero {
padding: 50px 0 36px;
text-align: center;
background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
border-bottom: 1px solid var(--grey-200);
}
.gws-badge-row {
display: inline-flex;
align-items: center;
gap: 10px;
background: var(--blue-050);
border: 1px solid #d4e2f4;
padding: 6px 16px;
border-radius: 30px;
margin-bottom: 18px;
}
.status-dot {
width: 8px;
height: 8px;
background-color: var(--ok);
border-radius: 50%;
box-shadow: 0 0 6px var(--ok);
}
.status-text {
font-size: 0.8rem;
font-weight: 600;
color: var(--blue-700);
letter-spacing: 0.3px;
}
.gws-page-hero h1 {
font-size: clamp(2.2rem, 4.5vw, 3.2rem);
font-weight: 800;
color: var(--blue-900);
letter-spacing: -0.03em;
margin: 0 0 12px 0;
line-height: 1.2;
}
.gws-hero-subtitle {
font-size: clamp(1.05rem, 2vw, 1.25rem);
color: var(--blue-700);
max-width: 760px;
margin: 0 auto 14px auto;
font-weight: 600;
}
.gws-hero-desc {
font-size: 0.98rem;
color: var(--grey-700);
max-width: 740px;
margin: 0 auto;
line-height: 1.65;
}
/* Sections Principales Séparées */
.gws-major-section {
padding: 50px 0;
}
.gws-section-header {
margin-bottom: 36px;
text-align: center;
}
.gws-section-tag {
font-size: 0.74rem;
text-transform: uppercase;
letter-spacing: 1.2px;
color: var(--blue-700);
font-weight: 700;
margin-bottom: 6px;
display: inline-block;
}
.gws-section-title {
font-size: clamp(1.7rem, 3.2vw, 2.3rem);
font-weight: 800;
color: var(--blue-900);
margin: 0 0 10px 0;
}
.gws-section-subtitle {
color: var(--grey-700);
font-size: 0.98rem;
max-width: 750px;
margin: 0 auto;
}
/* =========================================================================
ESPACE 1 : PRÉSENTATION TECHNIQUE DU LOGICIEL
========================================================================= */
.app-problem-box {
background: #ffffff;
border: 1px solid var(--grey-200);
border-left: 4px solid var(--blue-700);
border-radius: var(--radius-md);
padding: 24px 28px;
margin-bottom: 40px;
box-shadow: var(--shadow-sm);
}
.app-problem-box h3 {
color: var(--blue-900);
margin: 0 0 8px 0;
font-size: 1.15rem;
}
.app-problem-box p {
color: var(--grey-700);
margin: 0;
line-height: 1.65;
font-size: 0.95rem;
}
.features-detailed-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 24px;
margin-bottom: 40px;
}
@media (max-width: 800px) {
.features-detailed-grid { grid-template-columns: 1fr; }
}
.feature-box {
background: #ffffff;
border: 1px solid var(--grey-200);
border-radius: var(--radius-md);
padding: 24px;
box-shadow: var(--shadow-sm);
display: flex;
flex-direction: column;
justify-content: space-between;
}
.feature-box-icon {
font-size: 1.6rem;
margin-bottom: 12px;
}
.feature-box h4 {
font-size: 1.1rem;
color: var(--blue-900);
margin: 0 0 8px 0;
font-weight: 700;
}
.feature-box p {
font-size: 0.92rem;
color: var(--grey-700);
margin: 0 0 16px 0;
line-height: 1.55;
flex: 1;
}
.feature-box-media {
border-radius: var(--radius-sm);
overflow: hidden;
border: 1px solid var(--grey-200);
margin-top: 10px;
}
.feature-box-media img {
width: 100%;
height: auto;
display: block;
}
/* Galerie & Visuels */
.visuals-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 22px;
margin-bottom: 40px;
}
@media (max-width: 768px) {
.visuals-grid { grid-template-columns: 1fr; }
}
.visual-card {
background: var(--card-bg);
border: 1px solid var(--grey-200);
border-radius: var(--radius-md);
overflow: hidden;
box-shadow: var(--shadow-sm);
}
.visual-card img {
width: 100%;
height: auto;
display: block;
}
.visual-caption {
padding: 12px 16px;
font-size: 0.84rem;
color: var(--grey-700);
border-top: 1px solid var(--grey-200);
background: var(--grey-100);
}
/* Bandeau d'Appel vers le Téléchargement */
.cta-to-download {
background: linear-gradient(135deg, #123a6b 0%, #1e4d8b 100%);
border-radius: var(--radius-lg);
padding: 32px 30px;
color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 20px;
box-shadow: var(--shadow-md);
margin-top: 20px;
}
.cta-to-download h3 {
font-size: 1.35rem;
margin: 0 0 6px 0;
color: #fff;
}
.cta-to-download p {
margin: 0;
color: #d4e2f4;
font-size: 0.95rem;
}
.btn-cta-white {
background: #ffffff;
color: var(--blue-900);
font-weight: 700;
font-size: 1rem;
padding: 12px 24px;
border-radius: var(--radius-sm);
text-decoration: none;
white-space: nowrap;
transition: all 0.15s ease;
box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.btn-cta-white:hover {
background: var(--blue-050);
color: var(--blue-900);
transform: translateY(-1px);
}
/* =========================================================================
ESPACE 2 : TÉLÉCHARGEMENT & MISES À JOUR (SÉPARÉ ET CLAIR)
========================================================================= */
.gws-download-hub-area {
background: #ffffff;
border: 1px solid var(--grey-200);
border-radius: var(--radius-lg);
padding: 36px 32px;
box-shadow: var(--shadow-lg);
margin-bottom: 40px;
}
/* Guide Comparatif : Quel paquet choisir ? */
.package-explainer-banner {
background: var(--blue-050);
border: 1px solid #d4e2f4;
border-radius: var(--radius-md);
padding: 18px 22px;
margin-bottom: 28px;
display: flex;
align-items: center;
gap: 14px;
}
.package-explainer-banner svg {
width: 24px;
height: 24px;
fill: var(--blue-700);
flex-shrink: 0;
}
.package-explainer-banner p {
margin: 0;
font-size: 0.92rem;
color: var(--blue-900);
line-height: 1.5;
}
.package-explainer-banner strong {
color: var(--blue-900);
}
/* Grille des 2 Paquets bien détaillée */
.packages-choice-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
margin-bottom: 32px;
}
@media (max-width: 850px) {
.packages-choice-grid { grid-template-columns: 1fr; }
}
.package-choice-card {
border: 2px solid var(--grey-200);
border-radius: var(--radius-md);
padding: 26px;
background: #ffffff;
display: flex;
flex-direction: column;
justify-content: space-between;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.package-choice-card.primary {
border-color: #c8daf0;
background: #f7faff;
}
.package-choice-card.primary:hover {
border-color: var(--blue-500);
box-shadow: var(--shadow-md);
}
.package-choice-card.secondary {
border-color: #dce7d9;
background: #f9fdfa;
}
.package-choice-card.secondary:hover {
border-color: var(--ok);
box-shadow: var(--shadow-md);
}
.pkg-header-badge-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.pkg-type-badge {
font-size: 0.72rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.8px;
padding: 3px 8px;
border-radius: 4px;
}
.pkg-badge-blue {
background: var(--blue-050);
color: var(--blue-700);
border: 1px solid #d4e2f4;
}
.pkg-badge-green {
background: var(--ok-bg);
color: var(--ok);
border: 1px solid #b7dfcb;
}
.pkg-size-tag {
font-size: 0.8rem;
color: var(--grey-500);
font-weight: 600;
}
.pkg-card-title {
font-size: 1.25rem;
font-weight: 800;
color: var(--blue-900);
margin: 0 0 6px 0;
}
.pkg-card-target {
font-size: 0.88rem;
font-weight: 700;
color: var(--blue-700);
margin: 0 0 14px 0;
}
.package-choice-card.secondary .pkg-card-target {
color: var(--ok);
}
.pkg-detail-list {
list-style: none;
padding: 0;
margin: 0 0 20px 0;
display: flex;
flex-direction: column;
gap: 8px;
font-size: 0.88rem;
color: var(--grey-700);
}
.pkg-detail-list li {
position: relative;
padding-left: 20px;
line-height: 1.45;
}
.pkg-detail-list li::before {
content: '✓';
position: absolute;
left: 0;
color: var(--blue-700);
font-weight: 700;
}
.package-choice-card.secondary .pkg-detail-list li::before {
color: var(--ok);
}
.btn-pkg-download {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
width: 100%;
padding: 14px 20px;
border-radius: var(--radius-sm);
font-size: 0.98rem;
font-weight: 700;
text-decoration: none;
transition: all 0.15s ease;
}
.btn-pkg-exe {
background: var(--blue-700);
color: #fff;
box-shadow: 0 2px 6px rgba(30, 77, 139, 0.25);
}
.btn-pkg-exe:hover {
background: var(--blue-900);
box-shadow: 0 4px 12px rgba(18, 58, 107, 0.35);
color: #fff;
}
.btn-pkg-gws {
background: var(--ok);
color: #fff;
box-shadow: 0 2px 6px rgba(28, 107, 69, 0.25);
}
.btn-pkg-gws:hover {
background: #145034;
box-shadow: 0 4px 12px rgba(28, 107, 69, 0.35);
color: #fff;
}
/* API Status Live Bar */
.api-live-bar {
padding-top: 18px;
border-top: 1px solid var(--grey-200);
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
font-size: 0.82rem;
color: var(--grey-500);
}
.api-status-badge {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--ok);
font-weight: 600;
}
.api-status-badge svg {
width: 14px;
height: 14px;
fill: currentColor;
}
.api-refresh-btn {
background: none;
border: none;
color: var(--blue-700);
cursor: pointer;
font-size: 0.82rem;
font-family: inherit;
font-weight: 600;
padding: 0;
text-decoration: underline;
}
/* SHA-256 Card */
.sha-card {
background: #ffffff;
border: 1px solid var(--grey-200);
border-radius: var(--radius-md);
padding: 24px 28px;
box-shadow: var(--shadow-sm);
margin-bottom: 36px;
}
.sha-header {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 12px;
}
.sha-title {
display: flex;
align-items: center;
gap: 10px;
font-size: 1.02rem;
font-weight: 700;
color: var(--blue-900);
}
.sha-title svg {
width: 18px;
height: 18px;
fill: var(--blue-700);
}
.sha-code-container {
display: flex;
align-items: center;
gap: 12px;
background: var(--grey-100);
border: 1px solid var(--grey-200);
border-radius: var(--radius-sm);
padding: 10px 14px;
margin-bottom: 12px;
overflow-x: auto;
}
.sha-hash {
font-family: var(--font-mono);
font-size: 0.84rem;
color: var(--blue-900);
letter-spacing: 0.5px;
word-break: break-all;
flex: 1;
font-variant-numeric: tabular-nums;
font-weight: 600;
}
.copy-btn {
background: var(--blue-050);
border: 1px solid #d4e2f4;
color: var(--blue-700);
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.15s ease;
}
.copy-btn:hover {
background: var(--blue-700);
color: #ffffff;
}
.copy-btn.copied {
background: var(--ok-bg);
border-color: var(--ok);
color: var(--ok);
}
.sha-terminal-cmd {
font-size: 0.8rem;
color: var(--grey-700);
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 8px;
background: var(--grey-100);
padding: 8px 12px;
border-radius: 4px;
border-left: 3px solid var(--blue-700);
}
.sha-terminal-cmd code {
font-family: var(--font-mono);
color: var(--blue-900);
font-variant-numeric: tabular-nums;
}
/* Guide Anti-SmartScreen */
.smartscreen-box {
background: #ffffff;
border: 1px solid var(--grey-200);
border-radius: var(--radius-md);
padding: 28px;
margin-bottom: 36px;
box-shadow: var(--shadow-sm);
}
.transparency-banner {
background: var(--blue-050);
border: 1px solid #d4e2f4;
border-left: 4px solid var(--blue-700);
border-radius: var(--radius-md);
padding: 18px 22px;
margin-bottom: 28px;
display: flex;
gap: 16px;
align-items: flex-start;
}
.transparency-icon {
width: 24px;
height: 24px;
fill: var(--blue-700);
flex-shrink: 0;
margin-top: 2px;
}
.transparency-content h4 {
font-size: 1.02rem;
font-weight: 700;
color: var(--blue-900);
margin: 0 0 4px 0;
}
.transparency-content p {
font-size: 0.88rem;
color: var(--grey-700);
margin: 0;
line-height: 1.6;
}
.steps-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}
@media (max-width: 900px) {
.steps-grid { grid-template-columns: 1fr; }
}
.step-card {
background: var(--grey-100);
border: 1px solid var(--grey-200);
border-radius: var(--radius-md);
padding: 20px;
display: flex;
flex-direction: column;
}
.step-num-badge {
width: 28px;
height: 28px;
border-radius: 50%;
background: var(--blue-050);
border: 1px solid #d4e2f4;
color: var(--blue-700);
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 0.84rem;
margin-bottom: 12px;
}
.step-title {
font-size: 0.98rem;
font-weight: 700;
color: var(--blue-900);
margin: 0 0 6px 0;
}
.step-text {
font-size: 0.84rem;
color: var(--grey-700);
margin: 0 0 14px 0;
line-height: 1.5;
flex: 1;
}
.mockup-window {
background: #004275;
border-radius: 5px;
padding: 12px;
color: #fff;
font-size: 0.74rem;
user-select: none;
}
.mockup-header {
font-weight: 600;
margin-bottom: 6px;
display: flex;
align-items: center;
gap: 6px;
}
.mockup-header svg {
width: 14px;
height: 14px;
fill: #fff;
}
.mockup-body {
color: #e0f2fe;
line-height: 1.35;
margin-bottom: 8px;
}
.mockup-link-target {
color: #fff;
text-decoration: underline;
font-weight: 700;
padding: 1px 3px;
border-radius: 2px;
background: rgba(255, 255, 255, 0.2);
display: inline-block;
outline: 2px solid #38bdf8;
}
.mockup-btn-row {
display: flex;
justify-content: flex-end;
gap: 6px;
}
.mockup-btn {
padding: 4px 10px;
font-size: 0.72rem;
border-radius: 3px;
font-weight: 600;
border: none;
}
.mockup-btn-primary {
background: #38bdf8;
color: #00223d;
font-weight: 700;
}
.mockup-btn-secondary {
background: rgba(255, 255, 255, 0.15);
color: #fff;
}
/* Changelog */
.timeline-card {
background: var(--card-bg);
border: 1px solid var(--grey-200);
border-radius: var(--radius-md);
padding: 24px 26px;
position: relative;
box-shadow: var(--shadow-sm);
margin-bottom: 20px;
}
.timeline-card.is-latest {
border-color: #c8daf0;
box-shadow: var(--shadow-md);
}
.timeline-card.is-latest::before {
content: 'Dernière Version';
position: absolute;
top: -10px;
right: 22px;
background: var(--blue-700);
color: #ffffff;
font-size: 0.68rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.8px;
padding: 2px 10px;
border-radius: 20px;
}
.timeline-top {
display: flex;
justify-content: space-between;
align-items: baseline;
flex-wrap: wrap;
gap: 10px;
border-bottom: 1px solid var(--grey-200);
padding-bottom: 10px;
margin-bottom: 14px;
}
.timeline-version {
font-size: 1.2rem;
font-weight: 700;
color: var(--blue-900);
margin: 0;
}
.timeline-date {
font-size: 0.82rem;
color: var(--grey-500);
}
.changelog-items {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 8px;
}
.changelog-items li {
font-size: 0.9rem;
color: var(--grey-700);
position: relative;
padding-left: 20px;
line-height: 1.5;
}
.changelog-items li::before {
content: '▸';
position: absolute;
left: 0;
color: var(--blue-700);
font-weight: 700;
}
.changelog-items li strong {
color: var(--grey-900);
}
/* Footer Global */
.gws-footer {
margin-top: auto;
background: var(--grey-100);
border-top: 1px solid var(--grey-200);
padding: 36px 20px;
text-align: center;
font-size: 0.86rem;
color: var(--grey-500);
}
.gws-footer a {
color: var(--blue-700);
text-decoration: none;
}
.gws-footer a:hover {
text-decoration: underline;
color: var(--blue-900);
}
.gws-footer-links {
display: flex;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
margin-bottom: 14px;
}
</style>
</head>
<body>
<div class="page-wrapper">
<!-- Navigation -->
<header class="gws-nav">
<div class="gws-nav-inner">
<a href="https://gastinel.me/" class="gws-brand">
<img src="../assets/apps/gastinel-weather-studio/icone.webp" alt="Icône GWS" class="gws-nav-icon" width="36" height="36">
<span class="gws-brand-title">Gastinel Weather Studio</span>
<span class="gws-brand-badge" id="navVersionBadge">v0.4.0</span>
</a>
<!-- Commutateur Rapide : Présentation vs Téléchargements -->
<nav class="gws-mode-switch" aria-label="Espaces du site">
<a href="#presentation" class="gws-tab-btn" id="tabLinkPres">
<span>📊 Présentation du Logiciel</span>
</a>
<a href="#telechargements" class="gws-tab-btn active" id="tabLinkDl">
<span>💾 Espace Téléchargements</span>
<span class="tab-badge-accent">v0.4.0</span>
</a>
</nav>
<a href="https://gastinel.me/#apps" class="gws-back-site">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>
Écosystème Gastinel
</a>
</div>
</header>
<!-- En-tête Général -->
<div class="gws-page-hero">
<div class="container">
<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 native d'acquisition et d'investigation thermique conçue pour l'instrumentation des dépressions fermées et trous à froid (TAF) du massif du Vercors. Binaire autonome, sans dépendance lourde, compilé en code machine natif en Rust.
</p>
</div>
</div>
<!-- =========================================================================
ESPACE 2 : ESPACE TÉLÉCHARGEMENT & MISES À JOUR (PLIE EN HAUT POUR ACCÈS IMMÉDIAT)
========================================================================= -->
<section class="gws-major-section" id="telechargements">
<div class="container">
<div class="gws-section-header">
<span class="gws-section-tag">Distribution Officielle</span>
<h2 class="gws-section-title">Espace Téléchargement & Mises à Jour</h2>
<p class="gws-section-subtitle">
Choisissez l'option adaptée à votre situation : installez le logiciel pour la première fois ou appliquez la mise à jour instantanée si vous êtes déjà utilisateur.
</p>
</div>
<!-- Hub de Téléchargement -->
<div class="gws-download-hub-area">
<!-- Bandeau Pédagogique : Quel paquet correspond à quoi ? -->
<div class="package-explainer-banner">
<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 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>
<p>
<strong>Comment choisir votre téléchargement ?</strong> L'installateur <strong>.exe</strong> est conçu pour installer l'application sur un nouvel ordinateur. Le paquet <strong>.gws</strong> est quant à lui dédié à la mise à jour ultra-rapide sans repasser par l'installeur Windows.
</p>
</div>
<!-- Les 2 Paquets bien distincts -->
<div class="packages-choice-grid">
<!-- Paquet 1 : Installateur Standard (.exe) -->
<div class="package-choice-card primary">
<div>
<div class="pkg-header-badge-row">
<span class="pkg-type-badge pkg-badge-blue">Nouvelle Installation</span>
<span class="pkg-size-tag">~3.6 Mo &middot; x64</span>
</div>
<h3 class="pkg-card-title">Installateur Windows (.exe)</h3>
<div class="pkg-card-target">Pour votre première installation sur PC</div>
<ul class="pkg-detail-list">
<li><strong>Quand l'utiliser :</strong> Si Gastinel Weather Studio n'est pas encore installé sur votre ordinateur.</li>
<li><strong>Ce qu'il fait :</strong> Installe le logiciel, crée les raccourcis Bureau et Menu Démarrer, et associe les fichiers <code>.gws</code>.</li>
<li><strong>Sécurité :</strong> Déclenche l'alerte Windows Defender au 1er lancement (logiciel indépendant sans certificat commercial payant EV, voir guide ci-dessous).</li>
</ul>
</div>
<a href="https://gastinel.me/gws/downloads/Gastinel_Weather_Studio_0.4.0_x64-setup.exe" class="btn-pkg-download btn-pkg-exe" id="heroDownloadBtnExe" download>
<svg width="20" height="20" viewBox="0 0 448 512" fill="currentColor"><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>
<!-- Paquet 2 : Paquet de Mise à Jour (.gws) -->
<div class="package-choice-card secondary">
<div>
<div class="pkg-header-badge-row">
<span class="pkg-type-badge pkg-badge-green">Mise à Jour Rapide</span>
<span class="pkg-size-tag">~4.2 Mo &middot; Format .gws</span>
</div>
<h3 class="pkg-card-title">Paquet de Mise à Jour (.gws)</h3>
<div class="pkg-card-target">Pour les utilisateurs possédant déjà GWS</div>
<ul class="pkg-detail-list">
<li><strong>Quand l'utiliser :</strong> Si vous avez déjà une version de Gastinel Weather Studio sur votre machine.</li>
<li><strong>Ce qu'il fait :</strong> Met à jour l'application en 1 seconde sans réinstaller ni modifier votre configuration.</li>
<li><strong>Comment faire :</strong> Double-cliquez sur le fichier <code>.gws</code> ou glissez-le directement dans la fenêtre de GWS.</li>
<li><strong>Avantage exclusif :</strong> <strong>Zéro alerte Windows Defender</strong> et conservation garantie de vos bases de données de stations et relevés.</li>
</ul>
</div>
<a href="https://gastinel.me/gws/downloads/update-0.4.0.gws" class="btn-pkg-download btn-pkg-gws" id="heroDownloadBtnGws" download>
<svg width="20" height="20" 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="apiStatusMessage">Connecté au canal de version en direct (gastinel.me/gws/api/v1)</span>
</div>
<button type="button" class="api-refresh-btn" id="apiRefreshBtn">Vérifier l'état en direct</button>
</div>
</div>
<!-- Empreinte SHA-256 -->
<div class="sha-card" id="integrite">
<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:var(--grey-500);">Contrôle d'intégrité strict du binaire .exe</span>
</div>
<div class="sha-code-container">
<span class="sha-hash" id="sha256Value">FB2AF27C5509D220E18BD40219192D137368203A11D9B789BF5E1DA6C50B70F6</span>
<button type="button" class="copy-btn" id="copyShaBtn" 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="copyShaText">Copier le hash</span>
</button>
</div>
<div class="sha-terminal-cmd">
<div>
<span style="color:var(--blue-700);font-weight:700;margin-right:6px;">Commande PowerShell :</span>
<code>Get-FileHash "Gastinel_Weather_Studio_*.exe" -Algorithm SHA256</code>
</div>
<button type="button" class="copy-btn" id="copyCmdBtn" style="padding:4px 10px;font-size:0.74rem;">
Copier la commande
</button>
</div>
</div>
<!-- Guide Anti-SmartScreen -->
<div class="smartscreen-box" id="guide-defender">
<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">
<h4>Pourquoi Windows affiche-t-il une alerte sur l'installeur .exe ?</h4>
<p>
Gastinel Weather Studio est un logiciel libre et indépendant conçu dans le massif du Vercors. Microsoft exige des éditeurs un certificat d'entreprise commercial payant (EV, plusieurs centaines d'euros par an) pour éviter cet écran. Sans cet abonnement payant, Windows Defender alerte par prévention. Le code est sain et le condensat SHA-256 ci-dessus permet de vérifier son intégrité exacte.
</p>
</div>
</div>
<div class="steps-grid">
<div class="step-card">
<div class="step-num-badge">1</div>
<h5 class="step-title">Fenêtre bleue d'alerte</h5>
<p class="step-text">Windows affiche « Windows a protégé votre ordinateur ». Cliquez sur le lien textuel <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">Application non reconnue...<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>
<div class="step-card">
<div class="step-num-badge">2</div>
<h5 class="step-title">Débloquer le lancement</h5>
<p class="step-text">Le détail de l'application apparaît. Cliquez sur le bouton <strong>« Exécuter quand même »</strong> qui s'affiche en bas à droite.</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>Application : Gastinel Weather Studio</span></div>
<div class="mockup-body">Éditeur : Inconnu (indépendant)</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>
<div class="step-card">
<div class="step-num-badge">3</div>
<h5 class="step-title">Installation finalisée</h5>
<p class="step-text">L'assistant installe GWS sur votre poste. Les futures mises à jour se feront en 1-clic via le paquet <strong>.gws</strong> sans aucun écran d'alerte.</p>
<div class="mockup-window" style="background:#0a4d2e;">
<div class="mockup-header"><svg viewBox="0 0 24 24"><path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/></svg><span>Installation réussie</span></div>
<div class="mockup-body">Gastinel Weather Studio est prêt à l'emploi.</div>
</div>
</div>
</div>
</div>
<!-- Changelog v0.4.0 -->
<div id="changelog">
<article class="timeline-card is-latest">
<div class="timeline-top">
<h3 class="timeline-version">Version 0.4.0 &middot; Format .gws & Écosystème Connecté</h3>
<span class="timeline-date">23 septembre 2026</span>
</div>
<ul class="changelog-items">
<li><strong>Mises à jour instantanées (.gws) :</strong> Déploiement natif des paquets <code>.gws</code> pour mise à jour par simple glisser-déposer sans installeur ni SmartScreen.</li>
<li><strong>Cartographie haute lisibilité :</strong> Refonte épurée des infobulles au survol (nom, classification, volume) et suppression du bouton parasite "+ Point" sur la carte.</li>
<li><strong>Prise en main express :</strong> Guide interactif de démarrage rapide au premier lancement pour accompagner la prise en main du Studio.</li>
<li><strong>Hub officiel & Guide Defender :</strong> Nouvelle plateforme de distribution officielle sur <code>gastinel.me/gws/</code> avec intégrité SHA-256 certifiée.</li>
</ul>
</article>
</div>
</div>
</section>
<!-- =========================================================================
ESPACE 1 : PRÉSENTATION COMPLÈTE DU LOGICIEL (SÉPARÉE)
========================================================================= -->
<section class="gws-major-section" id="presentation" style="background:#ffffff; border-top:1px solid var(--grey-200);">
<div class="container">
<div class="gws-section-header">
<span class="gws-section-tag">Analyse Scientifique & Terrain</span>
<h2 class="gws-section-title">Présentation du Logiciel</h2>
<p class="gws-section-subtitle">
Découvrez pourquoi et comment Gastinel Weather Studio a été conçu pour résoudre les défis réels de la prospection thermique en haute montagne.
</p>
</div>
<!-- Problématique de terrain -->
<div class="app-problem-box">
<h3>Problématique de terrain : Traquer le froid dans le Vercors</h3>
<p>
Dans le massif du Vercors, certaines dépressions fermées et dolines génèrent des microclimats d'inversion thermique exceptionnels : l'air froid, plus dense, s'accumule au fond des cuvettes lors de nuits radiatives sans vent, produisant des froids records (comme le minimum de <strong>-34,6°C mesuré à Darbounouse</strong>). L'identification, l'instrumentation et la comparaison rigoureuse de ces « trous à froid » (TAF) étaient jusqu'ici entravées par des outils disparates : logiciels constructeurs fermés et spécifiques à chaque modèle de capteur, formats de fichiers incompatibles et dispersion des séries chronologiques. Gastinel Weather Studio a été créé pour unifier l'ensemble du cycle de recherche.
</p>
</div>
<!-- Les 4 Piliers Fonctionnels -->
<div class="features-detailed-grid">
<div class="feature-box">
<div class="feature-box-icon">🗺️</div>
<h4>Carte de terrain interactive du Vercors</h4>
<p>Conçue comme un instrument de travail technique plutôt qu'un visualiseur grand public. Superposition dynamique du fond topographique IGN haute fidélité et d'imagerie satellite. Indexation des reliefs et création immédiate de stations de mesure par clic droit géoréférencé.</p>
<div class="feature-box-media">
<img src="../assets/apps/gastinel-weather-studio/accueil.webp" alt="Carte topographique GWS" loading="lazy">
</div>
</div>
<div class="feature-box">
<div class="feature-box-icon">🔌</div>
<h4>Acquisition multi-source & protocole direct</h4>
<p>Prise en charge directe des enregistreurs Elitech RC-5 via décodage USB natif en Rust, interconnexion aux stations Davis Vantage Pro 2 par l'API Infoclimat et intégration des flux de sommets (Grande Moucherolle). Traçabilité stricte de chaque relevé brut sans altération.</p>
<div class="feature-box-media">
<img src="../assets/apps/gastinel-weather-studio/logger.webp" alt="Importation directe pour logger" loading="lazy">
</div>
</div>
<div class="feature-box">
<div class="feature-box-icon">📈</div>
<h4>Comparateur studio multi-séries</h4>
<p>Juxtaposition synchrone des séries de mesures : confrontation directe des minima absolus, calculs des moyennes quotidiennes et des amplitudes thermiques extrêmes, le tout aligné sur des courbes temporelles claires et interactives.</p>
<div class="feature-box-media">
<img src="../assets/apps/gastinel-weather-studio/studio.webp" alt="Comparateur multi-séries thermiques" loading="lazy">
</div>
</div>
<div class="feature-box">
<div class="feature-box-icon">🔬</div>
<h4>Classification thermique morphologique</h4>
<p>Grille d'analyse méthodique à 4 catégories, calibrée par l'observation in situ. Intègre la volumétrie et la profondeur de la doline (petit ou grand volume) pour caractériser l'inertie thermique et la vitesse de refroidissement radiative du site.</p>
<div style="background:var(--grey-100); border:1px solid var(--grey-200); border-radius:6px; padding:14px; margin-top:10px; font-size:0.86rem; color:var(--grey-700);">
<strong>Catégories prises en charge :</strong> Dépression fermée standard, Doline d'accumulation radiative, Pente d'écoulement thermique et Plateau sommital de référence.
</div>
</div>
</div>
<!-- Bandeau vers le téléchargement -->
<div class="cta-to-download">
<div>
<h3>Prêt à instrumenter vos relevés météo ?</h3>
<p>Téléchargez Gastinel Weather Studio v0.4.0 en version installateur (.exe) ou paquet autonome (.gws).</p>
</div>
<a href="#telechargements" class="btn-cta-white">Accéder aux Téléchargements ➔</a>
</div>
</div>
</section>
<!-- Footer -->
<footer class="gws-footer">
<div class="container">
<div class="gws-footer-links">
<a href="#presentation">Présentation</a>
<a href="#telechargements">Téléchargements</a>
<a href="#guide-defender">Guide SmartScreen</a>
<a href="#integrite">Empreinte SHA-256</a>
<a href="https://gastinel.me/">Écosystème Théo Gastinel</a>
</div>
<p>Gastinel Weather Studio &middot; Conçu et développé au cœur du Vercors &middot; Architecture native Rust + Tauri</p>
</div>
</footer>
</div>
<!-- Scripts interactifs (Presse-papier universel, API live et Onglets) -->
<script>
(function() {
var API_URL = 'https://gastinel.me/gws/api/v1/update/windows/x86_64/0.0.0';
var DEFAULT_VERSION = '0.4.0';
function compareSemver(v1, v2) {
var p1 = (v1 || '').split('.').map(Number);
var p2 = (v2 || '').split('.').map(Number);
for (var i = 0; i < Math.max(p1.length, p2.length); i++) {
var n1 = p1[i] || 0;
var n2 = p2[i] || 0;
if (n1 > n2) return 1;
if (n1 < n2) return -1;
}
return 0;
}
function copyText(text, btnEl, successText, originalText) {
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(text).then(function() {
showSuccess();
}).catch(function() {
fallbackCopy();
});
} else {
fallbackCopy();
}
function fallbackCopy() {
var ta = document.createElement('textarea');
ta.value = text;
ta.style.position = 'fixed';
ta.style.opacity = '0';
document.body.appendChild(ta);
ta.select();
try {
document.execCommand('copy');
showSuccess();
} catch (err) {}
document.body.removeChild(ta);
}
function showSuccess() {
if (!btnEl) return;
btnEl.classList.add('copied');
var label = btnEl.querySelector('span') || btnEl;
var prev = label.textContent;
label.textContent = successText;
setTimeout(function() {
btnEl.classList.remove('copied');
label.textContent = originalText || prev;
}, 2000);
}
}
// Copie SHA-256
var copyShaBtn = document.getElementById('copyShaBtn');
var sha256Value = document.getElementById('sha256Value');
if (copyShaBtn && sha256Value) {
copyShaBtn.addEventListener('click', function() {
copyText(sha256Value.textContent.trim(), copyShaBtn, 'Hash copié !', 'Copier le hash');
});
}
// Copie Commande PowerShell
var copyCmdBtn = document.getElementById('copyCmdBtn');
if (copyCmdBtn) {
copyCmdBtn.addEventListener('click', function() {
var cmd = 'Get-FileHash "Gastinel_Weather_Studio_*.exe" -Algorithm SHA256';
copyText(cmd, copyCmdBtn, 'Commande copiée !', 'Copier la commande');
});
}
// Interrogation API live
function checkLatestVersion() {
var statusMsg = document.getElementById('apiStatusMessage');
var navBadge = document.getElementById('navVersionBadge');
var exeBtn = document.getElementById('heroDownloadBtnExe');
var gwsBtn = document.getElementById('heroDownloadBtnGws');
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 && compareSemver(data.version, DEFAULT_VERSION) >= 0) {
var v = data.version;
if (navBadge) navBadge.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 officielle stable 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 = document.getElementById('apiRefreshBtn');
if (refreshBtn) {
refreshBtn.addEventListener('click', function(e) {
e.preventDefault();
checkLatestVersion();
});
}
checkLatestVersion();
// Gestion des onglets actifs
var tabPres = document.getElementById('tabLinkPres');
var tabDl = document.getElementById('tabLinkDl');
function updateTabs() {
var hash = location.hash;
if (hash === '#presentation') {
if (tabPres) tabPres.classList.add('active');
if (tabDl) tabDl.classList.remove('active');
} else {
if (tabDl) tabDl.classList.add('active');
if (tabPres) tabPres.classList.remove('active');
}
}
window.addEventListener('hashchange', updateTabs);
updateTabs();
})();
</script>
</body>
</html>
`;
fs.writeFileSync(GWS_HTML_PATH, fullGwsPageHtml, 'utf8');
console.log('✓ gws/index.html entièrement restructuré (Séparation stricte Présentation / Téléchargement & Comparatif des paquets)');
// =========================================================================
// 2. REFONTE DU BANDEAU DANS #apps SUR index.html
// =========================================================================
let indexHtml = fs.readFileSync(INDEX_HTML_PATH, 'utf8');
// Nouveau Bandeau Héroïque Spécial pour GWS dans #apps
const newGwsAppsCardHtml = ` <!-- Bandeau Héroïque Officiel Gastinel Weather Studio -->
<article class="app-card-featured-gws" id="app-weather-studio">
<div class="gws-featured-top">
<div class="gws-featured-brand">
<img src="assets/apps/gastinel-weather-studio/icone.webp" alt="Icône Gastinel Weather Studio" class="gws-featured-icon" width="56" height="56" loading="lazy">
<div>
<div class="gws-featured-tag-row">
<span class="gws-badge-status available"><span class="badge-dot"></span>Version 0.4.0 disponible</span>
<span class="gws-badge-arch">Windows 10 / 11 (64-bit)</span>
</div>
<h3 class="gws-featured-title">Gastinel Weather Studio</h3>
<div class="gws-featured-pitch">« Traquer, comparer, comprendre le froid. »</div>
</div>
</div>
<a href="https://gastinel.me/gws/" class="gws-featured-cta-main">
<span>Découvrir la présentation & Télécharger</span>
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M12 5l7 7-7 7"/></svg>
</a>
</div>
<p class="gws-featured-desc">
Station logicielle native dédiée à la mesure et à l'investigation des microclimats d'inversion thermique et des trous à froid (TAF) du massif du Vercors. Décodage direct des sondes USB Elitech RC-5, interconnexion Infoclimat et cartographie topographique IGN haute résolution.
</p>
<div class="gws-featured-pills-row">
<span class="gws-feature-pill">🗺️ Cartographie IGN & Relief</span>
<span class="gws-feature-pill">🔌 Décodage USB Elitech RC-5</span>
<span class="gws-feature-pill">📈 Comparateur Studio Multi-séries</span>
<span class="gws-feature-pill">⚡ Mises à jour instantanées .gws</span>
</div>
<div class="gws-featured-actions-row">
<div class="gws-featured-downloads-split">
<a href="https://gastinel.me/gws/downloads/Gastinel_Weather_Studio_0.4.0_x64-setup.exe" class="gws-btn-dl-box primary" download>
<div class="gws-btn-dl-label">
<svg width="18" height="18" viewBox="0 0 448 512" fill="currentColor"><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>
<strong>Installateur Windows (.exe)</strong>
</div>
<span class="gws-btn-dl-sub">Première installation (3.6 Mo)</span>
</a>
<a href="https://gastinel.me/gws/downloads/update-0.4.0.gws" class="gws-btn-dl-box secondary" download>
<div class="gws-btn-dl-label">
<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>
<strong>Paquet de Mise à Jour (.gws)</strong>
</div>
<span class="gws-btn-dl-sub">Sans Defender · Si déjà installé (4.2 Mo)</span>
</a>
</div>
<a href="https://gastinel.me/gws/#guide-defender" class="gws-btn-guide-link">
<span>Guide SmartScreen & Empreinte SHA-256 ➔</span>
</a>
</div>
</article>`;
// Remplacement dans index.html du bloc <article class="app-card-detailed" id="app-weather-studio"> ... </article>
const oldCardRegex = /<article class="app-card-detailed" id="app-weather-studio">[\s\S]*?<\/article>/i;
if (oldCardRegex.test(indexHtml)) {
indexHtml = indexHtml.replace(oldCardRegex, newGwsAppsCardHtml);
console.log('✓ index.html : Carte #app-weather-studio remplacée par le Bandeau Héroïque');
} else {
console.warn('Attention: Carte #app-weather-studio introuvable par regex');
}
// Ajout du CSS pour .app-card-featured-gws dans le <style> de index.html
const featuredGwsCss = `
/* ==========================================================================
BANDEAU HÉROÏQUE OFFICIEL GASTINEL WEATHER STUDIO DANS #apps
========================================================================== */
.app-card-featured-gws {
background: linear-gradient(145deg, rgba(18, 58, 107, 0.25) 0%, rgba(10, 15, 24, 0.85) 100%);
border: 1px solid rgba(56, 189, 248, 0.35);
border-radius: 12px;
padding: 32px 30px;
box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(2, 132, 199, 0.12);
margin-bottom: 30px;
position: relative;
overflow: hidden;
}
.app-card-featured-gws::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0; height: 3px;
background: linear-gradient(90deg, #1e4d8b, #38bdf8, #1e4d8b);
}
.gws-featured-top {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 20px;
margin-bottom: 18px;
}
.gws-featured-brand {
display: flex;
align-items: center;
gap: 18px;
}
.gws-featured-icon {
width: 56px;
height: 56px;
border-radius: 10px;
border: 1px solid rgba(56, 189, 248, 0.4);
background: #ffffff;
padding: 3px;
box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
flex-shrink: 0;
}
.gws-featured-tag-row {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 4px;
}
.gws-badge-status.available {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 0.72rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.8px;
color: #38bdf8;
background: rgba(2, 132, 199, 0.2);
border: 1px solid rgba(56, 189, 248, 0.4);
padding: 3px 10px;
border-radius: 4px;
}
.gws-badge-status .badge-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: #10b981;
box-shadow: 0 0 6px #10b981;
}
.gws-badge-arch {
font-size: 0.74rem;
color: #94a3b8;
font-weight: 600;
}
.gws-featured-title {
font-size: 1.6rem;
font-weight: 800;
color: #ffffff;
margin: 0;
letter-spacing: -0.3px;
}
.gws-featured-pitch {
font-size: 0.95rem;
color: #7dd3fc;
font-weight: 600;
margin-top: 2px;
}
.gws-featured-cta-main {
display: inline-flex;
align-items: center;
gap: 10px;
background: linear-gradient(135deg, #0284c7 0%, #1e4d8b 100%);
color: #ffffff;
font-weight: 700;
font-size: 0.95rem;
padding: 13px 22px;
border-radius: 8px;
text-decoration: none;
box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
transition: all 0.2s ease;
white-space: nowrap;
}
.gws-featured-cta-main:hover {
background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
transform: translateY(-2px);
box-shadow: 0 6px 22px rgba(56, 189, 248, 0.5);
color: #fff;
}
.gws-featured-desc {
font-size: 0.95rem;
color: #cbd5e1;
line-height: 1.65;
margin: 0 0 20px 0;
}
.gws-featured-pills-row {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 24px;
}
.gws-feature-pill {
font-size: 0.8rem;
font-weight: 600;
color: #e2e8f0;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.12);
padding: 5px 12px;
border-radius: 20px;
}
.gws-featured-actions-row {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 16px;
padding-top: 20px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.gws-featured-downloads-split {
display: flex;
gap: 14px;
flex-wrap: wrap;
}
.gws-btn-dl-box {
display: flex;
flex-direction: column;
padding: 10px 18px;
border-radius: 8px;
text-decoration: none;
transition: all 0.2s ease;
}
.gws-btn-dl-box.primary {
background: rgba(2, 132, 199, 0.2);
border: 1px solid rgba(56, 189, 248, 0.4);
color: #fff;
}
.gws-btn-dl-box.primary:hover {
background: rgba(2, 132, 199, 0.35);
border-color: #38bdf8;
transform: translateY(-1px);
}
.gws-btn-dl-box.secondary {
background: rgba(16, 185, 129, 0.15);
border: 1px solid rgba(16, 185, 129, 0.35);
color: #fff;
}
.gws-btn-dl-box.secondary:hover {
background: rgba(16, 185, 129, 0.25);
border-color: #10b981;
transform: translateY(-1px);
}
.gws-btn-dl-label {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.9rem;
}
.gws-btn-dl-sub {
font-size: 0.72rem;
color: #94a3b8;
margin-top: 2px;
padding-left: 26px;
}
.gws-btn-guide-link {
font-size: 0.86rem;
font-weight: 600;
color: #38bdf8;
text-decoration: none;
transition: color 0.2s ease;
}
.gws-btn-guide-link:hover {
color: #7dd3fc;
text-decoration: underline;
}
`;
if (!indexHtml.includes('.app-card-featured-gws')) {
indexHtml = indexHtml.replace('</style>', `${featuredGwsCss}\n</style>`);
}
fs.writeFileSync(INDEX_HTML_PATH, indexHtml, 'utf8');
console.log('✓ index.html : CSS et balisage du Bandeau Héroïque intégrés');
// =========================================================================
// 3. SYNCHRONISATION AVEC Actual_Website
// =========================================================================
function copyDirSync(src, dest) {
if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });
const entries = fs.readdirSync(src, { withFileTypes: true });
for (const entry of entries) {
const srcPath = path.join(src, entry.name);
const destPath = path.join(dest, entry.name);
if (entry.isDirectory()) {
if (entry.name === '.git' || entry.name === 'node_modules') continue;
copyDirSync(srcPath, destPath);
} else {
fs.copyFileSync(srcPath, destPath);
}
}
}
copyDirSync(path.join(SITE_DIR, 'gws'), path.join(ACTUAL_DIR, 'gws'));
fs.copyFileSync(INDEX_HTML_PATH, path.join(ACTUAL_DIR, 'index.html'));
console.log('✓ Synchronisé avec Actual_Website (index.html et gws/index.html)');
// =========================================================================
// 4. PRÉ-COMPRESSION & TESTS DE VÉRIFICATION
// =========================================================================
console.log('[STRUCTURE-GWS] Exécution de la pré-compression...');
execSync('node ' + path.join(SITE_DIR, 'tools/precompress.js'), { stdio: 'inherit', cwd: SITE_DIR });
console.log('[STRUCTURE-GWS] Lancement des tests...');
execSync('node ' + path.join(SITE_DIR, 'tools/test-verify.js'), { stdio: 'inherit', cwd: SITE_DIR });
console.log('[STRUCTURE-GWS] Tout est prêt pour le déploiement serveur !');