/* ================================================================
   PHYNARIA THEME v3 — Variante « Cartoon »
   Chargée par-dessus style.css et pages.css quand le réglage
   « Style » du thème vaut « cartoon ». Ne modifie aucune vue.
   ================================================================ */

:root {
    /* Fond nuit indigo, surfaces plus chaudes */
    --bg:            #13142a;
    --bg-2:          #181a35;
    --surface:       #1f2244;
    --surface-solid: #1f2244;
    --surface-2:     #282b55;
    --surface-3:     #313566;
    --border:        rgba(255, 255, 255, .1);
    --border-strong: rgba(255, 255, 255, .18);

    --white:         #fbf8ff;
    --muted:         #b9b8d8;
    --faint:         #8584ad;

    /* Couleurs franches */
    --brand:         #ffa62b;
    --minecraft:     #6fdc5c;
    --dauntless:     #4fd2ff;
    --pink:          #ff7ccf;
    --blue:          #8b9bff;
    --danger:        #ff5d73;
    --orange-light:  #ffc46b;

    /* Encre des contours et ombres « autocollant » */
    --ink:           #0a0b1d;
    --pop:           0 6px 0 var(--ink);
    --pop-sm:        0 4px 0 var(--ink);
    --pop-lg:        0 10px 0 var(--ink);

    --font:          'Nunito', system-ui, sans-serif;
    --font-title:    'Fredoka', 'Nunito', sans-serif;
    --font-mono:     'Nunito', system-ui, sans-serif;

    --radius:        22px;
    --radius-sm:     14px;
    --ease-spring:   cubic-bezier(.34, 1.56, .64, 1);
}

body {
    font-size: 16px;
    font-weight: 600;
    background:
        radial-gradient(rgba(255, 255, 255, .06) 1.5px, transparent 1.6px) 0 0 / 26px 26px,
        radial-gradient(900px 500px at 15% -10%, rgba(255, 166, 43, .14), transparent 60%),
        radial-gradient(900px 500px at 90% 10%, rgba(79, 210, 255, .12), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-title);
    font-weight: 700;
    letter-spacing: -.01em;
}

/* Mono → étiquettes arrondies et grasses */
.ph-kicker, .ph-world-tag, .ph-crumbs, .ph-stat-label, .ph-world-stat-label,
.ph-sidenav-title, .ph-footer .footer-col-title, .ph-donor-label {
    font-family: var(--font-title);
    font-weight: 600;
    letter-spacing: .04em;
}

/* ── Animations communes ────────────────────────────────────── */
@keyframes wiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-12deg) scale(1.1); }
    50% { transform: rotate(10deg) scale(1.1); }
    75% { transform: rotate(-6deg); }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(.9); } 70% { transform: scale(1.03); } 100% { opacity: 1; transform: none; } }

.js [data-reveal] { transition-timing-function: var(--ease-spring); }
.js [data-reveal]:not(.is-in) { transform: translateY(18px) scale(.97); }

/* ── Navbar ─────────────────────────────────────────────────── */
.ph-header { background: rgba(19, 20, 42, .85); }
.ph-header.is-scrolled { background: rgba(19, 20, 42, .95); border-bottom: 2px solid var(--ink); box-shadow: 0 4px 0 rgba(10, 11, 29, .5); }
.ph-navbar .navbar-brand img { height: 38px; transition: transform .5s var(--ease-spring); }
.ph-navbar .navbar-brand:hover img { transform: rotate(-10deg) scale(1.1); }
.ph-navbar .navbar-brand span { font-family: var(--font-title); font-size: 1.15rem; }
.ph-navbar .nav-link { font-weight: 700; border-radius: 12px; }
.ph-navbar .nav-link:hover { background: var(--surface); }
.ph-navbar .nav-link.active { background: var(--surface-2); }
.ph-navbar .nav-link.active::after { display: none; }
.ph-user-chip { border: 2px solid var(--ink) !important; background: var(--surface); box-shadow: var(--pop-sm); }
.ph-user-chip img { border-radius: 8px; }
.dropdown-menu { --bs-dropdown-bg: var(--surface); border: 2px solid var(--ink); box-shadow: var(--pop); border-radius: 18px; }
.dropdown-item { border-radius: 10px; font-weight: 700; }

/* ── Boutons (effet 3D) ─────────────────────────────────────── */
.btn-ph, .btn-primary,
.btn-ph-ghost, .btn-secondary, .btn-outline-primary, .btn-outline-secondary,
.btn-ph-green, .btn-success, .btn-minecraft, .btn-ember, .btn-dauntless,
.btn-danger, .btn-outline-danger {
    font-family: var(--font-title);
    font-weight: 600;
    letter-spacing: .01em;
    border-radius: 14px;
    border: 2px solid var(--ink) !important;
    box-shadow: var(--pop-sm);
    transition: transform .15s var(--ease-spring), box-shadow .15s, background .2s, filter .2s;
}
.btn-ph:hover, .btn-primary:hover, .btn-ph-ghost:hover, .btn-secondary:hover,
.btn-ph-green:hover, .btn-success:hover, .btn-minecraft:hover, .btn-ember:hover, .btn-dauntless:hover,
.btn-danger:hover, .btn-outline-danger:hover, .btn-outline-primary:hover, .btn-outline-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--ink);
    filter: brightness(1.06);
}
.btn-ph:active, .btn-primary:active, .btn-ph-ghost:active, .btn-secondary:active,
.btn-ph-green:active, .btn-minecraft:active, .btn-dauntless:active, .btn-ember:active, .btn-danger:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 var(--ink);
}
.btn-ph, .btn-primary { background: var(--brand) !important; color: #2a1500 !important; }
.btn-ph-ghost, .btn-secondary, .btn-outline-primary, .btn-outline-secondary { background: var(--surface-2) !important; color: var(--white) !important; }
.btn-ph-ghost:hover, .btn-secondary:hover, .btn-outline-primary:hover, .btn-outline-secondary:hover { background: var(--surface-3) !important; border-color: var(--ink) !important; }
.btn-ph-green, .btn-success, .btn-minecraft { background: var(--minecraft) !important; color: #0c2a06 !important; }
.btn-ember, .btn-dauntless { background: var(--dauntless) !important; color: #032532 !important; }
.btn-danger, .btn-outline-danger { background: var(--danger) !important; color: #fff !important; }
.btn-ph i, .btn i { transition: transform .35s var(--ease-spring); }
.btn-ph:hover i, .btn:hover i { transform: scale(1.15) rotate(-8deg); }

/* ── Cartes & panneaux ──────────────────────────────────────── */
.card, .ph-card, .ph-widget, .ph-panel, .ph-tile, .ph-news-card, .ph-product,
.ph-gateway, .ph-result, .ph-comment, .ph-world, .ph-discord, .ph-live-row,
.ph-auth-shell, .ph-subnav, .ph-donor, .ph-empty {
    border: 2px solid var(--ink);
    box-shadow: var(--pop), inset 0 2px 0 rgba(255, 255, 255, .06);
}
.ph-empty { border-style: dashed; border-color: var(--border-strong); box-shadow: none; background: rgba(31, 34, 68, .5); }

.ph-tile, .ph-news-card, .ph-product, .ph-gateway, .ph-world, .ph-result, a.ph-live-row {
    transition: transform .35s var(--ease-spring), box-shadow .25s, border-color .2s, background .2s;
}
.ph-tile:hover, .ph-news-card:hover, .ph-product:hover, .ph-gateway:hover, .ph-result:hover {
    transform: translateY(-6px) rotate(-.6deg);
    box-shadow: var(--pop-lg), inset 0 2px 0 rgba(255, 255, 255, .06);
    border-color: var(--ink);
}
.ph-tile:nth-child(even):hover, .ph-news-card:nth-child(even):hover, .ph-product:nth-child(even):hover { transform: translateY(-6px) rotate(.6deg); }

/* Icônes en pastilles qui gigotent au survol */
.ph-tile-icon, .ph-panel-icon, .ph-page-icon, .ph-live-icon, .ph-auth-form-icon, .ph-discord-logo {
    border: 2px solid var(--ink) !important;
    box-shadow: var(--pop-sm);
    border-radius: 14px;
}
.ph-tile-icon { width: 48px; height: 48px; font-size: 1.3rem; background: color-mix(in srgb, var(--accent) 22%, var(--surface-2)); }
.ph-tile:hover .ph-tile-icon, .ph-panel:hover .ph-panel-icon, .ph-live-row:hover .ph-live-icon { animation: wiggle .6s ease-in-out; }
.ph-tile-arrow { color: var(--muted); }
.ph-tile-title { font-family: var(--font-title); font-size: 1.15rem; }

.ph-page-icon { width: 54px; height: 54px; font-size: 1.4rem; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); animation: bob 4s ease-in-out infinite; }
.ph-panel-icon { background: color-mix(in srgb, var(--accent) 20%, var(--surface-2)); }

/* ── Puces & badges ─────────────────────────────────────────── */
.ph-chip { border-radius: 999px; font-weight: 800; padding: .25rem .7rem; border: 2px solid color-mix(in srgb, var(--accent) 45%, var(--ink)); }
.badge { border-radius: 999px; }
.ph-badge { border: 2px solid var(--ink); background: var(--surface); box-shadow: var(--pop-sm); font-weight: 700; }

/* ── Formulaires ────────────────────────────────────────────── */
.form-control, .form-select { border: 2px solid var(--ink); background-color: var(--bg-2); border-radius: 14px; font-weight: 600; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .25); }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: inset 0 3px 0 rgba(0, 0, 0, .25), 0 0 0 4px rgba(255, 166, 43, .25); }
.form-label { font-weight: 700; color: var(--white); }
.form-check-input { border: 2px solid var(--ink); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--ink); }
.ph-search, .ph-ip, .ph-qty { border: 2px solid var(--ink); border-radius: 14px; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .25); }
.ph-ip-btn { border-radius: 9px; background: var(--surface-3); font-weight: 700; }
.ph-drop { border: 3px dashed var(--border-strong); border-radius: 18px; }
.ph-drop:hover i { animation: bob 1s ease-in-out infinite; }

/* ── Accueil ────────────────────────────────────────────────── */
.ph-home-hero { border-bottom: 2px solid var(--ink); }
.ph-home-hero::before { display: none; }
.ph-home-hero-bg { opacity: .22; filter: saturate(1.2); }
.ph-home-title {
    font-family: var(--font-title);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.05;
    text-shadow: 0 5px 0 var(--ink);
}
/* Soulignement « coup de feutre » sous le titre */
.ph-home-title::after {
    content: '';
    display: block;
    width: min(320px, 70%);
    height: 14px;
    margin-top: .9rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9 C 60 2, 110 13, 160 7 S 260 2, 317 8' fill='none' stroke='%23ffa62b' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.ph-home-sub { font-size: 1.12rem; }

.ph-live-row { background: var(--surface); border-radius: 18px; }
.ph-live-icon { background: color-mix(in srgb, var(--accent) 25%, var(--surface-2)) !important; }
.ph-live-count { font-family: var(--font-title); }
.ph-online-dot { width: 9px; height: 9px; box-shadow: 0 0 0 2px var(--ink); }

/* Cartes univers façon « sticker » */
.ph-world { border-radius: 26px; }
.ph-world:hover { transform: translateY(-6px) rotate(-.5deg); border-color: var(--ink); box-shadow: var(--pop-lg); }
.ph-world.dauntless:hover { transform: translateY(-6px) rotate(.5deg); }
.ph-world-media { border-bottom: 2px solid var(--ink); }
.ph-world-media::after { background: linear-gradient(180deg, transparent 50%, rgba(31, 34, 68, .7)); }
.ph-world-media .ph-world-glyph { color: var(--accent); font-size: 2.8rem; filter: drop-shadow(0 4px 0 var(--ink)); animation: bob 3.5s ease-in-out infinite; }
.ph-world-tag {
    padding: .3rem .8rem;
    border-radius: 10px;
    border: 2px solid var(--ink);
    background: var(--accent);
    color: var(--ink);
    box-shadow: var(--pop-sm);
    transform: rotate(-3deg);
}
.ph-world-name { font-family: var(--font-title); font-size: 1.45rem; }
.ph-world-stats { border-top: 2px dashed var(--border-strong); }
.ph-world-stat-value, .ph-server-count { font-family: var(--font-title); }
.ph-world.minecraft .ph-world-media.is-pattern {
    /* Petits blocs verts en ton sur ton */
    background:
        repeating-conic-gradient(rgba(111, 220, 92, .09) 0 25%, transparent 0 50%) 0 0 / 22px 22px,
        radial-gradient(circle at 82% 120%, rgba(111, 220, 92, .32), transparent 60%),
        #1b2b33;
}
.ph-world.dauntless .ph-world-media.is-pattern {
    background:
        radial-gradient(circle at 78% 115%, rgba(79, 210, 255, .55), transparent 55%),
        repeating-radial-gradient(circle at 78% 115%, transparent 0 22px, rgba(79, 210, 255, .18) 22px 25px),
        #1a3150;
}

.ph-discord { border-radius: 26px; }
.ph-discord-intro { border-right: 2px solid var(--ink); }
.ph-discord-logo { width: 54px; height: 54px; font-size: 1.6rem; animation: bob 3s ease-in-out infinite; }
.ph-discord-widget { background: var(--bg-2); }
.ph-discord-avatar img { box-shadow: 0 0 0 2px var(--ink); }

/* ── Sections & en-têtes de page ────────────────────────────── */
.ph-section-title, .ph-page-title { font-family: var(--font-title); font-weight: 700; letter-spacing: -.015em; text-shadow: 0 4px 0 var(--ink); }
.ph-page-hero { border-bottom: 2px solid var(--ink); }
.ph-page-hero::before { opacity: .6; }
.ph-kicker { color: var(--brand); }

/* ── Actualités ─────────────────────────────────────────────── */
.ph-news-img-wrap { border-bottom: 2px solid var(--ink); }
.ph-news-title { font-family: var(--font-title); font-size: 1.15rem; }
.ph-news-footer { border-top: 2px dashed var(--border); }

/* ── Boutique, vote, wiki, profil… ──────────────────────────── */
.ph-subnav { border-radius: 18px; }
.ph-subnav-link { font-weight: 700; border-radius: 12px; }
.ph-subnav-link.active { background: var(--brand); color: #2a1500; box-shadow: 0 3px 0 var(--ink); }
.ph-balance { border: 2px solid var(--ink); border-radius: 12px; font-weight: 800; }
.ph-cart-count { border-radius: 999px; background: var(--danger); color: #fff; }
.ph-product-media { border-bottom: 2px solid var(--ink); background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, .08), transparent 60%), var(--bg-2); }
.ph-product-cta { border: 2px solid var(--ink); background: var(--brand); color: #2a1500; box-shadow: 0 3px 0 var(--ink); }
.ph-product:hover .ph-product-cta { background: var(--brand); color: #2a1500; animation: wiggle .5s ease-in-out; }
.ph-price, .ph-pkg-price, .ph-offer-amount { font-family: var(--font-title); }
.ph-goal-bar, .ph-progress { height: 12px; border: 2px solid var(--ink); background: var(--bg-2); }
.ph-goal-bar > span, .ph-goal-bar > .progress-bar, .ph-progress-bar {
    background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .25) 0 8px, transparent 8px 16px);
    background-color: var(--accent, var(--brand));
}
.ph-goal-bar > span, .ph-goal-bar > .progress-bar { background-color: var(--brand); }

.ph-cart-item, .ph-vote-site, .ph-os, .ph-reward, .ph-stat { border: 2px solid var(--ink); border-radius: 16px; box-shadow: var(--pop-sm); }
.ph-vote-site:hover, .ph-os:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); border-color: var(--ink); }
.ph-vote-site, .ph-os { transition: transform .25s var(--ease-spring), box-shadow .2s, background .2s; }
.ph-vote-site-num, .ph-step-num, .ph-step-item > span { border: 2px solid var(--ink); font-family: var(--font-title); font-weight: 700; }
.ph-podium-block { border: 2px solid var(--ink); border-bottom: 0; font-family: var(--font-title); font-weight: 700; }
.ph-podium-place.first .ph-podium-block { background: #ffcd3c; color: var(--ink); }
.ph-podium-place.second .ph-podium-block { background: #c9d2e3; color: var(--ink); }
.ph-podium-place.third .ph-podium-block { background: #e0975a; color: var(--ink); }

.ph-sidenav a { font-weight: 700; border-radius: 12px; }
.ph-sidenav a.active { background: var(--brand); color: #2a1500; }
.ph-profile-banner { border-bottom: 2px solid var(--ink); }
.ph-profile-avatar { border: 3px solid var(--ink); box-shadow: var(--pop); }
.ph-auth-visual { border-right: 2px solid var(--ink); }
.ph-auth-title { font-family: var(--font-title); text-shadow: 0 3px 0 var(--ink); }

/* ── Modales, alertes ───────────────────────────────────────── */
.modal-content { border: 2px solid var(--ink) !important; box-shadow: var(--pop-lg); border-radius: 24px; }
.modal.show .modal-dialog { animation: pop-in .4s var(--ease-spring); }
.alert { border-width: 2px; border-radius: 16px; font-weight: 700; }

/* ── Pied de page ───────────────────────────────────────────── */
.ph-footer { border-top: 2px solid var(--ink); background: var(--bg-2); }
.ph-footer .footer-social a { border: 2px solid var(--ink); border-radius: 12px; background: var(--surface); box-shadow: 0 3px 0 var(--ink); transition: transform .25s var(--ease-spring); }
.ph-footer .footer-social a:hover { transform: translateY(-3px) rotate(-8deg); }
.ph-to-top { border: 2px solid var(--ink); border-radius: 14px; background: var(--brand); color: #2a1500; box-shadow: var(--pop-sm); }
.ph-to-top:hover { color: #2a1500; }

/* ── Erreurs ────────────────────────────────────────────────── */
.ph-error-code { font-family: var(--font-title); font-weight: 700; color: var(--brand); text-shadow: 0 8px 0 var(--ink); animation: bob 3s ease-in-out infinite; }

@media (max-width: 991.98px) {
    .ph-discord-intro { border-right: 0; border-bottom: 2px solid var(--ink); }
    .ph-auth-visual { border-right: 0; border-bottom: 2px solid var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
    .ph-page-icon, .ph-world-glyph, .ph-discord-logo, .ph-error-code { animation: none !important; }
}

/* ── Onglets du profil ──────────────────────────────────────── */
.ph-tabs { border: 2px solid var(--ink); border-radius: 18px; box-shadow: var(--pop); }
.ph-tab { font-family: var(--font-title); font-weight: 600; border-radius: 12px; }
.ph-tab.active { background: var(--accent); color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.ph-tab.active i { color: var(--ink); }
.ph-tab:not(.active):hover i { animation: wiggle .5s ease-in-out; }
