/* style.css */

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f7;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Ancien header générique (si un autre header est utilisé) */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
}

.account {
    font-size: 0.9rem;
}

/* Cartes / blocs */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.text-content {
	max-width: 1000px;
	margin: 0 auto;
	line-height: 1.6;
}

.text-content p {
	margin-bottom: 12px;
}

.text-content h2 {
	margin-top: 24px;
	margin-bottom: 10px;
}

@media (max-width: 768px) {
	.text-content {
		max-width: 100%;
	}
}


#map {
    width: 100%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
}

.legend span {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    font-size: 0.85rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-right: 4px;
}

.dot-green { background: #34c759; }
.dot-red   { background: #ef4444; }
.dot-blue  { background: #3b82f6; }

.status-message {
    font-size: 0.85rem;
    margin-top: 4px;
}

.status-open { color: #16a34a; }
.status-closed { color: #b91c1c; }

table.ranking {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

table.ranking th,
table.ranking td {
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

table.ranking th {
    font-weight: 600;
    color: #555;
}

.you-row {
    background: #eef2ff;
}

iframe {
    width: 100%;
    border-radius: 12px;
    border: none;
    aspect-ratio: 16/9;
}

.inputs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
/* Joueur connecté (dans le top 20) */
.tr-current-user {
    position: relative;
    z-index: 1;
}

/* Halo lumineux */
.tr-current-user::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
    z-index: -1;
    filter: blur(6px);
    opacity: 0.7;
}

/* Fond légèrement différent */
.tr-current-user td {
    background: #eff6ff !important;
}

/* Badge spécial joueur */
.tr-current-user .rank-badge {
    background: #2563eb;
    color: #fff;
}

/* Animation douce (optionnel mais stylé) */
@keyframes glowPulse {
    0% { opacity: 0.6; filter: blur(6px); }
    50% { opacity: 1; filter: blur(10px); }
    100% { opacity: 0.6; filter: blur(6px); }
}

.tr-current-user::after {
    animation: glowPulse 2.5s infinite ease-in-out;
}

.field {
    flex: 1 1 100%;
}

.field input {
    width: 98%;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 0.9rem;
}

button.primary {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 999px;
    padding: 8px 20px;
    font-size: 0.95rem;
    cursor: pointer;
}

button.primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.hints {
    border-top: 1px solid #eee;
    margin-top: 8px;
    padding-top: 8px;
}

.hints h4 {
    margin: 4px 0;
    font-size: 0.95rem;
}

button.secondary {
    background: #e5e7eb;
    color: #111827;
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-right: 6px;
    margin-top: 4px;
}

button.secondary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.hint-text {
    font-size: 0.85rem;
    color: #374151;
    margin-top: 4px;
}

/* =======================
   HEADER GLOBAL
   ======================= */

.site-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #111827;
    color: #f9fafb;
    z-index: 10;
    border-radius: 12px;
    margin-bottom: 0; /* on annule le margin-bottom général de header */
}

/* Petit bloc compte sous le header, aligné à droite */
.account-box {
    /* DESKTOP : petit espace propre sous le header */
    margin: 0 1rem 0;         /* <- au lieu de -16px */
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    color: #e5e7eb;
    background: #111827;
    border-radius: 0 0 12px 12px; /* arrondi uniquement en bas */
    display: inline-block;
    float: right;
    box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

.account-box .account-link {
    color: #e5e7eb;          /* même couleur que le texte du header */
    text-decoration: none;   /* pas souligné par défaut */
    font-size: 0.85rem;
}

.account-box .account-link:hover {
    text-decoration: underline;  /* comme les liens du menu */
}

/* Lien "mot de passe oublié" (et autres liens inline discrets) */
.inline-link {
    color: #111827;           /* noir / gris très foncé */
    text-decoration: none;    /* pas de soulignement par défaut */
    font-size: 0.85rem;
}

.inline-link:hover {
    text-decoration: underline;  /* souligné au survol */
}


/* Sur mobile, on remonte un peu le bloc pour réduire le "jour" */
@media (max-width: 600px) {
    .account-box {
        display: inline-block;          /* ne prend plus toute la largeur */
        margin: -2px 1rem 0.2rem auto;  /* collé à droite, mais compact */
        text-align: right;               /* ou right si tu préfères */
    }
}

/* =======================
   BOUTON BURGER (MOBILE)
   ======================= */

.menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    border-radius: 999px;
    background: #f9fafb;
}

/* =======================
   NAV SHELL
   ======================= */

.nav-shell {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Menu (mobile d'abord : déroulant sous le header) */
.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;                  /* même largeur que le header / container */
    background: #111827;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.5);
    display: none;                 /* masqué par défaut sur mobile */
}

.main-nav.is-open {
    display: block;
}

/* Légèrement remonté sur mobile pour coller visuellement au header */
@media (max-width: 700px) {
    .main-nav {
        top: calc(100% - 8px);
    }
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0.75rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Logo EN HAUT sur mobile */
.nav-logo {
    order: -1;
    text-align: left;
    margin-bottom: 0.3rem;
}

.nav-logo img {
    height: 100px;
    width: auto;
}

/* liens */
.main-nav a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.95rem;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.main-nav a:hover {
    text-decoration: underline;
}

/* =======================
   Réseaux sociaux dans le menu
   ======================= */

.nav-social {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-social img {
    height: 40px;
    width: auto;
    display: block;
}

/* Liens "boutons" pour les étapes */
a.step-link {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
}

a.step-link:hover {
    background: #1d4ed8;
}


/* =======================
   VERSION DESKTOP
   ======================= */

@media (min-width: 700px) {
    /* plus de burger sur desktop */
    .menu-toggle {
        display: none;
    }

    /* le menu devient fixe dans le header,
       centré, avec angles adoucis */
    .main-nav {
        position: static;
        display: block;
        width: auto;
        border-radius: 999px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.45);
        padding: 0.25rem 1.5rem;
    }

    .main-nav ul {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        padding: 0;
    }

    /* Logo au milieu des liens */
    .nav-logo {
        order: 0;
        margin: 0 0.75rem;
        text-align: center;
    }

    .nav-logo img {
        height: 52px;
    }
	
	
}
