/* ============================
   INTRO PARCHEMIN SOMBRE
   ============================ */

.drae-intro-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    background: #0d0d0d url('https://www.draegoria.fr/wp-content/uploads/2024/12/dark-smoke-bg.jpg') center/cover no-repeat;
    min-height: 100vh;
}

.drae-intro-parchment {
    background: url('https://www.draegoria.fr/wp-content/uploads/2024/12/burned-parchment.png') center/cover no-repeat;
    padding: 40px 50px;
    max-width: 700px;
    text-align: center;
    color: #f5e6c8;
    border: 3px solid #3a1f0f;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    animation: fadeIn 1.5s ease-out;
}

.drae-intro-title {
    font-family: 'Cinzel', serif;
    font-size: 48px;
    margin-bottom: 20px;
    color: #ffdd9b;
    text-shadow: 0 0 10px #8b3a00;
}

.drae-intro-text {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 25px;
    font-family: 'Cormorant Garamond', serif;
}

.drae-intro-btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #8b3a00, #d47a1f);
    color: #fff;
    font-size: 22px;
    border-radius: 6px;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    box-shadow: 0 0 15px rgba(255,140,0,0.6);
    transition: 0.3s;
}

.drae-intro-btn:hover {
    background: linear-gradient(135deg, #d47a1f, #8b3a00);
    box-shadow: 0 0 25px rgba(255,140,0,0.9);
    transform: scale(1.05);
}

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


/* ============================
   ÉCRAN DE CHARGEMENT DRAEGORIA
   ============================ */

#drae-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#drae-loading-screen.active {
    opacity: 1;
    pointer-events: all;
}

/* ============================
   WRAPPER CENTRÉ (runes + dragon)
   ============================ */

.drae-loading-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================
   CERCLE RUNIQUE ANIMÉ
   ============================ */

.drae-loading-runes {
    position: absolute;
    top: 0;
    left: 0;
    width: 220px;
    height: 220px;
    background: url('https://www.draegoria.fr/wp-content/uploads/2026/01/rune-scaled.png') center/contain no-repeat;
    animation: draeRunesSpin 6s linear infinite;
    opacity: 0.85;
    filter: drop-shadow(0 0 12px rgba(255, 180, 80, 0.6));
}

@keyframes draeRunesSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ============================
   TÊTE DE DRAGON (centrée + pulse)
   ============================ */

.drae-loading-dragon {
    position: absolute;
    width: 140px;
    height: 140px;
    background: url('https://www.draegoria.fr/wp-content/uploads/2026/01/dragon-chargement.png') center/contain no-repeat;
    animation: draePulse 1.2s infinite ease-in-out;
    pointer-events: none;
}

@keyframes draePulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}


/* ============================
   PAGE AUTH PARCHEMIN SOMBRE
   ============================ */

.drae-auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px;
    background: #0d0d0d url('https://www.draegoria.fr/wp-content/uploads/2026/01/dark-smoke.jpg') center/cover no-repeat;
}

.drae-auth-parchment {
    background: url('https://www.draegoria.fr/wp-content/uploads/2026/01/parchemin-co.png') center/cover no-repeat;
    padding: calc(40px + 2%) calc(50px + 3%);
    width: 90%;
    max-width: 900px;
    color: #f5e6c8;
    animation: fadeIn 1.5s ease-out;
}

.drae-auth-tabs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 25px;
}

.drae-auth-tab {
    background: none;
    border: none;
    font-size: 20px;
    color: #d9c7a3;
    cursor: pointer;
    padding: 10px 20px;
    font-family: 'Cinzel', serif;
    transition: 0.3s;
}

.drae-auth-tab.active {
    color: #ffdd9b;
    text-shadow: 0 0 10px #8b3a00;
}

.drae-auth-panel {
    display: none;
}

.drae-auth-panel.active {
    display: block;
}

.drae-auth-title {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    margin-bottom: 20px;
    color: #ffdd9b;
}

.drae-auth-panel label {
    display: block;
    margin-top: 15px;
    font-size: 18px;
}

.drae-auth-panel input {
    width: 100%;
    max-width: 650px;
    padding: 10px;
    margin-top: 5px;
    background: rgba(0,0,0,0.4);
    border: 1px solid #5a3a1f;
    color: #fff;
}

.drae-auth-btn {
    display: block;
    width: 100%;
    max-width: 450px; /* limite la largeur pour éviter les débordements */
    margin: 25px auto 0 auto; /* centre le bouton */
    padding: 14px 20px;

    background: linear-gradient(135deg, #8b3a00, #d47a1f); /* effet feu / bronze */
    border: none;
    border-radius: 6px;

    color: #fff;
    font-size: 20px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    text-align: center;
    text-decoration: none;

    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.4);
}

.drae-auth-btn:hover {
    background: linear-gradient(135deg, #d47a1f, #8b3a00); /* inversion du gradient */
    box-shadow: 0 0 25px rgba(255, 140, 0, 0.8);
    transform: scale(1.03);
}

.drae-auth-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}



/* ================================
   STYLE GLOBAL DRAEGORIA
   ================================ */

.drae-panel {
    background: #1a1512;
    color: #f4e6cc;
    padding: 24px;
    border-radius: 16px;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    font-family: "Segoe UI", sans-serif;
}

#drae-global-hud {
    position: fixed;
    top: 70px;
    right: 15px;
    z-index: 99999;
    display: flex;
    gap: 20px;
    background: rgba(20, 20, 20, 0.65);
    padding: 12px 20px;
    border-radius: 14px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.drae-hud-item {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-shadow: 0 0 6px #000;
}

.drae-hud-level-block {
    align-items: flex-start;
}

.drae-hud-xp {
    font-size: 12px;
    opacity: 0.8;
}

.drae-xp-fill.xp-anim {
    transition: width 0.4s ease-out, background 0.3s ease-out;
    background: linear-gradient(90deg, #ffe29f, #ffa200);
}


/* Bloc niveau */
.drae-level-line {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
}

/* Barre d'XP */
.drae-xp-bar {
    width: 120px;
    height: 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    margin-bottom: 2px;
}

.drae-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffb347, #ff6a00);
    width: 0%;
    transition: width 0.4s ease-out;
}

/* ================================
   DRAGON PAGE
   ================================ */
.dragon-page {
  position: relative;
  width: 100%;
  min-width: 100vw;
  height: 100vh;
  background-color: transparent !important;
  background-image: url("https://www.draegoria.fr/wp-content/uploads/2026/02/decor-feu.jpg"); /* décor dragon */
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.dragon-visual {
    position: absolute;
    bottom: 0;
    right: 5%;
    width: 45%;
    z-index: 10;
    pointer-events: none;
}

.dragon-visual-wrapper {
    position: relative;
}


body:not(.page-mon-dragon) {
  background-color: black !important;
}

/* POP-UP RESULTAT JEU */
.drae-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.drae-popup-content {
    background: #1c1c22;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    color: white;
    border: 2px solid #ffcc55;
    box-shadow: 0 0 20px rgba(255,200,100,0.4);
}

#drae-popup-close {
    margin-top: 15px;
    padding: 10px 20px;
    background: #ffcc55;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}



/* Nom du dragon */
.dragon-name {
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow:
        0 0 6px rgba(0,0,0,0.9),
        0 0 12px rgba(0,0,0,0.8),
        2px 2px 4px rgba(0,0,0,0.9);
}



/* Position générale */
.dragon-ui {
    position: absolute;
    top: 10%;
    left: 5%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 320px;
    font-family: "Cinzel", serif;
    color: #fff;
}

/* Bloc d'informations */
.dragon-info-block {
    background: rgba(20, 10, 5, 0.55);
    border: 2px solid rgba(255, 120, 40, 0.6);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 20px rgba(255, 80, 20, 0.25);
}


/* Métadonnées */
.dragon-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meta-line {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
}

.meta-label {
    opacity: 0.8;
    font-weight: bold;
}

.meta-value {
    font-weight: 600;
}

/* Bloc boutons */
.dragon-buttons-block {
    background: rgba(20, 10, 5, 0.55);
    border: 2px solid rgba(255, 120, 40, 0.6);
    border-radius: 12px;
    padding: 15px;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 20px rgba(255, 80, 20, 0.25);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Boutons */
.dragon-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 120, 40, 0.85);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}

.dragon-btn:hover {
    background: rgba(255, 150, 60, 1);
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(255, 120, 40, 0.8);
}

/* ================================
   STATS DU DRAGON
   ================================ */

.drae-stats {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
    border: 1px solid rgba(247, 213, 138, 0.2);
}

/* ================================
   ACTIONS (boutons)
   ================================ */

.drae-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

/* On remplace "gap" par une marge compatible */
.drae-actions .drae-btn {
    margin: 0 6px;
}

.drae-btn {
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, #f7d58a, #e66b2f);
    color: #2a1309;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.drae-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* Effet de flash sur le dragon */
.dragon-flash {
    animation: dragonFlash 0.4s ease-out;
}

@keyframes dragonFlash {
    0% { filter: brightness(1); }
    30% { filter: brightness(2); }
    100% { filter: brightness(1); }
}

/* Shake pour les actions puissantes */
.dragon-shake {
    animation: dragonShake 0.4s ease-in-out;
}

@keyframes dragonShake {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-5px, 3px); }
    50% { transform: translate(5px, -3px); }
    75% { transform: translate(-4px, 2px); }
    100% { transform: translate(0, 0); }
}

/* Texte flottant */
.drae-float-text {
    position: absolute;
    left: 50%;
    top: 40%;
    transform: translateX(-50%);
    font-size: 24px;
    font-weight: bold;
    color: #ffdd88;
    opacity: 1;
    pointer-events: none;
    animation: floatUp 1.2s ease-out forwards;
    text-shadow: 0 0 10px #ff8800;
}

/* Texte Level Up */
.drae-levelup-text {
    position: absolute;
    left: 50%;
    top: 20%;
    transform: translateX(-50%);
    font-size: 42px;
    font-weight: 900;
    color: #ffd86b;
    text-shadow: 0 0 12px #ff8c00, 0 0 20px #ff6a00;
    opacity: 1;
    animation: draeLevelUpFloat 1.5s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
}

@keyframes draeLevelUpFloat {
    0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -40px) scale(1.3); }
    100% { opacity: 0; transform: translate(-50%, -80px) scale(1); }
}


@keyframes floatUp {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -60px); }
}

/* ================================
   FEEDBACK
   ================================ */

.drae-feedback {
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 600;
    color: #f7d58a;
}

.drae-feedback-show {
    opacity: 1;
}

/* ================================
   SCÈNE : NOM DU DRAGON
   ================================ */

.drae-name-scene {
    max-width: 700px;
    margin: 40px auto;
    padding: 24px;
    background: #1a1512;
    color: #f4e6cc;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    text-align: center;
    display: none;
}

.drae-name-scene h2 {
    font-family: "Cinzel", serif;
    color: #f7d58a;
    margin-bottom: 12px;
}

.drae-name-text {
    line-height: 1.6;
    margin-bottom: 20px;
}

.drae-dragon-preview img {
    width: 240px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 0 12px rgba(247, 213, 138, 0.4);
}

/* Formulaire du nom */
.drae-name-form {
    margin-top: 16px;
}

#drae-dragon-name {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    width: 200px;
    font-size: 16px;
    margin-right: 8px;
}

.drae-main-button {
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, #f7d58a, #e66b2f);
    color: #2a1309;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drae-main-button:hover {
    filter: brightness(1.1);
}

.drae-name-feedback {
    margin-top: 10px;
    font-weight: 600;
}

/* ============================
   OVERRIDES GLOBAUX DU JEU
   ============================ */

/* Supprimer le surlignement et la couleur bleue des liens */
.drae-intro-btn,
.drae-intro-btn:visited,
.drae-intro-btn:hover,
.drae-intro-btn:active {
    text-decoration: none !important;
    color: #fff !important;
}

/* ============================
   FULLSCREEN POUR LES PAGES DU JEU
   ============================ */
   
.elementor-section,
.elementor-container,
.elementor-column {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.elementor {
    background: transparent !important;
}

body.page-mon-dragon .dragon-page {
    height: 100vh;
    overflow: hidden;
}


/* ============================
   SCROLL POUR LES PAGES DU JEU
   ============================ */
   
body.page-eveil-du-dragon {
    overflow: auto;
    height: auto;
}

body.page-choix-du-dragon {
    overflow: auto;
    height: auto;
}

body.page-nom-du-dragon {
    overflow: auto;
    height: auto;
}


body.page-mon-dragon {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    overflow-x: hidden !important;
}

