:root {
    --bg: #020203;
    --card: rgba(10, 10, 14, 0.8);
    --border: rgba(255, 255, 255, 0.07);
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --text: #f1f5f9;
    --text-dim: #64748b;
    --green: #10b981;
    --orange: #f59e0b;
    --purple: #8b5cf6;
    --cyan: #06b6d4;
    --term-bg: #050506;
    --kde-red: #ff5f56;
    --kde-yellow: #ffbd2e;
    --kde-green: #27c93f;
}

body.light {
    --bg: #f8fafc;
    --card: rgba(255, 255, 255, 0.9);
    --border: rgba(0, 0, 0, 0.08);
    --text: #0f172a;
    --text-dim: #64748b;
    --term-bg: var(--card);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    background-image: radial-gradient(circle at 1px 1px, rgba(128,128,128,0.05) 1px, transparent 0);
    background-size: 40px 40px;
    color: var(--text);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

.nav-switcher {
    background: var(--card); border: 1px solid var(--border);
    padding: 4px; border-radius: 12px; backdrop-filter: blur(10px);
    display: flex; gap: 4px; align-items: stretch;
}
.nav-btn {
    padding: 6px 14px; border-radius: 8px; cursor: pointer;
    font-size: 0.7rem; font-weight: 800; border: none;
    background: transparent; color: var(--text-dim); transition: 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    text-decoration: none;
}
.hamburger {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 28px; border-radius: 8px;
    font-size: 1.1rem; font-weight: 400;
    background: transparent; color: #f1f5f9;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
    cursor: default;
}
.nav-divider {
    width: 1px; height: 18px; background: var(--border); flex-shrink: 0;
}
body.light .hamburger { color: #0f172a; text-shadow: 0 0 10px rgba(0,0,0,0.1); }
.nav-btn.active { background: var(--accent); color: white; }
.nav-btn:not(.active):hover { color: var(--text); }
body:not(.light) .nav-switcher { background: #020617; border-color: #1f2937; }
body.light .nav-switcher { background: #fdfdfd; border-color: #e5e7eb; }

.controls-wrapper {
    position: fixed; top: 25px; right: 25px; z-index: 1000;
    display: flex; gap: 10px; align-items: center;
}
.lang-switcher, .theme-switcher {
    background: var(--card); border: 1px solid var(--border);
    padding: 4px; border-radius: 12px; backdrop-filter: blur(10px);
    display: flex; gap: 4px; align-items: stretch;
}
.lang-btn, .theme-btn {
    padding: 6px 14px; border-radius: 8px; cursor: pointer;
    font-size: 0.7rem; font-weight: 800; border: none;
    background: transparent; color: var(--text-dim); transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.lang-btn.active { background: var(--accent); color: white; }

.theme-switcher { border-radius: 16px; }
.theme-btn {
    padding: 5px 10px; min-width: 36px;
    border-radius: 999px; font-size: 1rem; line-height: 1;
}
.theme-emoji { display: block; }

body.light .theme-switcher { background: #fdfdfd; border-color: #e5e7eb; }
body.light .theme-btn { color: #f59e0b; }
body:not(.light) .theme-switcher { background: #020617; border-color: #1f2937; }
body:not(.light) .theme-btn { color: #fbbf24; }

.grid {
    max-width: 1200px; margin: 22px auto;
    display: grid; grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(160px, auto); gap: 20px;
}
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 28px; padding: 35px; backdrop-filter: blur(20px);
    position: relative; overflow: hidden; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card:hover { border-color: rgba(59, 130, 246, 0.3); transform: translateY(-4px); }
.card::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(600px circle at var(--x) var(--y), rgba(59, 130, 246, 0.08), transparent 40%);
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.row-2 { grid-row: span 2; }
.row-3 { grid-row: span 3; }

.avatar-container {
    position: absolute; top: 35px; right: 35px;
    width: 80px; height: 80px;
    border-radius: 50%; border: 2px solid var(--border);
    overflow: hidden; background: #91a0a5;
}
.avatar-container img { width: 100%; height: 100%; object-fit: cover; }

h1 { font-size: 2.6rem; font-weight: 900; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 15px; }
h2 { font-size: 1rem; font-weight: 800; margin-bottom: 15px; color: var(--accent); display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: 1px; }
h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }

.accent-text { color: var(--accent); }

.typewriter {
    font-family: 'ui-monospace', monospace;
    color: var(--text-dim); min-height: 1.5em;
    font-size: 0.95rem; margin-bottom: 25px;
    white-space: nowrap; overflow: hidden;
    display: block; max-width: 100%;
}

.credo { font-weight: 800; color: var(--text); margin-top: 25px; border-left: 3px solid var(--accent); padding-left: 15px; font-size: 1.1rem; }
.credo .attrib { display: block; font-size: 0.75rem; font-weight: 400; color: var(--text-dim); margin-top: 6px; }

.terminal { background: var(--term-bg); font-family: 'ui-monospace', monospace; font-size: 0.85rem; }
.scanline { width: 100%; height: 2px; background: rgba(59, 130, 246, 0.03); position: absolute; top: 0; left: 0; animation: scan 6s linear infinite; pointer-events: none; }
@keyframes scan { 0% { top: 0; } 100% { top: 100%; } }

.kde-header { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 20px; }
.kde-btn { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

.term-line { margin-bottom: 8px; }
.term-prompt { color: var(--green); }
.term-cmd { color: var(--text); }
.term-output { color: var(--text-dim); margin-top: 15px; line-height: 2.1; }
.term-key { color: var(--accent); }
.term-cursor { display: inline-block; width: 8px; height: 1.1em; background: var(--green); animation: blink 1s step-end infinite; vertical-align: text-bottom; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.terminal-info { margin-top: 15px; line-height: 2.1; font-size: 0.85rem; color: #e5e7eb; }
body.light .terminal-info { color: #111827; }

.tag { background: rgba(128,128,128,0.05); border: 1px solid var(--border); padding: 5px 12px; border-radius: 8px; font-size: 0.65rem; color: var(--text-dim); font-weight: 600; }
.tag-green { background: rgba(16,185,129,0.1); color: var(--green); border-color: rgba(16,185,129,0.2); }
.tag-blue { background: rgba(59,130,246,0.1); color: var(--accent); border-color: rgba(59,130,246,0.2); }
.tag-purple { background: rgba(139,92,246,0.1); color: var(--purple); border-color: rgba(139,92,246,0.2); }
.tag-orange { background: rgba(245,158,11,0.1); color: var(--orange); border-color: rgba(245,158,11,0.2); }
.tag-cyan { background: rgba(6,182,212,0.1); color: var(--cyan); border-color: rgba(6,182,212,0.2); }

.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }

.badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(16, 185, 129, 0.08); color: var(--green);
    padding: 6px 16px; border-radius: 100px; font-size: 0.65rem; font-weight: 800; text-transform: uppercase; margin-bottom: 10px;
}

.signal-bars { display: flex; gap: 3px; align-items: flex-end; height: 20px; }
.signal-bar { width: 4px; border-radius: 2px; background: var(--green); animation: signal 1.5s ease-in-out infinite; }
.signal-bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.signal-bar:nth-child(2) { height: 10px; animation-delay: 0.2s; }
.signal-bar:nth-child(3) { height: 14px; animation-delay: 0.4s; }
.signal-bar:nth-child(4) { height: 18px; animation-delay: 0.6s; }
@keyframes signal { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

.pulse-dot { display: inline-block; width: 8px; height: 8px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; margin-right: 6px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); } 70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }

.body-text { font-size: 0.85rem; color: var(--text-dim); line-height: 1.8; max-width: 700px; }
.body-text p { margin-bottom: 15px; }
.body-text strong { color: var(--text); }
.body-text a { color: var(--accent); text-decoration: none; font-weight: 600; transition: 0.3s; }
.body-text a:hover { text-decoration: underline; }

.coverage-map { width: 100%; border-radius: 16px; border: 1px solid var(--border); overflow: hidden; margin-top: 10px; }
.coverage-map img { width: 100%; height: auto; display: block; }

.steps { counter-reset: step; display: flex; gap: 20px; }
.step-item { counter-increment: step; flex: 1; padding-top: 50px; position: relative; margin-bottom: 0; }
.step-item::before {
    content: counter(step); position: absolute; left: 50%; top: 0; transform: translateX(-50%);
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.25);
    color: var(--accent); font-weight: 800; font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
}
.step-title { font-weight: 700; color: var(--text); font-size: 0.9rem; margin-bottom: 4px; text-align: center; }
.step-desc { font-size: 0.8rem; color: var(--text-dim); line-height: 1.6; text-align: center; }

.questions { display: flex; flex-direction: column; gap: 12px; }
.question-item { font-size: 0.85rem; color: var(--text-dim); padding: 12px 18px; border-radius: 14px; border: 1px solid var(--border); line-height: 1.7; transition: 0.3s; }
.question-item:hover { border-color: rgba(59,130,246,0.25); background: rgba(59,130,246,0.03); }
.question-item strong { color: var(--text); }

.atout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.atout-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1px solid var(--border); transition: 0.3s; }
.atout-item:hover { border-color: rgba(59,130,246,0.2); background: rgba(59,130,246,0.02); }
.atout-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(59,130,246,0.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent); }
.atout-icon.green { background: rgba(16,185,129,0.1); color: var(--green); }
.atout-icon.orange { background: rgba(245,158,11,0.1); color: var(--orange); }
.atout-icon.purple { background: rgba(139,92,246,0.1); color: var(--purple); }
.atout-icon.cyan { background: rgba(6,182,212,0.1); color: var(--cyan); }
.atout-text { font-size: 0.8rem; color: var(--text-dim); line-height: 1.5; }
.atout-title { color: var(--text); margin-bottom: 2px; font-size: 0.85rem; font-weight: 700; }

.coverage-badge {
    position: absolute; bottom: 12px; left: 12px;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 6px 12px; border-radius: 10px;
    font-size: 0.65rem; color: var(--text-dim);
    font-family: 'ui-monospace', monospace;
}

.links-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.links-row a {
    display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 10px 8px; line-height: 1.4;
    border-radius: 12px; border: 1px solid var(--border);
    font-size: 0.75rem; font-weight: 700; color: var(--accent);
    text-decoration: none; transition: 0.3s;
}
.links-row a:hover { border-color: var(--accent); background: rgba(59,130,246,0.08); }

.cta-btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--accent); color: white; border: none;
    padding: 14px 28px; border-radius: 15px;
    font-weight: 800; font-size: 0.9rem; cursor: pointer;
    text-decoration: none; transition: 0.3s;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,130,246,0.3); }
.cta-btn .icon { stroke: white; }

[data-l] { display: none; }
body.fr [data-l="fr"] { display: block; }
body.en [data-l="en"] { display: block; }
body.fr [data-l="fr"].inline { display: inline; }
body.en [data-l="en"].inline { display: inline; }

footer {
    max-width: 1200px; margin: 40px auto; padding: 20px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    font-family: 'ui-monospace', monospace; font-size: 0.65rem; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 2px;
}

input, textarea { width: 100%; background: rgba(128,128,128,0.05); border: 1px solid var(--border); border-radius: 15px; padding: 15px; color: var(--text); margin-bottom: 10px; outline: none; }
button.submit-btn { width: 100%; background: var(--accent); color: white; border: none; padding: 15px; border-radius: 15px; font-weight: 800; cursor: pointer; transition: 0.3s; }
button.submit-btn:hover { opacity: 0.9; }

.meteo-bg-curve {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 60%;
    z-index: 0; opacity: 0.15; pointer-events: none; stroke: var(--orange); fill: none;
}

.meteo-panel {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 12px;
    font-family: 'ui-monospace', monospace;
    font-size: 0.75rem;
    border: 1px solid var(--border);
}
body.light .meteo-panel {
    background: rgba(255,255,255,0.8);
}

@media (max-width: 1000px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .span-3, .span-4 { grid-column: span 2; }
    footer { flex-direction: column; gap: 10px; text-align: center; }
    .controls-wrapper { top: 15px; right: 15px; }
}
@media (max-width: 650px) {
    .grid { grid-template-columns: 1fr; }
    .span-2, .span-3, .span-4 { grid-column: span 1; }
    .card { padding: 25px; }
    .atout-grid { grid-template-columns: 1fr; }
    .nav-btn { padding: 6px 10px; font-size: 0.65rem; }
    .steps { flex-direction: column; gap: 16px; }
    .step-item { padding-top: 0; padding-left: 50px; }
    .step-item::before { left: 0; top: 0; transform: none; }
    .step-title, .step-desc { text-align: left; }
    .links-row { grid-template-columns: 1fr; }
}

.hardware-photo { width:70%; max-width:320px; margin:18px auto 0; display:block; }
.step-extra { margin-top:18px; font-size:0.8rem; color:var(--text-dim); text-align:center; line-height:1.6; }
.step-extra strong { color:var(--text); }
.note-card { background:rgba(245,158,11,0.03); border-color:rgba(245,158,11,0.15); }
.note-card h2 { color:var(--orange); }
