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('[AUTHENTIC-DA] Harmonisation de la DA avec la charte officielle GWS...'); // ========================================================================= // 1. MISE À JOUR DU STYLE DE gws/index.html (Design System Officiel GWS) // ========================================================================= let gwsHtml = fs.readFileSync(GWS_HTML_PATH, 'utf8'); const newGwsCss = ` @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; overflow-x: hidden; position: relative; } .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: 34px; height: 34px; 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-links { display: flex; align-items: center; gap: 20px; list-style: none; margin: 0; padding: 0; } .gws-nav-links a { color: var(--grey-700); text-decoration: none; font-size: 0.88rem; font-weight: 500; transition: color 0.15s ease; } .gws-nav-links a:hover { color: var(--blue-700); } .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: 6px 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 Section */ .gws-hero { padding: 64px 0 50px; text-align: center; } .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: 22px; } .status-dot { width: 8px; height: 8px; background-color: var(--ok); border-radius: 50%; box-shadow: 0 0 6px var(--ok); animation: pulse-dot 2s infinite ease-in-out; } @keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(1.15); } } .status-text { font-size: 0.8rem; font-weight: 600; color: var(--blue-700); letter-spacing: 0.3px; } .gws-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; color: var(--blue-900); letter-spacing: -0.03em; margin: 0 0 14px 0; line-height: 1.18; } .gws-hero-subtitle { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--blue-700); max-width: 760px; margin: 0 auto 16px auto; font-weight: 600; line-height: 1.45; } .gws-hero-desc { font-size: 0.96rem; color: var(--grey-700); max-width: 720px; margin: 0 auto 36px auto; line-height: 1.65; } /* Téléchargement Hero Box */ .download-action-box { background: var(--card-bg); border: 1px solid var(--grey-200); border-radius: var(--radius-lg); padding: 32px 28px; max-width: 820px; margin: 0 auto; box-shadow: var(--shadow-lg); position: relative; } .download-action-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--blue-900), var(--blue-500), var(--blue-900)); } .download-options-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; align-items: stretch; } @media (max-width: 768px) { .download-options-grid { grid-template-columns: 1fr; } } /* Carte Principale (.exe) */ .primary-download-card { background: #f7faff; border: 1px solid #c8daf0; border-radius: var(--radius-md); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; transition: transform 0.2s ease, box-shadow 0.2s ease; } .primary-download-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); } .btn-main-download { display: inline-flex; align-items: center; justify-content: center; gap: 12px; background: var(--blue-700); color: #ffffff; font-weight: 700; font-size: 1.02rem; padding: 14px 22px; border-radius: var(--radius-sm); text-decoration: none; box-shadow: 0 2px 6px rgba(30, 77, 139, 0.25); transition: all 0.15s ease; margin-top: 18px; } .btn-main-download:hover { background: var(--blue-900); box-shadow: 0 4px 12px rgba(18, 58, 107, 0.35); color: #ffffff; } .btn-main-download svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; } /* Carte Alternative (.gws) */ .alt-download-card { background: var(--card-bg); border: 1px solid var(--grey-200); border-radius: var(--radius-md); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; transition: border-color 0.2s ease, background 0.2s ease; } .alt-download-card:hover { border-color: var(--blue-500); background: #fbfcfe; } .btn-alt-download { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #ffffff; color: var(--blue-700); font-weight: 600; font-size: 0.94rem; padding: 13px 18px; border-radius: var(--radius-sm); border: 1px solid var(--blue-700); text-decoration: none; transition: all 0.15s ease; margin-top: 18px; } .btn-alt-download:hover { background: var(--blue-050); border-color: var(--blue-900); color: var(--blue-900); } .card-title-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; } .card-title { font-size: 1.08rem; font-weight: 700; color: var(--blue-900); margin: 0; } .card-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; padding: 2px 8px; border-radius: 4px; } .tag-recommended { background: var(--blue-050); color: var(--blue-700); border: 1px solid #d4e2f4; } .tag-nosmartscreen { background: var(--ok-bg); color: var(--ok); border: 1px solid #b7dfcb; } .card-desc { font-size: 0.86rem; color: var(--grey-700); margin: 0; line-height: 1.5; } .card-meta-list { font-size: 0.78rem; color: var(--grey-500); margin-top: 12px; display: flex; flex-direction: column; gap: 4px; } /* API Status Live Bar */ .api-live-bar { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--grey-200); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; 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.8rem; font-family: inherit; font-weight: 600; padding: 0; text-decoration: underline; } .api-refresh-btn:hover { color: var(--blue-900); } /* Section Intégrité SHA-256 */ .sha-section { padding: 44px 0; } .sha-card { background: var(--card-bg); border: 1px solid var(--grey-200); border-radius: var(--radius-md); padding: 24px 28px; box-shadow: var(--shadow-sm); } .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; border-color: var(--blue-700); } .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-section { padding: 56px 0; border-top: 1px solid var(--grey-200); } .section-intro-header { text-align: center; max-width: 750px; margin: 0 auto 36px auto; } .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; } .section-intro-header h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; color: var(--blue-900); margin: 0 0 10px 0; } .section-intro-header p { color: var(--grey-700); font-size: 0.96rem; margin: 0; } /* Explication Transparente */ .transparency-banner { background: var(--blue-050); border: 1px solid #d4e2f4; border-left: 4px solid var(--blue-700); border-radius: var(--radius-md); padding: 20px 24px; margin-bottom: 36px; display: flex; gap: 16px; align-items: flex-start; } .transparency-icon { width: 26px; height: 26px; fill: var(--blue-700); flex-shrink: 0; margin-top: 2px; } .transparency-content h3 { font-size: 1.02rem; font-weight: 700; color: var(--blue-900); margin: 0 0 6px 0; } .transparency-content p { font-size: 0.88rem; color: var(--grey-700); margin: 0; line-height: 1.6; } /* Grille des étapes SmartScreen */ .steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 36px; } @media (max-width: 900px) { .steps-grid { grid-template-columns: 1fr; } } .step-card { background: var(--card-bg); border: 1px solid var(--grey-200); border-radius: var(--radius-md); padding: 22px; display: flex; flex-direction: column; position: relative; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, border-color 0.2s ease; } .step-card:hover { transform: translateY(-2px); border-color: var(--blue-500); } .step-num-badge { width: 30px; height: 30px; 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.88rem; margin-bottom: 14px; } .step-title { font-size: 1.02rem; font-weight: 700; color: var(--blue-900); margin: 0 0 6px 0; } .step-text { font-size: 0.86rem; color: var(--grey-700); margin: 0 0 16px 0; line-height: 1.5; flex: 1; } /* Simulation Visuelle Windows SmartScreen */ .mockup-window { background: #004275; /* Bleu officiel Windows Defender */ border-radius: 6px; padding: 14px; color: #fff; font-size: 0.78rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); border: 1px solid rgba(255, 255, 255, 0.2); user-select: none; } .mockup-header { font-size: 0.84rem; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; } .mockup-header svg { width: 15px; height: 15px; fill: #fff; } .mockup-body { color: #e0f2fe; line-height: 1.4; margin-bottom: 10px; } .mockup-link-target { color: #fff; text-decoration: underline; font-weight: 700; padding: 1px 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); display: inline-block; outline: 2px solid #38bdf8; } .mockup-btn-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; } .mockup-btn { padding: 5px 12px; font-size: 0.74rem; border-radius: 3px; font-weight: 600; border: none; cursor: default; } .mockup-btn-primary { background: #38bdf8; color: #00223d; font-weight: 700; } .mockup-btn-secondary { background: rgba(255, 255, 255, 0.15); color: #fff; } /* Changelog */ .changelog-section { padding: 56px 0; border-top: 1px solid var(--grey-200); } .timeline-list { display: flex; flex-direction: column; gap: 24px; max-width: 860px; margin: 0 auto; } .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); } .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: 16px; } .timeline-version { font-size: 1.25rem; 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: 10px; } .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); } /* Captures d'écran */ .visuals-section { padding: 56px 0; border-top: 1px solid var(--grey-200); } .visuals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; } @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); transition: transform 0.2s ease, box-shadow 0.2s ease; } .visual-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); } .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); } /* Spécifications & Exigences */ .specs-section { padding: 56px 0 70px; border-top: 1px solid var(--grey-200); } .specs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; } @media (max-width: 900px) { .specs-grid { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 500px) { .specs-grid { grid-template-columns: 1fr; } } .spec-box { background: var(--card-bg); border: 1px solid var(--grey-200); border-radius: var(--radius-sm); padding: 16px; box-shadow: var(--shadow-sm); } .spec-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--blue-700); font-weight: 700; margin-bottom: 4px; } .spec-val { font-size: 0.94rem; font-weight: 700; color: var(--blue-900); margin-bottom: 4px; } .spec-note { font-size: 0.8rem; color: var(--grey-500); } /* 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; } `; // Remplacer le contenu dans gws/index.html const styleRegex = /`); fs.writeFileSync(GWS_HTML_PATH, gwsHtml, 'utf8'); console.log('✓ gws/index.html : CSS recale sur la DA officielle (fond #fafbfc, bleu #1e4d8b, Inter)'); } else { console.error('Erreur: