Fichiers
site-principal/tools/refactor-pages-clean.js
T
2026-10-11 01:57:33 +02:00

1272 lignes
41 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_DIR = path.join(SITE_DIR, 'gws');
const GWS_HTML_PATH = path.join(GWS_DIR, 'index.html');
const GWS_DL_DIR = path.join(GWS_DIR, 'download');
const INDEX_HTML_PATH = path.join(SITE_DIR, 'index.html');
console.log('[REFACTOR] Création de la nouvelle architecture épurée (Zéro emoji, séparation stricte Présentation vs Download, suppression hash)...');
if (!fs.existsSync(GWS_DL_DIR)) {
fs.mkdirSync(GWS_DL_DIR, { recursive: true });
}
// =========================================================================
// 1. PAGE DE PRÉSENTATION : _Site/gws/index.html
// =========================================================================
const presentationHtml = `<!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 officielle & Analyse microclimatique</title>
<meta name="description" content="Présentation officielle de Gastinel Weather Studio (GWS) : suite native d'acquisition et d'investigation thermique des trous à froid (TAF) du Vercors. Cartographie IGN, décodage Elitech RC-5 et comparateur studio.">
<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">
<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">
<meta property="og:title" content="Gastinel Weather Studio — Présentation officielle">
<meta property="og:description" content="Suite 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 IGN.">
<meta property="og:image" content="https://gastinel.me/assets/apps/gastinel-weather-studio/studio.webp">
<meta name="twitter:card" content="summary_large_image">
<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 {
--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;
--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;
}
* { 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 & Nav */
.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: 1140px;
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;
}
.gws-nav-actions {
display: flex;
align-items: center;
gap: 14px;
}
.gws-nav-link-btn {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 0.86rem;
font-weight: 600;
color: #ffffff !important;
background: var(--blue-700);
padding: 8px 18px;
border-radius: var(--radius-sm);
text-decoration: none;
transition: all 0.15s ease;
box-shadow: 0 2px 6px rgba(30, 77, 139, 0.2);
}
.gws-nav-link-btn:hover {
background: var(--blue-900);
transform: translateY(-1px);
}
.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 {
max-width: 1140px;
margin: 0 auto;
padding: 0 20px;
}
/* Hero Présentation */
.gws-presentation-hero {
padding: 60px 0 44px;
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: #1c6b45;
border-radius: 50%;
}
.status-text {
font-size: 0.8rem;
font-weight: 600;
color: var(--blue-700);
letter-spacing: 0.3px;
}
.gws-presentation-hero h1 {
font-size: clamp(2.3rem, 4.5vw, 3.4rem);
font-weight: 800;
color: var(--blue-900);
letter-spacing: -0.03em;
margin: 0 0 12px 0;
line-height: 1.15;
}
.gws-hero-subtitle {
font-size: clamp(1.1rem, 2vw, 1.3rem);
color: var(--blue-700);
max-width: 760px;
margin: 0 auto 16px auto;
font-weight: 600;
}
.gws-hero-desc {
font-size: 1rem;
color: var(--grey-700);
max-width: 760px;
margin: 0 auto;
line-height: 1.65;
}
/* Sections */
.gws-content-section {
padding: 56px 0;
}
.section-heading-clean {
margin-bottom: 34px;
}
.section-tag-clean {
font-size: 0.74rem;
text-transform: uppercase;
letter-spacing: 1.2px;
color: var(--blue-700);
font-weight: 700;
margin-bottom: 6px;
display: inline-block;
}
.section-title-clean {
font-size: clamp(1.6rem, 3vw, 2.2rem);
font-weight: 800;
color: var(--blue-900);
margin: 0 0 8px 0;
}
.section-sub-clean {
color: var(--grey-700);
font-size: 0.96rem;
margin: 0;
}
/* Problématique */
.problem-card {
background: #ffffff;
border: 1px solid var(--grey-200);
border-left: 4px solid var(--blue-700);
border-radius: var(--radius-md);
padding: 26px 30px;
margin-bottom: 40px;
box-shadow: var(--shadow-sm);
}
.problem-card h3 {
color: var(--blue-900);
margin: 0 0 10px 0;
font-size: 1.15rem;
}
.problem-card p {
color: var(--grey-700);
margin: 0;
line-height: 1.65;
font-size: 0.95rem;
}
/* Grille Fonctionnalités */
.features-grid-clean {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 24px;
margin-bottom: 44px;
}
@media (max-width: 800px) {
.features-grid-clean { grid-template-columns: 1fr; }
}
.feature-card-clean {
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-card-clean h4 {
font-size: 1.1rem;
color: var(--blue-900);
margin: 0 0 8px 0;
font-weight: 700;
}
.feature-card-clean p {
font-size: 0.92rem;
color: var(--grey-700);
margin: 0 0 16px 0;
line-height: 1.55;
flex: 1;
}
.feature-media-clean {
border-radius: var(--radius-sm);
overflow: hidden;
border: 1px solid var(--grey-200);
background: var(--grey-100);
}
.feature-media-clean img {
width: 100%;
height: auto;
display: block;
}
/* Bandeau Vers Téléchargement (En Bas) */
.footer-cta-download {
background: linear-gradient(135deg, #123a6b 0%, #1e4d8b 100%);
border-radius: var(--radius-lg);
padding: 36px 32px;
color: #ffffff;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 22px;
box-shadow: var(--shadow-md);
margin-top: 20px;
}
.footer-cta-download h3 {
font-size: 1.4rem;
margin: 0 0 6px 0;
color: #ffffff;
}
.footer-cta-download p {
margin: 0;
color: #d4e2f4;
font-size: 0.96rem;
}
.btn-cta-large-white {
background: #ffffff;
color: var(--blue-900) !important;
font-weight: 700;
font-size: 1.05rem;
padding: 14px 26px;
border-radius: var(--radius-sm);
text-decoration: none;
white-space: nowrap;
transition: all 0.15s ease;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.btn-cta-large-white:hover {
background: var(--blue-050);
transform: translateY(-2px);
box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
/* Footer */
.gws-footer {
margin-top: auto;
background: var(--grey-100);
border-top: 1px solid var(--grey-200);
padding: 34px 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;
}
.gws-footer-links {
display: flex;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
margin-bottom: 12px;
}
</style>
</head>
<body>
<div class="page-wrapper">
<!-- Header -->
<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">v0.4.0</span>
</a>
<div class="gws-nav-actions">
<a href="https://gastinel.me/gws/download/" class="gws-nav-link-btn">
<span>Télécharger v0.4.0</span>
<svg width="15" height="15" 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>
<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>
</div>
</header>
<!-- Hero Présentation -->
<div class="gws-presentation-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 logicielle lourde, compilé en code machine natif en Rust.
</p>
</div>
</div>
<!-- Contenu Présentation -->
<main class="gws-content-section">
<div class="container">
<!-- Problématique de terrain -->
<div class="problem-card">
<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>
<div class="section-heading-clean">
<span class="section-tag-clean">Architecture & Outils</span>
<h2 class="section-title-clean">Les fonctionnalités principales</h2>
<p class="section-sub-clean">Un ensemble complet de modules calibrés pour l'usage in situ et l'analyse de séries temporelles.</p>
</div>
<!-- Grille des fonctionnalités -->
<div class="features-grid-clean">
<div class="feature-card-clean">
<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>
<div class="feature-media-clean">
<img src="../assets/apps/gastinel-weather-studio/accueil.webp" alt="Carte topographique GWS" loading="lazy">
</div>
</div>
<div class="feature-card-clean">
<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>
<div class="feature-media-clean">
<img src="../assets/apps/gastinel-weather-studio/logger.webp" alt="Importation directe pour logger" loading="lazy">
</div>
</div>
<div class="feature-card-clean">
<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>
<div class="feature-media-clean">
<img src="../assets/apps/gastinel-weather-studio/studio.webp" alt="Comparateur multi-séries thermiques" loading="lazy">
</div>
</div>
<div class="feature-card-clean">
<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>
<div style="background:var(--grey-100); border:1px solid var(--grey-200); border-radius:6px; padding:14px; font-size:0.86rem; color:var(--grey-700);">
<strong>Catégories intégrées :</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="footer-cta-download">
<div>
<h3>Télécharger Gastinel Weather Studio</h3>
<p>Installez le logiciel sur votre PC ou récupérez la mise à jour officielle v0.4.0.</p>
</div>
<a href="https://gastinel.me/gws/download/" class="btn-cta-large-white">
<span>Accéder aux Téléchargements (v0.4.0)</span>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:middle;margin-left:6px;"><path d="M5 12h14M12 5l7 7-7 7"/></svg>
</a>
</div>
</div>
</main>
<footer class="gws-footer">
<div class="container">
<div class="gws-footer-links">
<a href="https://gastinel.me/gws/">Présentation</a>
<a href="https://gastinel.me/gws/download/">Téléchargements</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>
</body>
</html>
`;
fs.writeFileSync(GWS_HTML_PATH, presentationHtml, 'utf8');
console.log('✓ gws/index.html : Page de présentation 100% sobre et propre (Zéro emoji, zéro hash, bouton vers download)');
// =========================================================================
// 2. NOUVELLE PAGE DÉDIÉE : _Site/gws/download/index.html
// =========================================================================
const downloadPageHtml = `<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Télécharger Gastinel Weather Studio (Windows 64-bit) — Canal Officiel</title>
<meta name="description" content="Téléchargement officiel de Gastinel Weather Studio (GWS) v0.4.0. Installateur standard (.exe) et paquet de mise à jour rapide (.gws) pour Windows 10 et 11.">
<link rel="canonical" href="https://gastinel.me/gws/download/">
<meta name="robots" content="index, follow">
<meta name="author" content="Théo Gastinel">
<meta property="og:type" content="website">
<meta property="og:locale" content="fr_FR">
<meta property="og:url" content="https://gastinel.me/gws/download/">
<meta property="og:site_name" content="Gastinel Weather Studio">
<meta property="og:title" content="Télécharger Gastinel Weather Studio (v0.4.0)">
<meta property="og:description" content="Installateur standard (.exe) et paquet autonome de mise à jour rapide (.gws) pour Windows 10 et 11 (64-bit).">
<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 {
--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;
--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;
}
* { 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;
}
/* Nav */
.gws-nav {
background: #ffffff;
border-bottom: 1px solid var(--grey-200);
box-shadow: var(--shadow-sm);
padding: 12px 24px;
}
.gws-nav-inner {
max-width: 1000px;
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-nav-actions {
display: flex;
align-items: center;
gap: 12px;
}
.gws-link-subtle {
font-size: 0.86rem;
font-weight: 600;
color: var(--blue-700);
text-decoration: none;
padding: 6px 12px;
}
.gws-link-subtle:hover {
text-decoration: underline;
color: var(--blue-900);
}
.container {
max-width: 1000px;
margin: 0 auto;
padding: 0 20px;
}
/* Hero Téléchargement */
.dl-hero {
padding: 48px 0 32px;
text-align: center;
}
.dl-badge-tag {
display: inline-flex;
align-items: center;
gap: 8px;
background: var(--blue-050);
border: 1px solid #d4e2f4;
padding: 5px 14px;
border-radius: 20px;
font-size: 0.78rem;
font-weight: 700;
color: var(--blue-700);
text-transform: uppercase;
letter-spacing: 0.8px;
margin-bottom: 16px;
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--ok);
}
.dl-hero h1 {
font-size: clamp(2rem, 4vw, 2.8rem);
font-weight: 800;
color: var(--blue-900);
margin: 0 0 10px 0;
letter-spacing: -0.02em;
}
.dl-hero p {
color: var(--grey-700);
font-size: 1rem;
max-width: 680px;
margin: 0 auto;
}
/* Grille des 2 Paquets */
.dl-choice-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
margin-bottom: 40px;
}
@media (max-width: 768px) {
.dl-choice-grid { grid-template-columns: 1fr; }
}
.dl-card {
border-radius: var(--radius-md);
padding: 28px;
display: flex;
flex-direction: column;
justify-content: space-between;
box-shadow: var(--shadow-sm);
}
.dl-card.primary {
background: #f7faff;
border: 2px solid #c8daf0;
}
.dl-card.secondary {
background: #f9fdfa;
border: 2px solid #b7dfcb;
}
.dl-card-badge-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.dl-tag {
font-size: 0.72rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.8px;
padding: 3px 8px;
border-radius: 4px;
}
.tag-blue {
background: var(--blue-050);
color: var(--blue-700);
border: 1px solid #d4e2f4;
}
.tag-green {
background: var(--ok-bg);
color: var(--ok);
border: 1px solid #b7dfcb;
}
.dl-size {
font-size: 0.82rem;
color: var(--grey-500);
font-weight: 600;
}
.dl-card-title {
font-size: 1.3rem;
font-weight: 800;
color: var(--blue-900);
margin: 0 0 6px 0;
}
.dl-card-for {
font-size: 0.9rem;
font-weight: 700;
margin: 0 0 16px 0;
}
.dl-card.primary .dl-card-for { color: var(--blue-700); }
.dl-card.secondary .dl-card-for { color: var(--ok); }
.dl-list {
list-style: none;
padding: 0;
margin: 0 0 24px 0;
display: flex;
flex-direction: column;
gap: 10px;
font-size: 0.9rem;
color: var(--grey-700);
}
.dl-list li {
position: relative;
padding-left: 20px;
line-height: 1.45;
}
.dl-list li::before {
content: '—';
position: absolute;
left: 0;
font-weight: 700;
}
.dl-card.primary .dl-list li::before { color: var(--blue-700); }
.dl-card.secondary .dl-list li::before { color: var(--ok); }
.btn-dl-action {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
width: 100%;
padding: 14px 20px;
border-radius: var(--radius-sm);
font-size: 1rem;
font-weight: 700;
text-decoration: none;
transition: all 0.15s ease;
}
.btn-dl-exe {
background: var(--blue-700);
color: #ffffff !important;
box-shadow: 0 2px 6px rgba(30, 77, 139, 0.25);
}
.btn-dl-exe:hover {
background: var(--blue-900);
transform: translateY(-1px);
}
.btn-dl-gws {
background: var(--ok);
color: #ffffff !important;
box-shadow: 0 2px 6px rgba(28, 107, 69, 0.25);
}
.btn-dl-gws:hover {
background: #145034;
transform: translateY(-1px);
}
/* Guide Defender Simplifié & Rassurant */
.defender-guide-box {
background: #ffffff;
border: 1px solid var(--grey-200);
border-radius: var(--radius-md);
padding: 26px 28px;
margin-bottom: 36px;
box-shadow: var(--shadow-sm);
}
.defender-guide-box h3 {
font-size: 1.15rem;
color: var(--blue-900);
margin: 0 0 10px 0;
}
.defender-note {
font-size: 0.9rem;
color: var(--grey-700);
line-height: 1.6;
margin: 0 0 20px 0;
background: var(--grey-100);
border-left: 3px solid var(--blue-700);
padding: 12px 16px;
border-radius: 4px;
}
.steps-horizontal {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 18px;
}
@media (max-width: 768px) {
.steps-horizontal { grid-template-columns: 1fr; }
}
.step-item {
background: var(--bg);
border: 1px solid var(--grey-200);
border-radius: var(--radius-sm);
padding: 16px;
}
.step-num {
font-size: 0.8rem;
font-weight: 700;
color: var(--blue-700);
margin-bottom: 6px;
}
.step-item h4 {
font-size: 0.95rem;
color: var(--blue-900);
margin: 0 0 6px 0;
}
.step-item p {
font-size: 0.84rem;
color: var(--grey-700);
margin: 0;
line-height: 1.45;
}
/* Changelog Rapide */
.changelog-box {
background: #ffffff;
border: 1px solid var(--grey-200);
border-radius: var(--radius-md);
padding: 24px 28px;
margin-bottom: 40px;
box-shadow: var(--shadow-sm);
}
.changelog-box h3 {
font-size: 1.15rem;
color: var(--blue-900);
margin: 0 0 14px 0;
}
.changelog-box ul {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 8px;
font-size: 0.9rem;
color: var(--grey-700);
}
.changelog-box li {
position: relative;
padding-left: 18px;
line-height: 1.5;
}
.changelog-box li::before {
content: '▸';
position: absolute;
left: 0;
color: var(--blue-700);
font-weight: 700;
}
.back-to-pres-bar {
text-align: center;
padding-bottom: 40px;
}
.back-to-pres-bar a {
display: inline-flex;
align-items: center;
gap: 8px;
color: var(--blue-700);
font-size: 0.95rem;
font-weight: 600;
text-decoration: none;
}
.back-to-pres-bar a:hover {
text-decoration: underline;
color: var(--blue-900);
}
.gws-footer {
margin-top: auto;
background: var(--grey-100);
border-top: 1px solid var(--grey-200);
padding: 30px 20px;
text-align: center;
font-size: 0.86rem;
color: var(--grey-500);
}
.gws-footer a {
color: var(--blue-700);
text-decoration: none;
}
</style>
</head>
<body>
<div class="page-wrapper">
<header class="gws-nav">
<div class="gws-nav-inner">
<a href="https://gastinel.me/gws/" 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>
</a>
<div class="gws-nav-actions">
<a href="https://gastinel.me/gws/" class="gws-link-subtle">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:middle;margin-right:4px;"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>
Présentation du logiciel
</a>
</div>
</div>
</header>
<main class="container">
<div class="dl-hero">
<div class="dl-badge-tag">
<span class="status-dot"></span>
<span>Version 0.4.0 &middot; Canal stable officiel</span>
</div>
<h1>Télécharger Gastinel Weather Studio</h1>
<p>Compatible Windows 10 et Windows 11 (64-bit). Choisissez le paquet adapté à votre usage ci-dessous.</p>
</div>
<!-- Grille des 2 Téléchargements -->
<div class="dl-choice-grid">
<!-- Option 1 : .exe -->
<div class="dl-card primary">
<div>
<div class="dl-card-badge-row">
<span class="dl-tag tag-blue">Nouvelle installation</span>
<span class="dl-size">~3.6 Mo &middot; x64</span>
</div>
<h2 class="dl-card-title">Installateur Windows (.exe)</h2>
<div class="dl-card-for">Pour votre première installation sur l'ordinateur</div>
<ul class="dl-list">
<li><strong>Quand l'utiliser :</strong> Si Gastinel Weather Studio n'est pas encore présent sur votre PC.</li>
<li><strong>Ce qu'il fait :</strong> Installe le logiciel, crée les raccourcis Bureau et Menu Démarrer, et associe les fichiers de mise à jour <code>.gws</code>.</li>
<li><strong>Premier lancement :</strong> Windows Defender peut afficher un écran bleu de prévention (voir explication ci-dessous).</li>
</ul>
</div>
<a href="https://gastinel.me/gws/downloads/Gastinel_Weather_Studio_0.4.0_x64-setup.exe" class="btn-dl-action btn-dl-exe" download>
<span>Télécharger l'Installateur (.exe)</span>
</a>
</div>
<!-- Option 2 : .gws -->
<div class="dl-card secondary">
<div>
<div class="dl-card-badge-row">
<span class="dl-tag tag-green">Mise à jour rapide</span>
<span class="dl-size">~4.2 Mo &middot; Format .gws</span>
</div>
<h2 class="dl-card-title">Paquet de Mise à Jour (.gws)</h2>
<div class="dl-card-for">Si vous avez déjà Gastinel Weather Studio</div>
<ul class="dl-list">
<li><strong>Quand l'utiliser :</strong> Si l'application est déjà installée sur votre machine.</li>
<li><strong>Ce qu'il fait :</strong> Met à jour directement le moteur de l'application en quelques secondes.</li>
<li><strong>Utilisation :</strong> Double-cliquez sur le fichier <code>.gws</code> ou glissez-le simplement dans la fenêtre de GWS.</li>
<li><strong>Avantage :</strong> Aucune alerte Windows Defender et conservation intégrale de toutes vos stations et mesures.</li>
</ul>
</div>
<a href="https://gastinel.me/gws/downloads/update-0.4.0.gws" class="btn-dl-action btn-dl-gws" download>
<span>Télécharger le Paquet (.gws)</span>
</a>
</div>
</div>
<!-- Guide Defender -->
<div class="defender-guide-box">
<h3>Premier lancement de l'installateur : que faire avec Windows Defender ?</h3>
<div class="defender-note">
Gastinel Weather Studio est un logiciel artisanal et indépendant développé dans le Vercors. Microsoft réserve l'absence totale d'alerte aux éditeurs payant un abonnement annuel commercial très coûteux. L'application est saine et respecte strictement la confidentialité de vos données.
</div>
<div class="steps-horizontal">
<div class="step-item">
<div class="step-num">Étape 1</div>
<h4>L'écran bleu apparaît</h4>
<p>Windows affiche « Windows a protégé votre ordinateur ». Cliquez sur le lien <strong>« Informations complémentaires »</strong>.</p>
</div>
<div class="step-item">
<div class="step-num">Étape 2</div>
<h4>Autoriser l'exécution</h4>
<p>Le bouton <strong>« Exécuter quand même »</strong> apparaît en bas à droite de la fenêtre. Cliquez dessus.</p>
</div>
<div class="step-item">
<div class="step-num">Étape 3</div>
<h4>C'est terminé</h4>
<p>L'installation se termine normalement. Les futures mises à jour se feront directement par paquet <strong>.gws</strong> sans aucune alerte.</p>
</div>
</div>
</div>
<!-- Changelog -->
<div class="changelog-box">
<h3>Nouveautés de la version 0.4.0</h3>
<ul>
<li><strong>Mises à jour instantanées (.gws) :</strong> Possibilité de mettre à jour GWS par simple glisser-déposer sans réinstaller.</li>
<li><strong>Cartographie haute lisibilité :</strong> Infobulles compactes au survol des stations météo et création simplifiée par clic droit.</li>
<li><strong>Prise en main express :</strong> Guide de démarrage rapide interactif au premier lancement de l'application.</li>
<li><strong>Architecture de distribution :</strong> Nouveau sas officiel sur gastinel.me.</li>
</ul>
</div>
<div class="back-to-pres-bar">
<a href="https://gastinel.me/gws/">
<svg width="16" height="16" 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>
<span>Consulter la présentation complète des fonctionnalités</span>
</a>
</div>
</main>
<footer class="gws-footer">
<p>Gastinel Weather Studio &middot; Conçu et développé au cœur du Vercors &middot; Architecture native Rust + Tauri</p>
</footer>
</div>
</body>
</html>
`;
fs.writeFileSync(path.join(GWS_DL_DIR, 'index.html'), downloadPageHtml, 'utf8');
console.log('✓ gws/download/index.html : Nouvelle page de téléchargement dédiée créée');
// =========================================================================
// 3. NETTOYAGE DU BANDEAU DANS index.html (#apps) - ZÉRO EMOJI
// =========================================================================
let indexHtml = fs.readFileSync(INDEX_HTML_PATH, 'utf8');
// Remplacement du bandeau GWS pour enlever absolument tous les emojis
const cleanBannerHtml = ` <!-- 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</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/download/" class="gws-btn-dl-box primary">
<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>Accéder aux Téléchargements</strong>
</div>
<span class="gws-btn-dl-sub">Installateur .exe ou Paquet .gws</span>
</a>
</div>
<a href="https://gastinel.me/gws/" class="gws-btn-guide-link">
<span>Lire la présentation détaillée ➔</span>
</a>
</div>
</article>`;
const currentBannerRegex = /<article class="app-card-featured-gws" id="app-weather-studio">[\s\S]*?<\/article>/i;
if (currentBannerRegex.test(indexHtml)) {
indexHtml = indexHtml.replace(currentBannerRegex, cleanBannerHtml);
console.log('✓ index.html : Bandeau GWS nettoyé de tout emoji');
}
fs.writeFileSync(INDEX_HTML_PATH, indexHtml, 'utf8');
// =========================================================================
// 4. 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 dossier gws)');
// =========================================================================
// 5. PRÉ-COMPRESSION STATIQUE
// =========================================================================
console.log('[REFACTOR] Précompression statique...');
execSync('node ' + path.join(SITE_DIR, 'tools/precompress.js'), { stdio: 'inherit', cwd: SITE_DIR });
console.log('[REFACTOR] Tout est prêt !');