/* =========================================================================
   VanillaCraft — styles de la page d'accueil
   Chargée uniquement par views/home.blade.php via @push('styles').
   Les tokens --vc-* et le gabarit de section vivent dans theme.css.
   ========================================================================= */

/* --- Hero : la bande de couleur ---------------------------------------- */

/* La bande occupe toute la hauteur de l'écran. `svh` plutôt que `vh` : sur
   mobile, la barre d'adresse ne fait plus sauter la mise en page. Le contenu
   est centré verticalement, la ligne de sol reste collée en bas. */
.vc-hero {
    /* Couleurs de la bande, isolées en variables : changer la palette du
       hero ne demande qu'une seule déclaration. */
    --vc-hero-bg: var(--vc-terra);
    --vc-hero-shade-top: rgb(224 138 96 / 52%);
    --vc-hero-shade-mid: rgb(180 84 47 / 48%);
    --vc-hero-shade-bottom: rgb(122 51 25 / 70%);
    --vc-hero-title-shadow: rgb(80 30 12 / 42%);
    /* Blanc plutôt que le crème chaud de la palette : sur le terracotta,
       #FFE8DC ne donne que ~3,9:1, sous le seuil AA pour du texte de 19px. */
    --vc-hero-lead-color: #FFFFFF;

    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100svh;
    /* Dégage la navbar fixe (≈96 px) et laisse de l'air avant le logo. */
    padding-top: 128px;
    background-color: var(--vc-hero-bg);
    overflow: hidden;
    isolation: isolate;
}

/* Trois couches empilées, reprises de la maquette : dégradé vertical pour la
   profondeur, halo radial pour la lumière, puis une grille fine qui rappelle
   les blocs du jeu. */
.vc-hero-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.vc-hero-layer-shade {
    background: linear-gradient(180deg, var(--vc-hero-shade-top) 0%, var(--vc-hero-shade-mid) 58%, var(--vc-hero-shade-bottom) 100%);
}

.vc-hero-layer-glow {
    background: radial-gradient(120% 80% at 50% 22%, rgb(255 255 255 / 22%) 0%, rgb(255 255 255 / 0%) 60%);
}

.vc-hero-layer-grid {
    background-image:
        repeating-linear-gradient(90deg, rgb(255 255 255 / 7%) 0 1px, rgb(255 255 255 / 0%) 1px 64px),
        repeating-linear-gradient(0deg, rgb(255 255 255 / 7%) 0 1px, rgb(255 255 255 / 0%) 1px 64px);
}

/* Silhouette du château, ancrée en bas au centre. Volontairement discrète :
   elle doit se lire comme un décor, pas rivaliser avec le lockup. Testé aussi
   en `soft-light` et en `luminosity`, qui la rendaient quasi invisible. */
.vc-hero-castle {
    background-image: url("../img/hero-castle-sm.webp");
    background-position: center bottom;
    background-size: min(1500px, 160%) auto;
    background-repeat: no-repeat;
    opacity: 0.5;
}

@media (min-width: 768px) {
    .vc-hero-castle {
        background-image: url("../img/hero-castle.webp");
    }
}

/* Sur petit écran le château deviendrait un aplat flou plein cadre. */
@media (max-width: 575.98px) {
    .vc-hero-castle {
        background-size: 220% auto;
        opacity: 0.38;
    }
}

.vc-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.vc-hero-logo {
    width: 340px;
    max-width: 66%;
}

/* Flottement lent du lockup. Le keyframe vit dans theme.css. */
.vc-anim-float {
    animation: vc-float 7s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .vc-anim-float {
        animation: none;
    }
}

.vc-hero-title {
    font-size: clamp(2.6rem, 6.4vw, 4.5rem);
    line-height: 0.98;
    color: #FFFFFF;
    max-width: 900px;
    margin-bottom: 0;
    text-shadow: 0 4px 0 var(--vc-hero-title-shadow);
}

.vc-hero-lead {
    max-width: 640px;
    font-size: 19px;
    line-height: 1.6;
    color: var(--vc-hero-lead-color);
    margin-bottom: 0;
}

/* Carte d'adresse : fond crème posé sur le vert, badge de joueurs accroché
   sur l'angle supérieur droit. */
.vc-hero-ip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--vc-bg);
    border-radius: 18px;
    padding: 10px 10px 10px 20px;
    box-shadow: 0 18px 40px -20px rgb(80 30 12 / 55%);
}

.vc-hero-ip-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--vc-text-muted);
    margin-bottom: 1px;
}

.vc-hero-ip-value {
    font-family: var(--vc-font-mono);
    font-size: 22px;
    font-weight: 500;
    color: var(--vc-text);
}

/* Ligne de blocs qui ferme la bande du hero, comme un sol de jeu.
   `margin-top: auto` la colle en bas maintenant que la bande fait toute la
   hauteur de l'écran. */
.vc-ground {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: auto;
    padding-top: 48px;
}

.vc-ground span {
    flex: 1;
    height: 28px;
    border-radius: 8px 8px 0 0;
    box-shadow: inset 0 6px 0 rgb(255 255 255 / 22%);
}

/* --- « C'est quoi VanillaCraft » ---------------------------------------- */

.vc-about-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 56px;
    align-items: start;
}

.vc-about-figure {
    margin-top: 12px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--vc-shadow-lifted);
}

.vc-about-figure img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.vc-about-row {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 22px;
    padding: 26px 0;
    border-top: 1px solid var(--vc-border-soft);
}

.vc-about-row .vc-icon {
    width: 84px;
    height: 84px;
}

.vc-about-row h3 {
    font-size: 28px;
    margin-bottom: 8px;
}

.vc-about-row p {
    font-size: 17px;
    line-height: 1.66;
    margin-bottom: 0;
}

/* --- « Soutenir le serveur » --------------------------------------------- */
/* Panneau chaud à deux colonnes : le texte à gauche, le coffre à droite.
   Même vocabulaire que les autres surfaces du thème : rayon, bordure de 2 px,
   crème chaud. */

.vc-support {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
    background-color: var(--vc-surface-warm);
    border: 2px solid var(--vc-border);
    border-radius: var(--vc-radius-lg);
    padding: 44px 48px;
}

.vc-support-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 40rem;
}

.vc-support-body .vc-section-title {
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}

.vc-support-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Bouton secondaire volontairement discret : il ouvre une note d'information,
   il ne doit pas concurrencer le CTA boutique. */
.vc-support-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: 0;
    padding: 6px 2px;
    color: var(--vc-text-muted);
    font-family: var(--vc-font-body);
    font-size: 15px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color var(--vc-transition);
}

.vc-support-note:hover,
.vc-support-note:focus-visible {
    color: var(--vc-text);
}

.vc-support-visual {
    flex-shrink: 0;
}

.vc-support-visual img {
    width: 170px;
    height: auto;
}

/* Le diamant flotte à un rythme propre, décalé de celui du logo du hero, et
   projette une ombre teintée qui l'ancre sur le panneau. */
.vc-support-gem {
    animation-duration: 5.6s;
    animation-delay: -1.3s;
    filter: drop-shadow(0 18px 22px rgb(43 22 38 / 28%));
}

@media (max-width: 767.98px) {
    .vc-support {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px 24px;
        text-align: center;
        justify-items: center;
    }

    .vc-support-body {
        align-items: center;
    }

    .vc-support-actions {
        justify-content: center;
    }
}

/* --- Bande de chiffres --------------------------------------------------- */

.vc-figures-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.vc-figure {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vc-figure .vc-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    font-size: 24px;
}

.vc-figure-value {
    font-family: var(--vc-font-display);
    font-size: 40px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1;
}

.vc-figure-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--vc-green-pale);
}

/* --- « Comment nous rejoindre » ----------------------------------------- */

.vc-join-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.vc-join-lead {
    font-size: 18px;
    line-height: 1.66;
    color: #4A3218;
    max-width: 460px;
    margin-bottom: 0;
}

.vc-join-note {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #4A3218;
}

.vc-join-note::before {
    content: "";
    width: 10px;
    height: 10px;
    background-color: var(--vc-text);
    border-radius: 2px;
    flex-shrink: 0;
}

.vc-join-card {
    background-color: var(--vc-bg);
    border-radius: var(--vc-radius-lg);
    padding: 28px;
    box-shadow: 0 26px 60px -30px rgb(74 50 24 / 70%);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vc-join-field-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vc-text-muted);
}

.vc-join-field {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--vc-surface-warm);
    border: 2px solid #EFE2CB;
    border-radius: 14px;
    padding: 12px 12px 12px 16px;
}

.vc-join-field-value {
    flex: 1;
    font-family: var(--vc-font-mono);
    font-size: 19px;
    color: var(--vc-text);
    word-break: break-all;
}

.vc-join-hint {
    font-size: 13px;
    color: var(--vc-text-muted);
}

.vc-join-footer {
    border-top: 1px solid #EFE2CB;
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* --- Bande Discord ------------------------------------------------------- */

.vc-discord-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.vc-discord-title {
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    margin-bottom: 6px;
}

.vc-discord-lead {
    font-size: 17px;
    color: var(--vc-violet-soft);
    max-width: 560px;
    margin-bottom: 0;
}

/* --- Actualités ---------------------------------------------------------- */

.vc-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.vc-news-card {
    border: 2px solid var(--vc-border);
    border-radius: var(--vc-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: var(--vc-surface);
    transition: transform var(--vc-transition), box-shadow var(--vc-transition);
}

.vc-news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--vc-shadow-lifted);
}

.vc-news-thumb {
    height: 150px;
    border-bottom: 2px solid var(--vc-border);
    background-color: var(--vc-surface-warm);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vc-green-dark);
    font-size: 34px;
}

.vc-news-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vc-news-date {
    font-family: var(--vc-font-mono);
    font-size: 12px;
    color: var(--vc-text-muted);
}

.vc-news-card h3 {
    font-size: 24px;
    margin-bottom: 0;
    color: var(--vc-text);
}

.vc-news-card h3 a {
    color: var(--vc-text);
}

.vc-news-card h3 a:hover {
    color: var(--vc-violet);
}

/* La couleur est explicite : posée sur une bande violette, la carte hérite
   sinon du blanc de la bande et le texte disparaît sur le fond blanc. */
.vc-news-card p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--vc-text-body);
    margin-bottom: 0;
}

/* --- FAQ ----------------------------------------------------------------- */

.vc-faq-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 56px;
    align-items: start;
}

.vc-faq-item {
    border: 2px solid var(--vc-border);
    border-radius: 18px;
    background-color: var(--vc-surface);
    overflow: hidden;
}

.vc-faq-head {
    width: 100%;
    background-color: var(--vc-surface);
    border: 0;
    cursor: pointer;
    padding: 20px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
    font-family: var(--vc-font-display);
    font-size: 21px;
    font-weight: 700;
    color: var(--vc-text);
    transition: background-color var(--vc-transition);
}

.vc-faq-item.is-open .vc-faq-head {
    background-color: var(--vc-surface-warm);
}

.vc-faq-sign {
    font-family: var(--vc-font-display);
    font-size: 26px;
    font-weight: 800;
    color: #B0A2AD;
    line-height: 1;
    flex-shrink: 0;
    transition: color var(--vc-transition), transform var(--vc-transition);
}

.vc-faq-item.is-open .vc-faq-sign {
    color: var(--vc-violet);
    transform: rotate(180deg);
}

.vc-faq-body {
    display: none;
    padding: 0 22px 22px;
}

.vc-faq-item.is-open .vc-faq-body {
    display: block;
}

.vc-faq-body p {
    font-size: 16px;
    line-height: 1.66;
    margin-bottom: 0;
}

/* --- Adaptation aux petits écrans ---------------------------------------- */

@media (max-width: 991.98px) {
    .vc-about-grid,
    .vc-join-grid,
    .vc-vote-grid,
    .vc-faq-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .vc-figures-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vc-news-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .vc-figures-grid {
        grid-template-columns: 1fr;
    }

    .vc-about-row {
        grid-template-columns: 64px 1fr;
        gap: 16px;
    }

    .vc-about-row .vc-icon {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }

    .vc-hero-ip {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
        text-align: left;
    }

    .vc-hero-ip-value {
        font-size: 18px;
        word-break: break-all;
    }

    .vc-ground span {
        height: 20px;
    }
}
