/* ============================================
   MyDragonEggs - Nordic / Skyrim-Inspired Styles
   (Login + Hatch pages only; game uses Phaser)
   ============================================ */

/* Variables are defined in colors.css - legacy aliases below */
:root {
    --stone: #6B6B6B;
    --parchment: #D2B48C;
    --danger: var(--btn-danger-hover);
    --steel: #6B7B8B;

    /* Legacy element aliases (used by .element-border-* classes) */
    --fire: var(--elem-fire);
    --fire-light: var(--elem-fire);
    --water: var(--blue);
    --water-light: var(--blue);
    --earth: var(--elem-earth);
    --earth-light: #BBAA55;
    --lightning: var(--elem-lightning);
    --lightning-light: #FFFF66;
    --wind: var(--elem-wind);
    --wind-light: var(--elem-wind);

    --green: var(--success);
    --red: var(--error);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* --- Custom Cursor --- */
/* Default : flèche bleu nuit DA, contour doré, reflet or discret */
body, body * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 2L10.5 20L12.5 12.5L20 10Z' fill='%2316213e' stroke='%23C8A84E' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M4 3L8 13' stroke='%23ffd98a' stroke-width='0.8' stroke-opacity='0.55' stroke-linecap='round'/%3E%3C/svg%3E") 3 2, auto;
}
/* Pointer : même flèche, contour doré un ton au-dessus - feedback subtil */
button, a, [role="button"], .sidebar-item, .btn, .pvp-card, .adv-zone-card, .adv-diff-card, canvas, [data-tooltip], [onclick], [style*="cursor: pointer"], .profile-slot, .comp-slot, .equip-slot {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 2L10.5 20L12.5 12.5L20 10Z' fill='%231a1a3e' stroke='%23C8A84E' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'/%3E%3Cpath d='M4 3L8 13' stroke='%23ffd98a' stroke-width='1' stroke-opacity='0.75' stroke-linecap='round'/%3E%3C/svg%3E") 3 2, pointer !important;
}

body {
    font-family: 'Roboto Condensed', Arial, sans-serif;
    font-size: max(0.75rem, 12px);
    background: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    user-select: none;
    -webkit-user-select: none;
}

a { color: var(--gold); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; border: 2px solid var(--bg-body); }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ============================================
   BOUTONS - Nordic wood style with beveled edges
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(180deg, var(--btn-hatch-start), var(--btn-hatch-end));
    border: 2px solid var(--gold);
    color: var(--text-main);
    font-family: 'Oswald', 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px,
                        100% calc(100% - 6px), calc(100% - 6px) 100%,
                        6px 100%, 0 calc(100% - 6px), 0 6px);
}
.btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.15); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-google {
    background: linear-gradient(180deg, var(--gold-border), var(--hover-bg));
    border: 1px solid var(--gold);
    color: var(--white);
    text-shadow: -1px -1px 0 var(--black), 1px -1px 0 var(--black), -1px 1px 0 var(--black), 1px 1px 0 var(--black), 0 0 4px rgba(var(--black-rgb),0.9);
    width: 100%;
    position: relative;
}
.btn-google:hover:not(:disabled) { filter: brightness(1.25); transform: translateY(-1px); }
.btn-google .btn-icon { background: rgba(var(--gold-rgb),0.25); color: var(--gold); border: 1px solid rgba(var(--gold-rgb),0.5); text-shadow: none; }
.btn-discord { background: linear-gradient(180deg, var(--btn-discord-start), var(--btn-discord-end)); width: 100%; position: relative; }
.btn-hatch { background: linear-gradient(180deg, var(--btn-hatch-start), var(--btn-hatch-end)); width: 100%; font-size: 16px; }
.btn-small { padding: 6px 14px; font-size: 13px; }
.btn-logout { background: linear-gradient(180deg, var(--btn-logout-start), var(--btn-logout-end)); }

.badge-soon {
    position: absolute;
    right: 12px;
    background: rgba(var(--black-rgb),0.4);
    padding: 2px 8px;
    font-size: 11px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.5px;
}

.btn-icon {
    width: 24px;
    height: 24px;
    background: rgba(var(--white-rgb),0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* Icons */
.icon-logo { width: 64px; height: 64px; }
.icon-elem { width: 32px; height: 32px; }
.icon-element { width: 40px; height: 40px; }
.icon-inline { width: 20px; height: 20px; vertical-align: middle; }
.icon-stat { width: 28px; height: 28px; }
.icon-btn { width: 24px; height: 24px; vertical-align: middle; }
.icon-btn-sm { width: 20px; height: 20px; vertical-align: middle; }

/* ============================================
   PAGE LOGIN
   ----------------------------------------------
   DA alignee sur maintenance.php : background
   radial sombre or/violet, card semi-translucide
   avec corners dores, halo egg subtil, titre
   Cinzel sobre (plus de MedievalSharp 46px ni de
   gradient text-fill). Toutes les couleurs sont
   issues de colors.css (var(--gold-rgb), etc.).
   ============================================ */
.login-page {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 30%, rgba(var(--gold-rgb), 0.10) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(var(--login-accent2-rgb), 0.08) 0%, transparent 45%),
        radial-gradient(ellipse at center, var(--bg-panel) 0%, var(--bg-body) 70%, #07060c 100%);
}

/* Fond avec particules / braises + carte fantasy en filigrane */
.login-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* === Slideshow des vraies maps du jeu (6 zones, crossfade lent) ===
   Cycle 48s : chaque slide visible ~6s + 2s crossfade. Les 6 slides
   tournent en boucle. Vignette dore par-dessus pour assurer la lisibilite
   de la card. Saturation/luminosite reduites + leger blur pour un rendu
   "carte ancienne" qui ne competitionne pas avec la card centrale. */
.login-slideshow {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.login-slideshow .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: loginSlideshowCycle 48s linear infinite;
    filter: blur(2px) saturate(0.85) brightness(0.55);
    transform: scale(1.04); /* leger over-zoom pour le ken-burns */
}
.login-slideshow .slide:nth-child(1) { animation-delay:  0s; }
.login-slideshow .slide:nth-child(2) { animation-delay:  8s; }
.login-slideshow .slide:nth-child(3) { animation-delay: 16s; }
.login-slideshow .slide:nth-child(4) { animation-delay: 24s; }
.login-slideshow .slide:nth-child(5) { animation-delay: 32s; }
.login-slideshow .slide:nth-child(6) { animation-delay: 40s; }

/* Cycle 48s avec 6 slides × 8s : chaque slide cross-fade 2s,
   visible 6s, puis cache. Le ken-burns scale 1.04 -> 1.10 sur la
   duree visible donne un effet cinematique. */
@keyframes loginSlideshowCycle {
    0%   { opacity: 0; transform: scale(1.04); }
    4%   { opacity: 1; }
    16%  { opacity: 1; transform: scale(1.10); }
    20%  { opacity: 0; transform: scale(1.10); }
    100% { opacity: 0; transform: scale(1.04); }
}

/* Vignette doree + obscurcissement bords pour focus sur la card */
.login-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, transparent 0%, transparent 30%, rgba(var(--bg-body-rgb), 0.55) 65%, rgba(var(--bg-body-rgb), 0.92) 100%),
        radial-gradient(ellipse at 50% 0%, rgba(var(--gold-rgb), 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(var(--rarity-alpha-rgb), 0.06) 0%, transparent 55%);
}
.login-embers { position: absolute; inset: 0; }
.login-embers span {
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 6px var(--gold);
    animation: loginEmberRise linear infinite;
}
.login-embers span:nth-child(1) { left: 8%;  animation-duration: 11s; animation-delay: 0s;   }
.login-embers span:nth-child(2) { left: 22%; animation-duration: 14s; animation-delay: 2s;   }
.login-embers span:nth-child(3) { left: 38%; animation-duration: 9s;  animation-delay: 4s;   width: 3px; height: 3px; }
.login-embers span:nth-child(4) { left: 52%; animation-duration: 13s; animation-delay: 1s;   }
.login-embers span:nth-child(5) { left: 66%; animation-duration: 10s; animation-delay: 3s;   width: 5px; height: 5px; }
.login-embers span:nth-child(6) { left: 78%; animation-duration: 15s; animation-delay: 5s;   }
.login-embers span:nth-child(7) { left: 90%; animation-duration: 12s; animation-delay: 2.5s; width: 3px; height: 3px; }
.login-embers span:nth-child(8) { left: 15%; animation-duration: 11s; animation-delay: 7s;   }

@keyframes loginEmberRise {
    0%   { transform: translateY(0) scale(1);    opacity: 0; }
    10%  { opacity: 0.8; }
    100% { transform: translateY(-110vh) scale(0.4); opacity: 0; }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    padding: 24px;
}

/* Carte login : sobre, semi-translucide, double cadre dore + glow anime.
   - .login-card     : cadre exterieur + bg degrade radial + halo pulse
   - .login-card::before : cadre interieur fin (filet de bordure noble)
   - .login-card::after  : highlight haut/bas (effet "metal poli") */
.login-card {
    position: relative;
    padding: 60px 56px 48px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(var(--gold-rgb), 0.08) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 100%, rgba(var(--rarity-alpha-rgb), 0.05) 0%, transparent 55%),
        rgba(var(--bg-body-rgb), 0.88);
    border: 1px solid rgba(var(--gold-rgb), 0.6);
    border-radius: 8px;
    box-shadow:
        0 0 28px rgba(var(--gold-rgb), 0.18),
        0 20px 60px rgba(var(--black-rgb), 0.55),
        inset 0 0 48px rgba(var(--black-rgb), 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    text-align: center;
    animation: loginCardIn 0.7s ease-out both, loginCardGlow 5s ease-in-out 0.7s infinite;
}

/* Cadre interieur dore fin (filet a 10px du bord) */
.login-card::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(var(--gold-rgb), 0.18);
    border-radius: 4px;
    pointer-events: none;
}

/* Highlight haut/bas (sheen metal poli) */
.login-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(var(--gold-rgb), 0.12) 0%, transparent 6%),
        linear-gradient(0deg, rgba(var(--gold-rgb), 0.07) 0%, transparent 8%);
}

@keyframes loginCardIn {
    0%   { opacity: 0; transform: translateY(14px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes loginCardGlow {
    0%, 100% { box-shadow:
        0 0 24px rgba(var(--gold-rgb), 0.14),
        0 20px 60px rgba(var(--black-rgb), 0.55),
        inset 0 0 48px rgba(var(--black-rgb), 0.45); }
    50%      { box-shadow:
        0 0 38px rgba(var(--gold-rgb), 0.26),
        0 20px 60px rgba(var(--black-rgb), 0.55),
        inset 0 0 48px rgba(var(--black-rgb), 0.45); }
}

/* Coins decoratifs dores */
.card-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid var(--gold);
    pointer-events: none;
}
.card-corner-tl { top: -2px;    left: -2px;  border-right: none; border-bottom: none; }
.card-corner-tr { top: -2px;    right: -2px; border-left: none;  border-bottom: none; }
.card-corner-bl { bottom: -2px; left: -2px;  border-right: none; border-top: none; }
.card-corner-br { bottom: -2px; right: -2px; border-left: none;  border-top: none; }

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo .egg-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 104px;
    margin-bottom: 14px;
}
.login-logo .egg-icon .icon-logo {
    width: 80px;
    height: 80px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(var(--gold-rgb), 0.65));
}
.egg-halo {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--gold-rgb), 0.4) 0%, rgba(var(--gold-rgb), 0.12) 45%, transparent 70%);
    animation: loginHaloPulse 3.5s ease-in-out infinite;
    z-index: 0;
}

@keyframes loginHaloPulse {
    0%, 100% { transform: scale(1);    opacity: 0.4; }
    50%      { transform: scale(1.08); opacity: 0.7; }
}

.login-logo h1 {
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 700;
    font-size: 42px;
    letter-spacing: 0.08em;
    line-height: 1.15;
    color: var(--gold);
    margin: 0;
    text-shadow:
        0 0 22px rgba(var(--gold-rgb), 0.45),
        0 1px 0 rgba(var(--black-rgb), 0.6);
    position: relative;
}

.title-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 14px auto 12px;
    max-width: 220px;
}
.title-divider .divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(var(--gold-rgb), 0.6) 50%, transparent 100%);
}
.title-divider .divider-diamond {
    color: var(--gold);
    font-size: 11px;
    opacity: 0.85;
}

.login-logo .subtitle {
    color: var(--text-secondary);
    margin-top: 4px;
    font-family: 'Cinzel', 'Roboto Condensed', Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    opacity: 0.85;
}

.login-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

.login-dev-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed rgba(var(--gold-rgb), 0.25);
}
.login-dev-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-secondary);
    opacity: 0.7;
}
.login-dev-form input[type="text"],
.login-dev-form input[type="password"] {
    padding: 10px 12px;
    background: rgba(var(--black-rgb), 0.55);
    border: 1px solid rgba(var(--gold-rgb), 0.3);
    border-radius: 4px;
    color: var(--text-main);
    font-family: 'Roboto Condensed', inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.login-dev-form input[type="text"]:focus,
.login-dev-form input[type="password"]:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px rgba(var(--gold-rgb), 0.35);
}
.login-dev-form .btn-dev {
    margin-top: 4px;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(var(--gold-rgb), 0.18), rgba(var(--black-rgb), 0.65));
    color: var(--gold);
    border: 1px solid rgba(var(--gold-rgb), 0.55);
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.login-dev-form .btn-dev:hover {
    background: linear-gradient(180deg, rgba(var(--gold-rgb), 0.28), rgba(var(--black-rgb), 0.55));
    border-color: var(--gold);
    color: var(--gold-light);
}

/* Sigil ornemental : remplace l'ancien elements-preview en pied de card.
   3 elements : ligne degradee or | symbole ✦ | ligne degradee or. */
.login-sigil {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 26px auto 0;
    max-width: 220px;
    opacity: 0.85;
}
.login-sigil .sigil-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(var(--gold-rgb), 0.55) 50%, transparent 100%);
}
.login-sigil .sigil-mark {
    color: var(--gold);
    font-size: 13px;
    text-shadow: 0 0 10px rgba(var(--gold-rgb), 0.55);
    animation: loginSigilPulse 4s ease-in-out infinite;
}
@keyframes loginSigilPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.12); }
}

.login-footer { text-align: center; margin-top: 36px; }
.login-footer p {
    color: var(--text-secondary);
    font-size: 12px;
    font-family: 'Cinzel', serif;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
    opacity: 0.8;
}

.elements-preview { display: flex; justify-content: center; gap: 18px; font-size: 28px; }
.elements-preview .elem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(var(--black-rgb), 0.35);
    border: 1px solid rgba(var(--gold-rgb), 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: default;
}
.elements-preview .elem:hover { transform: translateY(-3px) scale(1.08); }
.elements-preview .icon-elem { width: 26px; height: 26px; transition: filter 0.25s; }
.elements-preview .elem:hover .icon-elem { filter: drop-shadow(0 0 6px currentColor); }

.elements-preview .elem-fire      { color: var(--elem-fire); }
.elements-preview .elem-water     { color: var(--blue); }
.elements-preview .elem-earth     { color: var(--elem-earth); }
.elements-preview .elem-lightning { color: var(--elem-lightning); }
.elements-preview .elem-wind      { color: var(--elem-wind); }

.elements-preview .elem-fire:hover      { border-color: var(--elem-fire);      box-shadow: 0 0 14px rgba(var(--elem-fire-rgb), 0.55); }
.elements-preview .elem-water:hover     { border-color: var(--blue);           box-shadow: 0 0 14px rgba(var(--blue-rgb), 0.55); }
.elements-preview .elem-earth:hover     { border-color: var(--elem-earth);     box-shadow: 0 0 14px rgba(var(--elem-earth-rgb), 0.55); }
.elements-preview .elem-lightning:hover { border-color: var(--elem-lightning); box-shadow: 0 0 14px rgba(var(--elem-lightning-rgb), 0.55); }
.elements-preview .elem-wind:hover      { border-color: var(--elem-wind);      box-shadow: 0 0 14px rgba(var(--elem-wind-rgb), 0.55); }

/* Legal footer - placé hors-carte, garde son style existant dans social.css mais recentré */
.login-container .login-legal-footer { position: relative; z-index: 1; }

/* =====================================================================
   RESPONSIVE - Page de login (index.php)
   ---------------------------------------------------------------------
   Mobile paysage (telephone tourne) : layout en 2 colonnes (logo a gauche,
   form a droite) pour tenir dans ~390px de hauteur.
   Mobile portrait : compression verticale. Tablette : ajustements legers.
   ===================================================================== */

/* === Tablette / petit desktop : reduit la card === */
@media (max-width: 900px) {
    .login-container { max-width: 480px; padding: 16px; }
    .login-card { padding: 32px 28px 28px; }
    .login-logo { margin-bottom: 24px; }
    .login-logo h1 { font-size: 38px; }
    .login-logo .egg-icon { width: 80px; height: 80px; margin-bottom: 10px; }
    .login-logo .egg-icon .icon-logo { width: 60px; height: 60px; }
    .login-footer { margin-top: 24px; }
}

/* === Telephone paysage (force par rotate-prompt) ===
   Cible : largeur 640-950px, hauteur < 500px. Layout 2 colonnes pour
   compacter verticalement. */
@media (max-width: 950px) and (orientation: landscape) and (max-height: 500px) {
    .login-page { min-height: 100vh; padding: 8px; }
    .login-container {
        max-width: 760px;
        padding: 8px;
    }
    .login-card {
        padding: 18px 22px 14px;
        display: grid;
        grid-template-columns: 1fr 1.2fr;
        gap: 18px;
        align-items: center;
    }
    /* Colonne 1 : logo + h1 + subtitle */
    .login-logo {
        margin-bottom: 0;
        text-align: center;
    }
    .login-logo .egg-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 4px;
    }
    .login-logo .egg-icon .icon-logo {
        width: 42px;
        height: 42px;
    }
    .login-logo h1 {
        font-size: 26px;
    }
    .title-divider {
        margin: 4px auto 4px;
        max-width: 180px;
    }
    .login-logo .subtitle {
        font-size: 10px;
        letter-spacing: 1px;
        margin-top: 2px;
    }
    /* Colonne 2 : buttons + dev-form regroupes */
    .login-buttons {
        margin-top: 0;
        gap: 6px;
    }
    .btn-google {
        font-size: 13px;
        padding: 8px 12px;
    }
    .login-dev-form {
        margin-top: 8px;
        padding-top: 8px;
        gap: 6px;
    }
    .login-dev-label {
        font-size: 9px;
        letter-spacing: 1px;
    }
    .login-dev-form input[type="text"],
    .login-dev-form input[type="password"] {
        padding: 7px 10px;
        font-size: 13px;
    }
    .login-dev-form .btn-dev {
        padding: 7px;
        font-size: 13px;
    }
    /* Footer (elements-preview) span tout en bas, sous les 2 colonnes */
    .login-footer {
        grid-column: 1 / -1;
        margin-top: 4px;
    }
    .elements-preview {
        gap: 10px;
    }
    .elements-preview .elem {
        width: 30px;
        height: 30px;
    }
    .elements-preview .icon-elem {
        width: 18px;
        height: 18px;
    }
    /* Cache le footer legal (manque de place, accessible via /legal/) */
    .login-legal-footer {
        font-size: 10px;
        margin-top: 6px;
    }
}

/* === Mobile portrait (cas tres compact) === */
@media (max-width: 480px) and (orientation: portrait) {
    .login-container { padding: 8px; }
    .login-card { padding: 20px 18px 18px; }
    .login-logo { margin-bottom: 16px; }
    .login-logo h1 { font-size: 32px; }
    .login-logo .egg-icon { width: 64px; height: 64px; }
    .login-logo .egg-icon .icon-logo { width: 48px; height: 48px; }
    .login-logo .subtitle { font-size: 11px; }
    .login-footer { margin-top: 16px; }
    .elements-preview { gap: 12px; }
    .elements-preview .elem { width: 36px; height: 36px; }
    .elements-preview .icon-elem { width: 22px; height: 22px; }
}

/* ============================================
   PAGE ECLOSION
   ============================================ */
.hatch-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(ellipse at top, rgba(var(--login-accent-rgb), 0.07) 0%, transparent 50%),
        radial-gradient(ellipse at center, var(--bg-panel) 0%, var(--bg-body) 70%);
}

.hatch-container { text-align: center; padding: 24px; }
.hatch-container h1 {
    font-size: 36px;
    color: var(--gold);
    font-family: 'MedievalSharp', Georgia, serif;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(var(--gold-rgb), 0.25);
}
.hatch-subtitle { color: var(--text-secondary); margin-bottom: 32px; }

.egg-wrapper { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.egg {
    font-size: 120px;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: transform 0.1s;
}
.egg:hover { transform: scale(1.05); }
.egg.shake { animation: shake 0.3s ease; }
.egg.hatching { animation: hatch 1s ease forwards; }

.egg-clicks { color: var(--text-secondary); font-size: 14px; font-family: 'Oswald', sans-serif; letter-spacing: 1px; }

.crack {
    position: absolute;
    width: 20px; height: 3px;
    background: var(--gold);
    border-radius: 2px;
    box-shadow: 0 0 6px var(--gold);
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

@keyframes hatch {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); filter: brightness(2); }
    100% { transform: scale(0); opacity: 0; }
}

.hatch-form { max-width: 350px; margin: 0 auto; }
.hatch-form label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-family: 'Roboto Condensed', sans-serif; }
.hatch-form form { display: flex; flex-direction: column; gap: 12px; }

.reveal-dragon { text-align: center; margin-bottom: 24px; animation: fadeIn 0.5s ease; }
.reveal-element { font-size: 64px; }
.reveal-name {
    font-size: 28px;
    font-weight: bold;
    color: var(--gold);
    margin: 8px 0;
    font-family: 'Cinzel', Georgia, serif;
}
.reveal-type { font-size: 16px; color: var(--text-secondary); }
.reveal-text {
    font-size: 20px;
    color: var(--gold-light);
    margin-bottom: 16px;
    animation: fadeIn 0.5s ease;
    font-family: 'Cinzel', Georgia, serif;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================
   GAME PAGE
   ============================================ */
.game-page {
    background: var(--bg-body, var(--bg-body));
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================================
 * Multi-server : choix Raken / Varok au login
 * ============================================ */
.login-server-choice {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 14px;
}
.login-server-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(var(--black-rgb), 0.45);
    border: 1px solid rgba(var(--gold-rgb), 0.25);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    user-select: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.login-server-option:hover {
    border-color: rgba(var(--gold-rgb), 0.55);
    color: var(--gold-text-warm);
}
.login-server-option:has(input:checked) {
    background: rgba(var(--gold-rgb), 0.18);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 12px rgba(var(--gold-rgb), 0.2);
}
.login-server-option input {
    accent-color: var(--gold);
    cursor: pointer;
}

