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

img {
    max-width: 100%;
    display: block;
}

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

a {
    text-decoration: none;
}

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

/* Pour cacher le contenu exclusif avant inscription */
.hidden {
    display: none !important;
}

/* ========== HERO INSCRIPTION ========== */

.signup-hero {
    position: relative;
    padding-block: 5rem 4rem;
    overflow: hidden;
}

.signup-hero-inner {
    display: flex;
    justify-content: center;
    text-align: center;
}

.signup-hero-text h1 {
    font-size: clamp(2.2rem, 3.6vw, 3rem);
    line-height: 1.1;
}

.signup-hero-text p {
    margin-top: 1rem;
    max-width: 40rem;
    margin-inline: auto;
    font-size: 0.98rem;
}

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

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

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

/* Badge "Inscription" */
.signup-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
    border: 1px solid rgba(74, 222, 128, 0.8);
    margin-bottom: 0.6rem;
}

/* Texte dégradé */
.gradient-text {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ========== BOUTONS GÉNÉRAUX ========== */

.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;
}

.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);
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.7);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 1);
    transform: translateY(-3px);
}

/* Bouton du hero */
.hero-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

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

.section {
    padding-block: 4rem;
}

.section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.75rem;
}

.section-intro {
    max-width: 40rem;
    margin-inline: auto;
    text-align: center;
    font-size: 0.96rem;
    margin-bottom: 2rem;
}

/* Cards réutilisables */
.card {
    border-radius: 18px;
    padding: 1.8rem 1.7rem;
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.7);
    backdrop-filter: blur(24px);
    transition: transform 0.22s ease, box-shadow 0.22s ease,
        border-color 0.22s ease;
}

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

/* ========== FORMULAIRE ========== */

.section-form {
    padding-bottom: 4.5rem;
}

.form-card {
    max-width: 640px;
    margin-inline: auto;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    margin-top: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.signup-form label {
    font-size: 0.9rem;
    font-weight: 500;
}

.signup-form input {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.98);
    color: #e5e7eb;
    font-size: 0.95rem;
    padding: 0.7rem 0.85rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.signup-form input:focus {
    border-color: rgba(74, 222, 128, 0.9);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.6);
    background: rgba(15, 23, 42, 1);
}

/* Case à cocher newsletter */
.form-field--checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0.2rem 0 0.1rem;
}
.form-field--checkbox input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin-top: 1px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.98);
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.form-field--checkbox input[type="checkbox"]:checked {
    background: #16a34a;
    border-color: #16a34a;
}
.form-field--checkbox input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.form-field--checkbox input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.6);
}
.checkbox-label {
    font-size: 0.85rem !important;
    line-height: 1.45;
    cursor: pointer;
    color: #cbd5e1;
}

/* Message après inscription / erreurs */
.signup-message {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    text-align: center;
    color: #4ade80;
}

.signup-message.error {
    color: #f97373;
}

/* ========== CONTENU EXCLUSIF ========== */

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.content-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.content-item p {
    font-size: 0.95rem;
}

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

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

/* ========== THÈME CLAIR / SOMBRE ========== */

/* HERO – mode clair */
body[data-theme="light"] .signup-hero {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.22), transparent 55%),
        radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.18), transparent 55%),
        linear-gradient(180deg, #f0fff8 0%, #e9fbff 55%, #f5fffb 100%);
    color: #052e16;
}

body[data-theme="light"] .signup-hero-text h1 {
    color: #052e16;
}

body[data-theme="light"] .signup-hero-text p {
    color: #1f2937;
}

/* HERO – mode sombre */
body[data-theme="dark"] .signup-hero {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.38), transparent 60%),
        radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.30), transparent 55%),
        linear-gradient(135deg, #001f1f 0%, #020617 55%, #020617 100%);
    color: #f9fafb;
}

body[data-theme="dark"] .signup-hero-text h1 {
    color: #f9fafb;
}

body[data-theme="dark"] .signup-hero-text p {
    color: #cbd5f5;
}

/* Section formulaire + contenu exclusif */
body[data-theme="light"] #signup-form {
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 60%),
        radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.12), transparent 60%),
        #f6fffb;
}

body[data-theme="dark"] #signup-form {
    background: radial-gradient(circle at top, #022c22 0, #020617 55%, #020617 100%);
}

body[data-theme="light"] #restricted-content {
    background: #f5fffb;
}

body[data-theme="dark"] #restricted-content {
    background: radial-gradient(circle at top, #020617 0, #020617 55%, #000 100%);
}

/* Cards en fonction du thème */
body[data-theme="dark"] .card {
    background-color: rgba(15, 23, 42, 0.96);
    color: #e5e7eb;
}

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

/* Inputs en mode clair */
body[data-theme="light"] .signup-form input {
    background: #ffffff;
    color: #111827;
}
body[data-theme="light"] .form-field--checkbox input[type="checkbox"] {
    background: #ffffff;
}
body[data-theme="light"] .form-field--checkbox input[type="checkbox"]:checked {
    background: #16a34a;
}

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

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

@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

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

    .section {
        padding-block: 3.2rem;
    }
}
