/* 🌴 Fond tropical commun */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(to bottom, #FFD700 0%, #87CEEB 30%, #2ECC71 60%, #1E90FF 100%);
    background-attachment: fixed;
}

/* 🌴 Boutons tropicaux */
.btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #FFD700, #1E90FF);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn.disabled { background: #999; cursor: not-allowed; }

/* Police Coconut */
@font-face {
    font-family: "Coconut";
    src: url("../fonts/Coconut.ttf") format("truetype");
}

/* Lettres du logo */
.coco-letter-c, .coco-letter-f { color: #8b4513; }
.palm { color: #228b22; }
.coco-tree { height: 55px; width: auto; position: relative; top: -8px; }
.coco-title-wrapper { display: flex; align-items: center; justify-content: center; gap: 10px; }

/* --- Layout général --- */
.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

.navbar {
    background: rgba(247, 231, 193, 0.4);
    backdrop-filter: blur(3px);
    padding: 12px 20px;
    display: flex;
    gap: 20px;
    border-bottom: 2px solid rgba(212, 180, 124, 0.4);
    margin-bottom: 20px;
}
.nav-item { font-size: 18px; color: #5a3e1b; text-decoration: none; font-weight: bold; }
.nav-item:hover { text-decoration: underline; }

.layout { display: flex; gap: 20px; }

/* --- Colonne principale --- */
.main {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* --- Sidebar --- */
.sidebar {
    width: 320px;
    flex-shrink: 0;
    background: #fff;
    padding: 15px;
    border-left: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
    text-align: center;
}

.sidebar-title-normal { font-size: 18px; }
.sidebar-title-small { font-size: 14px; font-weight: bold; }
.logout-btn { width: auto !important; display: inline-block; padding: 8px 16px; margin: 10px auto; }

/* --- Blocs de pub génériques --- */
.ad { text-align: center; margin: 15px 0; }
.ad iframe, .ad img { max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* --- Boutons côte à côte --- */
.action-row { display: flex; gap: 10px; margin-top: 15px; }
.action-row button, .action-row form { flex: 1; }

/* --- Progress bar --- */
.progress-container {
    width: 100%;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
    height: 14px;
    position: relative;
}
.progress-bar { height: 100%; background: #28a745; width: 0%; transition: width 0.3s; }
#timerText {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
}

/* --- Titre Coco Faucet --- */
.coco-title {
    font-family: "Coconut", Arial, sans-serif;
    font-size: 60px;
    text-align: center;
    line-height: 1.1;
}

/* ---------------------------------------------------
   MODAL + ANIMATIONS
--------------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    width: 300px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 2001;
}
.modal.show .modal-content { opacity: 1; transform: scale(1); }

/* Animations */
.modal.sad .modal-content { animation: sadPop 0.6s ease; }
@keyframes sadPop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal.normal .modal-content { animation: normalPop 0.7s ease; }
@keyframes normalPop { 0% { transform: scale(0.75); opacity: 0; } 60% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); } }

.modal.lucky .modal-content { animation: luckyBounce 1s ease; box-shadow: 0 0 18px rgba(0,200,255,0.7); }
@keyframes luckyBounce { 0% { transform: scale(0.6); opacity: 0; } 50% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); } }

.modal.jackpot .modal-content { animation: jackpotSpin 1.6s ease-out; box-shadow: 0 0 25px rgba(255,215,0,0.9); }
@keyframes jackpotSpin {
    0% { transform: rotate(-10deg) scale(0.5); opacity: 0; }
    40% { transform: rotate(10deg) scale(1.3); opacity: 1; }
    70% { transform: rotate(-5deg) scale(1.1); }
    100% { transform: rotate(0deg) scale(1); }
}

/* ---------------------------------------------------
   MINI-JEU
--------------------------------------------------- */
.coco-event-zone {
    position: relative;
    width: 100%;
    height: 160px;
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
    z-index: 0;
}

.coco-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    z-index: -1;
}

.bebete, .sneaky-maki {
    position: absolute;
    width: 60px;
    cursor: pointer;
    transition: transform 0.2s;
}
.bebete:hover { transform: scale(1.15) !important; }

.sneaky-maki {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    cursor: pointer;
    z-index: 9999; /* 🔥 ESSENTIEL : le Maki passe devant l'île */
    transition: none /*!important; /* ← AJOUT ICI */
}


.sneaky-maki:hover { transform: translateX(-50%) scale(1.15); }

/* Marchande Prévoyante — position symétrique du Lucky Dodo */
.marchande {
    position: absolute;
    width: 60px;
    top: 54px;          /* même hauteur que le Lucky Dodo */
    left: 80%;          /* symétrique du Dodo (20% ↔ 80%) */
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 99999;
    pointer-events: auto;
    background-color: rgba(255,255,255,0.01); /* ← FIX FIREFOX */
    user-select: none;
     /* FIX FIREFOX DÉFINITIF */
    isolation: isolate;
}



/* Tablettes (écrans ≤ 900px) */
@media (max-width: 900px) {
    .marchande {
        left: 70%;
    }
}

/* Mobiles (écrans ≤ 600px) */
@media (max-width: 600px) {
    .marchande {
        left: 60%;
    }
}

/* ---------------------------------------------------
   PUBS HEADER + FOOTER (fusion optimisée)
--------------------------------------------------- */
.header-ads, .footer-ads {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
}

.header-left, .header-right,
.footer-left, .footer-right {
    width: 108px;
    height: 90px;
    overflow: hidden;
}

.header-center, .footer-center {
    width: 600px;
    height: 90px;
    overflow: hidden;
}

/* 300x250 latérales */
.header-left iframe, .header-right iframe,
.footer-left iframe, .footer-right iframe {
    width: 300px !important;
    height: 250px !important;
    transform: scale(0.36);
    transform-origin: top left;
/* ---------------------------------------------------
   SIDEBAR — Bannières rectangles (centrage + taille auto + décalage)
--------------------------------------------------- */

/* Centrage du contenu dans la sidebar */
.sidebar {
    text-align: center;
}

/* Bannières rectangles — affichage entier + centrage + léger décalage */
.sidebar img,
.sidebar iframe {
    width: 100% !important;   /* S’adapte à la largeur réelle de la sidebar */
    height: auto !important;  /* Garde les proportions */
    display: block;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    left: 11px; /* Décalage vers la droite (≈ 0,25 cm) */
}

/* ---------------------------------------------------
   728x90 centrales (inchangé)
--------------------------------------------------- */
.header-center iframe,
.footer-center iframe {
    width: 728px !important;
    height: 90px !important;
    transform: scale(0.825);
    transform-origin: top left;
    display: block;
}


/* ---------------------------------------------------
   MODAL ZERADS (fusion)
--------------------------------------------------- */
#gainModal iframe {
    width: 300px !important;
    height: 250px !important;
    display: block !important;
    margin: 10px auto !important;
}

html, body {
    height: 100%;
    min-height: 100vh;
}

.sidebar .annonceur-link a {
    display: inline-block;
    background: #f7f2d4;        /* sable */
    border: 2px solid #d4b87a;  /* bois clair */
    padding: 8px 12px;
    border-radius: 8px;
    color: #5a3e1b;             /* bois foncé */
    font-weight: bold;
    text-decoration: none;
}

/* --- ButinQuest : espacement des blocs --- */
.box {
    padding: 20px 30px; /* haut/bas 20px, gauche/droite 30px */
}

.target {
    padding: 15px 30px;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* --- ButinQuest : correction du texte collé --- */
.box {
    padding: 20px 40px !important;
}
