/* ----- RESET & BASES ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

:root {
    --primary: #10b981; /* Vert émeraude */
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ----- HEADER ----- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: var(--primary);
}

.badge-v {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary);
}

.nav-back {
    font-size: 0.9rem;
    border-left: 1px solid var(--border);
    padding-left: 2rem;
}

/* ----- MENU MOBILE (HAMBURGER) ----- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ----- BOUTONS ----- */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-alt);
    border-color: #cbd5e1;
}

/* ----- HERO SECTION ----- */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem 2rem;
    background: radial-gradient(circle at top, var(--primary-light) 0%, transparent 50%);
}

.hero-content {
    max-width: 800px;
    animation: slideUp 0.8s ease-out;
}

.badge-update {
    display: inline-block;
    background-color: #fef3c7;
    color: #d97706;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid #fde68a;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ----- SECTIONS GENERIQUES ----- */
section[id] {
    scroll-margin-top: 100px;
}

.section-container {
    padding: 6rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bg-gray {
    background-color: var(--bg-alt);
    max-width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ----- FONCTIONNALITES (3 colonnes) ----- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 3rem;
}

.feature-box {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: var(--primary-light);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 20px;
}

.feature-box h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature-box p {
    color: var(--text-muted);
}

/* ----- NOUVEAUTES (CHANGELOG) ----- */
.changelog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    gap: 1.5rem;
}

.changelog-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.2s, border-color 0.2s;
}

.changelog-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.changelog-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    background: var(--primary-light);
    width: 48px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    border-radius: 12px;
}

.changelog-text h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.changelog-text p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.changelog-text a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}

.changelog-text a:hover {
    text-decoration: underline;
}

/* ----- LISTE DES SONNERIES ----- */
.sounds-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.sound-item {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.2s, border-color 0.2s;
}

.sound-item:hover {
    transform: translateX(10px);
    border-color: var(--primary);
}

.sound-icon {
    font-size: 2rem;
    margin-right: 2rem;
    width: 60px;
    text-align: center;
}

.sound-details {
    flex-grow: 1;
}

.sound-details h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

/* ----- LECTEUR AUDIO ----- */
.play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    margin-left: auto;
    border-radius: 50%;
    border: none;
    background-color: var(--primary);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.play-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.play-btn:active {
    transform: scale(0.95);
}

.play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.play-label {
    display: none;
}

/* ----- BADGES COMMANDES (v1 / v2) ----- */
.cmd-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cmd-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-new,
.tag-update {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.tag-new {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.tag-update {
    background-color: #fef3c7;
    color: #d97706;
}

/* ----- TERMINAL COMMANDES ----- */
.terminal-mockup {
    background-color: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.3);
}

.terminal-header {
    background-color: #1e293b;
    padding: 1rem;
    display: flex;
    align-items: center;
    position: relative;
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.terminal-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.terminal-dots span:nth-child(1) { background-color: #ef4444; }
.terminal-dots span:nth-child(2) { background-color: #eab308; }
.terminal-dots span:nth-child(3) { background-color: #22c55e; }

.terminal-title {
    position: absolute;
    width: 100%;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    font-family: monospace;
    pointer-events: none;
}

.terminal-body {
    padding: 2rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    color: #f8fafc;
}

.cmd-line {
    margin-bottom: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cmd-line.empty {
    height: 1rem;
}

.cmd-line.comment {
    color: #64748b;
    font-style: italic;
    margin-top: 1rem;
}

.cmd-prompt { color: var(--primary); font-weight: bold; }
.cmd-name { color: #38bdf8; font-weight: bold; }
.cmd-arg { color: #fde047; }
.cmd-desc { color: #64748b; margin-left: auto; }

/* ----- CTA SECTION ----- */
.cta-section {
    text-align: center;
    padding: 6rem 2rem;
    background: var(--primary);
    color: white;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-btn {
    background-color: white;
    color: var(--primary);
}

.cta-btn:hover {
    background-color: var(--bg-alt);
    color: var(--primary-dark);
}

/* ----- FOOTER ----- */
footer {
    background-color: var(--text-main);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-logo span {
    font-size: 0.8rem;
    font-weight: normal;
    color: var(--primary);
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

.copyright {
    color: var(--text-muted);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ----- RESPONSIVE ----- */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
        position: fixed;
    }

    .logo { font-size: 1.5rem; }

    .menu-toggle { display: flex; }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 24px -12px rgba(0,0,0,0.15);
        padding: 0.5rem 1.5rem 1rem 1.5rem;
    }

    nav.open { display: flex; }

    nav a {
        padding: 0.9rem 0;
        border-bottom: 1px solid var(--border);
        font-size: 1rem;
    }

    nav a:last-child { border-bottom: none; }

    .nav-back {
        border-left: none;
        padding-left: 0;
        margin-top: 0.3rem;
        color: var(--primary);
        font-weight: 600;
    }

    .hero { padding: 7.5rem 1.2rem 3rem 1.2rem; min-height: unset; }
    .badge-update { font-size: 0.8rem; padding: 0.35rem 0.8rem; }
    .hero p { font-size: 1.05rem; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; justify-content: center; }

    .section-container { padding: 3.5rem 1.2rem; }
    .section-header { margin-bottom: 2.5rem; }
    .section-header h2 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
    .section-header p { font-size: 1rem; }

    .features-grid { gap: 1.5rem; }
    .feature-box { padding: 1rem; }

    .changelog-grid { gap: 1rem; }
    .changelog-item { padding: 1.2rem; gap: 1rem; }
    .changelog-icon { width: 40px; height: 40px; line-height: 40px; font-size: 1.2rem; }
    .changelog-text h3 { font-size: 1rem; }
    .changelog-text p { font-size: 0.88rem; }

    .sounds-list { gap: 1rem; }
    .sound-item {
        flex-direction: column;
        text-align: center;
        padding: 1.2rem;
    }
    .sound-icon { margin: 0 0 0.8rem 0; }
    .sound-details h3 { justify-content: center; font-size: 1.05rem; }

    .play-btn {
        width: 100%;
        height: 46px;
        border-radius: 999px;
        margin: 1rem 0 0 0;
        gap: 0.6rem;
        font-size: 0.95rem;
        font-weight: 600;
    }
    .play-label {
        display: inline;
        font-family: 'Outfit', sans-serif;
    }

    .cmd-legend { flex-direction: column; align-items: center; gap: 0.6rem; }

    .terminal-mockup { border-radius: 8px; }
    .terminal-header { padding: 0.8rem; }
    .terminal-title { font-size: 0.75rem; }
    .terminal-body { padding: 1.2rem; font-size: 0.82rem; }
    .cmd-line { gap: 0.4rem; margin-bottom: 0.7rem; }
    .cmd-desc { margin-left: 0; width: 100%; }
    .tag-new, .tag-update { font-size: 0.6rem; padding: 0.12rem 0.5rem; }

    .cta-section { padding: 4rem 1.2rem; }
    .cta-section h2 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
    .cta-section p { font-size: 1rem; }

    footer { padding: 3rem 1.2rem; }
}

@media (max-width: 420px) {
    .hero h1 { font-size: 2rem; }
    .terminal-body { font-size: 0.75rem; }
    .cmd-name { word-break: break-word; }
}