/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    line-height: 1.6;
}

/* Thème global */
body[data-theme="light"] {
    color: #111827;
    background: linear-gradient(
        180deg,
        #f5fffb 0%,
        #ecfffa 40%,
        #f6fbff 100%
    );
}

body[data-theme="dark"] {
    color: #e5e7eb;
    background: radial-gradient(
            circle at top,
            #022c22 0,
            transparent 55%
        ),
        linear-gradient(135deg, #020617 0%, #000000 90%);
}

/* Liens */
a {
    text-decoration: none;
    color: inherit;
}

/* Container utilitaire */
.container {
    width: min(1200px, 100% - 3rem);
    margin-inline: auto;
}

/* ========== HEADER & NAV ========== */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.9rem 2rem;
    background-color: #46a908;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.logo {
    width: 140px;
    height: auto;
    display: block;
}

/* NAV */
nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

#menu li {
    position: relative;
}

#menu li a {
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    color: #f9fafb;
    padding-bottom: 0.35rem;
}

/* Soulignement vert animé */
#menu li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    background: #bbf7d0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

/* Hover + lien actif */
#menu li a:hover::after,
#menu li a.active::after,
#menu li a.actif::after {
    transform: scaleX(1);
}

/* Le bouton Inscription n'a pas de ligne verte */
#menu li a.nav-cta::after {
    display: none;
}

/* Style CTA inscription */
.nav-cta {
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    background: #f9fafb;
    color: #166534;
}

/* DROPDOWN MENU FOR GREENFARM */
#menu .nav-dropdown {
    position: relative;
}

#menu .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

#menu .dropdown-toggle .arrow {
    font-size: 0.7rem;
    transition: transform 0.25s ease;
}

#menu .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    list-style: none;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.6rem;
    min-width: 180px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

body[data-theme="dark"] #menu .dropdown-menu {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.1);
}

@media (min-width: 769px) {
    #menu .nav-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(5px);
    }
    
    #menu .nav-dropdown:hover .dropdown-toggle .arrow {
        transform: rotate(180deg);
    }
}

#menu .dropdown-item {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    color: #4b5563 !important;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    display: block;
}

body[data-theme="dark"] #menu .dropdown-item {
    color: #d1d5db !important;
}

#menu .dropdown-item:hover,
#menu .dropdown-item.actif {
    background: #f3f4f6;
    color: #10b981 !important;
}

body[data-theme="dark"] #menu .dropdown-item:hover,
body[data-theme="dark"] #menu .dropdown-item.actif {
    background: #1f2937;
    color: #34d399 !important;
}

#menu .dropdown-item::after {
    display: none !important; /* disable underline for dropdown items */
}

@media (max-width: 768px) {
    #menu .dropdown-menu {
        position: static;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        padding-block: 0.2rem;
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
        background: transparent;
    }
    
    #menu .dropdown-toggle .arrow {
        display: none;
    }
    
    #menu .dropdown-item {
        color: #f9fafb !important;
        text-align: center;
    }
}


/* Menu burger */
#menu-toggle {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #f9fafb;
}

/* Bouton thème */
.theme-toggle {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(15, 23, 42, 0.15);
    color: #f9fafb;
    padding: 0.3rem 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background-color 0.2s ease, transform 0.2s ease,
        box-shadow 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.4);
}

/* ========== HERO / BANNER ========== */

#economie-banner {
    padding: 0;
}

.banner {
    position: relative;
    padding: 4.5rem 1.5rem 4rem;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}

/* Orbits lumineuses */
.hero-orbit {
    position: absolute;
    border-radius: 999px;
    filter: blur(44px);
    opacity: 0.55;
    z-index: 0;
}

.hero-orbit--one {
    width: 420px;
    height: 420px;
    background: radial-gradient(
        circle,
        rgba(34, 197, 94, 0.7),
        transparent 70%
    );
    top: -120px;
    left: -160px;
}

.hero-orbit--two {
    width: 480px;
    height: 480px;
    background: radial-gradient(
        circle,
        rgba(56, 189, 248, 0.5),
        transparent 70%
    );
    bottom: -260px;
    right: -160px;
}

.banner-inner {
    position: relative;
    z-index: 1;
    width: min(900px, 100% - 3rem);
    margin-inline: auto;
    text-align: center;
}

/* Thème clair / sombre pour le hero */
body[data-theme="light"] #economie-banner .banner {
    background: linear-gradient(135deg, #46a908, #6bd938);
    color: #f9fafb;
}

body[data-theme="dark"] #economie-banner .banner {
    background:
        radial-gradient(circle at top, rgba(34, 197, 94, 0.48), transparent 60%),
        linear-gradient(135deg, #020617, #001f1f);
    color: #e5e7eb;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(15, 23, 42, 0.9);
    color: #bbf7d0;
    border: 1px solid rgba(187, 247, 208, 0.9);
    margin-bottom: 0.8rem;
}

#economie-banner h1 {
    font-size: clamp(2.1rem, 3.2vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

#economie-banner p {
    font-size: 0.98rem;
    line-height: 1.7;
    max-width: 42rem;
    margin-inline: auto;
    color: #eefdf4;
}

/* ========== SECTIONS GÉNÉRALES ========== */

main {
    padding: 2.5rem 1.5rem 4rem;
}

.content-section {
    width: min(1200px, 100%);
    margin: 2rem auto;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.65);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(22px);
}

/* Thème clair / sombre pour les sections */
body[data-theme="light"] .content-section {
    background-color: #ffffff;
    color: #111827;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.15);
    border-color: rgba(148, 163, 184, 0.4);
}

body[data-theme="dark"] .content-section {
    background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
}

/* Titres */
.content-section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #22c55e;
}

body[data-theme="dark"] .content-section h2 {
    color: #4ade80;
}

.content-section p {
    font-size: 0.98rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

body[data-theme="dark"] .content-section p {
    color: #cbd5f5;
}

/* Listes avec check */
.check-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.check-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.7rem;
    font-size: 0.98rem;
}

.check-list li::before {
    content: "✔️";
    position: absolute;
    left: 0;
    top: 0;
}

/* Grilles */
.grid {
    display: grid;
    gap: 1.5rem;
}

.cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Cards internes */
.card {
    border-radius: 16px;
    padding: 1.5rem 1.4rem;
    border: 1px solid rgba(148, 163, 184, 0.7);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(18px);
    transition: transform 0.2s ease, box-shadow 0.2s ease,
        border-color 0.2s ease;
}

body[data-theme="light"] .card {
    background-color: #f9fafb;
    color: #111827;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
    border-color: rgba(148, 163, 184, 0.45);
}

body[data-theme="dark"] .card {
    background-color: rgba(15, 23, 42, 0.98);
    color: #e5e7eb;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
    border-color: rgba(74, 222, 128, 0.9);
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    color: #16a34a;
}

body[data-theme="dark"] .card h3 {
    color: #4ade80;
}

.card p {
    font-size: 0.95rem;
    margin: 0;
}

/* CTA dans sections */
.section-cta {
    text-align: center;
    margin-top: 1.8rem;
}

/* ========== BOUTONS ========== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease,
        background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

/* Primaire */
.btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ecfdf5;
    box-shadow: 0 18px 40px rgba(22, 163, 74, 0.7);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 60px rgba(22, 163, 74, 0.9);
}

/* Secondaire */
.btn-secondary {
    background: #0f172a;
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.8);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    background: #020617;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.9);
}

/* Ghost */
.btn-ghost {
    background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 1);
    transform: translateY(-3px);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.95);
}

/* ========== CTA FINAL ========== */

.cta-final {
    padding: 4rem 1.5rem 3.5rem;
}

.cta-inner {
    width: min(1000px, 100%);
    margin-inline: auto;
    border-radius: 22px;
    padding: 2.8rem 2.4rem;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.8);
    box-shadow: 0 22px 65px rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(26px);
}

/* Thème clair / sombre CTA */
body[data-theme="light"] .cta-inner {
    background: radial-gradient(circle at top left, #bbf7d0 0, #ecfdf3 45%, #ffffff 100%);
    color: #052e16;
    border-color: rgba(22, 163, 74, 0.6);
}

body[data-theme="dark"] .cta-inner {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.4), transparent 60%),
        linear-gradient(135deg, #020617, #001f1f);
    color: #f9fafb;
}

.cta-inner h2 {
    font-size: 2.1rem;
    margin-bottom: 1rem;
}

.cta-inner p {
    font-size: 1rem;
    max-width: 38rem;
    margin-inline: auto;
    margin-bottom: 1.8rem;
}

/* Boutons CTA */
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========== FOOTER ========== */

footer {
    background-color: #46a908;
    color: #fff;
    padding: 3rem 1.5rem 3.5rem;
    text-align: center;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.25);
}

footer .newsletter {
    margin-bottom: 1.8rem;
}

footer .newsletter h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

footer .newsletter form {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

footer .newsletter input {
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    border: none;
    min-width: 260px;
    font-size: 0.95rem;
}

footer .socials {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    align-items: center;
}

footer .socials a {
    color: #ffffff;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding-top: 0.3rem;
}

footer .socials a:hover {
    color: #0f172a;
}

footer span {
    font-size: 1.4rem;
}

footer p {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #e5e7eb;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    header {
        padding-inline: 1.1rem;
    }

    #menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background-color: #15803d;
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 0.7rem 0 0.9rem;
        display: none;
        border-radius: 0 0 18px 18px;
        box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
    }

    #menu.active {
        display: flex;
    }

    #menu li {
        width: 100%;
        text-align: center;
    }

    #menu li a {
        display: inline-block;
        padding: 0.5rem 0;
    }

    #menu-toggle {
        display: block;
    }

    .theme-toggle {
        font-size: 0.9rem;
        padding-inline: 0.55rem;
    }

    main {
        padding-inline: 1rem;
    }

    .content-section {
        padding: 2rem 1.5rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .cta-inner {
        padding: 2.2rem 1.6rem;
    }
}
