/* Page d'accueil - refonte 2026 */

/*
 * Couleurs de l'accueil, réglées ici et nulle part ailleurs.
 * Les couleurs historiques du site : dégradé indigo vers cyan, cyan en accent.
 * (Valeurs de secours si une ancienne version de stylec3db.css est en cache.)
 */
body.home {
    --home-cta-bg: var(--cta-gradient, linear-gradient(90deg, #4f46e5, #0e7490));
    --home-cta-bg-hover: var(--cta-gradient-hover, linear-gradient(90deg, #4338ca, #155e75));
    --home-cta-text: #ffffff;
    --home-cta-icon-bg: rgba(0, 0, 0, 0.22);
    --home-cta-icon-text: #ffffff;
    --home-accent: #67e8f9;
    --home-accent-line: rgba(103, 232, 249, 0.5);

    /* Panneaux vitrés posés sur la photo de l'île (fond fixe du site) */
    --home-panel-bg: rgba(12, 12, 18, 0.62);
    --home-panel-border: rgba(255, 255, 255, 0.08);
    --home-card-bg: rgba(255, 255, 255, 0.04);
    --home-card-border: rgba(255, 255, 255, 0.09);
}

.home-hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: flex-end;
    padding: 140px 0 64px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.45) 100%);
}

.home-hero__inner,
.home-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
}

.home-hero__inner {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.home-eyebrow-pill {
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 8px 14px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.home-title {
    max-width: 820px;
    font-size: clamp(2.5rem, 6vw, 4.75rem);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.home-title__accent {
    color: var(--home-accent);
}

.home-lead {
    max-width: 640px;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    line-height: 1.5;
    color: #f4f4f5;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.home-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Boutons */
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 26px;
    border: 1px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out;
}

.home-btn--primary {
    background: var(--home-cta-bg);
    color: var(--home-cta-text);
}

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

.home-btn--primary:active {
    transform: translateY(1px);
}

/* Bouton principal avec la flèche dans son propre segment, à droite */
.home-btn--split {
    padding-right: 0;
}

.home-btn__icon {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    margin-left: 14px;
    background: var(--home-cta-icon-bg);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--home-cta-icon-text);
}

.home-btn__icon i {
    transition: transform 0.2s ease-out;
}

.home-btn--split:hover .home-btn__icon i {
    transform: translateX(3px);
}

.home-btn--ghost {
    background: rgba(10, 10, 14, 0.45);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.home-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff;
}

.home-btn--outline {
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    min-height: 48px;
}

.home-btn--outline:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.home-btn:focus-visible,
.home-card a:focus-visible,
.home-faq summary:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* Données en direct */
.home-live {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.home-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(10, 10, 14, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e4e4e7;
    font-size: 1rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.home-chip[hidden] {
    display: none;
}

.home-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #71717a;
}

.home-dot.is-online {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.home-dot.is-offline {
    background: #a1a1aa;
}

/* Sections : panneaux vitrés sur la photo de l'île, comme le reste du site */
.home-main {
    color: #ffffff;
    padding-bottom: 24px;
}

.home-section {
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.home-panel {
    max-width: 1200px;
    margin: 32px auto 0;
    padding: 48px;
    box-sizing: border-box;
    background: var(--home-panel-bg);
    border: 1px solid var(--home-panel-border);
    border-radius: 24px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.home-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.home-head > div {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-eyebrow {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--home-accent);
}

.home-h2 {
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: #ffffff;
}

.home-text {
    color: #b4b4bd;
    font-size: 1.05rem;
    line-height: 1.6;
}

.home-tag {
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--home-card-bg);
    border: 1px solid var(--home-card-border);
    color: #e4e4e7;
    font-size: 0.95rem;
}

/* Étapes */
.home-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.home-steps li {
    background: var(--home-card-bg);
    border: 1px solid var(--home-card-border);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-step-num {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
}

.home-steps li:first-child .home-step-num {
    border-color: var(--home-accent);
    color: var(--home-accent);
}

.home-steps strong {
    font-size: 1.25rem;
}

.home-steps span:last-child {
    color: #b4b4bd;
    line-height: 1.55;
}

/* Factions */
.home-factions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.home-faction {
    border-radius: 18px;
    overflow: hidden;
    background: var(--home-card-bg);
    border: 1px solid var(--home-card-border);
    display: flex;
    flex-direction: column;
}

.home-faction img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.home-faction div {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-faction h3 {
    font-size: 1.35rem;
    font-weight: 800;
}

.home-faction p {
    color: #b4b4bd;
    line-height: 1.55;
}

/* Communauté */
.home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.home-card {
    background: var(--home-card-bg);
    border: 1px solid var(--home-card-border);
    border-radius: 18px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.home-card .home-btn {
    margin-top: auto;
    min-height: 48px;
}

.home-voters {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-voters li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.home-voters span:last-child {
    color: #b4b4bd;
    font-variant-numeric: tabular-nums;
}

.home-rank-1 { color: #fbbf24; }
.home-rank-2 { color: #d4d4d8; }
.home-rank-3 { color: #f59e0b; }

.home-big-number {
    font-size: 1.9rem;
    font-weight: 800;
}

.home-big-number small {
    font-size: 1rem;
    font-weight: 500;
    color: #b4b4bd;
}

.home-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.home-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    color: #e4e4e7;
    text-decoration: none;
}

.home-links a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.home-links i {
    width: 20px;
    color: var(--home-accent);
    text-align: center;
}

/* FAQ */
.home-faq {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.home-faq > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-faq > div:first-child a {
    color: #ffffff;
    font-weight: 600;
    text-decoration-color: var(--home-accent-line);
    text-underline-offset: 4px;
}

.home-faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-faq details {
    background: var(--home-card-bg);
    border: 1px solid var(--home-card-border);
    border-radius: 14px;
}

.home-faq details[open] {
    border-color: var(--home-accent-line);
}

.home-faq summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    font-size: 1.05rem;
    font-weight: 700;
}

.home-faq summary::-webkit-details-marker {
    display: none;
}

.home-faq summary::after {
    content: '+';
    color: #b4b4bd;
    font-size: 1.3rem;
    line-height: 1;
}

.home-faq details[open] summary::after {
    content: '\2212';
}

.home-faq details p {
    padding: 0 22px 20px;
    color: #d4d4d8;
    line-height: 1.65;
}

/* Inscription : titre posé sur la photo, puis le formulaire (déjà vitré) */
.home-signup {
    margin-top: 72px;
    scroll-margin-top: 100px;
    gap: 0;
}

.home-signup .home-head {
    justify-content: center;
    text-align: center;
}

.home-signup .home-head > div {
    align-items: center;
    max-width: 640px;
}

.home-signup .home-h2,
.home-signup .home-text {
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

.home-signup .home-text {
    color: #e4e4e7;
}

.home-signup .form-container {
    margin-top: 2rem;
}

.home-signup .step.active {
    background: var(--home-cta-bg);
    border-color: var(--home-cta-bg);
    color: var(--home-cta-text);
    box-shadow: none;
}

.home-signup .form-container button {
    min-height: 50px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--home-cta-bg);
    color: var(--home-cta-text);
    font-weight: 700;
}

.home-signup .form-container button:hover {
    background: var(--home-cta-bg-hover);
    box-shadow: none;
    transform: none;
}

.home-signup .form-container button.prev {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.home-signup .form-container button.prev:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.home-signup .form-container button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* Bouton d'inscription toujours visible sur mobile */
.home-sticky-cta {
    display: none;
}

@media (max-width: 768px) {
    .home-hero {
        min-height: 0;
        padding: 120px 0 40px;
    }

    .home-hero__inner,
    .home-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .home-panel {
        margin: 16px 12px 0;
        padding: 28px 16px;
        border-radius: 20px;
    }

    .home-btn {
        width: 100%;
        padding: 0 18px;
        font-size: 0.95rem;
    }

    .home-btn--split {
        padding-right: 0;
    }

    .home-sticky-cta {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: rgba(10, 10, 14, 0.85);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        transition: transform 0.2s ease-out;
    }

    .home-sticky-cta.is-hidden {
        transform: translateY(110%);
    }

    /* Remonter le bouton "haut de page" au-dessus de la barre */
    body.home-has-sticky .scroll-top {
        bottom: 96px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-btn,
    .home-btn__icon i,
    .home-sticky-cta {
        transition: none;
    }
}
