/* style.css - COMPLET */

/* Style pour le corps de la page */
body {
    margin: 0;
    background: #0012cc; /* Fond bleu profond */
    overflow: hidden;
    font-family: sans-serif;
}

/* Style pour l'en-tête - RÉDUIT AU MAXIMUM */
header {
    background: #ffffffaa; /* Blanc légèrement transparent */
    color: #003366;
    display: flex;
    justify-content: center;
    gap: 1em;
    padding: 0.3em 1em; /* Encore plus réduit */
    font-weight: bold;
    font-size: 0.95em; /* Encore plus petit */
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

/* Style pour les éléments div dans l'en-tête */
header div {
    transition: background 0.3s, color 0.3s;
    padding: 0.2em 0.6em;
    border-radius: 10px;
}

/* Style pour les éléments div actifs dans l'en-tête */
header div.active {
    background: #00FFFF;
    color: black;
}

/* Zone de bienvenue avec boutons de contrôle - AJUSTÉ */
.welcome-container {
    position: fixed !important;
    top: 50px !important; /* Encore réduit car header plus petit */
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    z-index: 100 !important;
}

.welcome-message {
    background: #ffffff !important;
    color: #003366 !important;
    padding: 15px 25px !important;
    border-radius: 15px !important;
    font-size: 1.1em !important;
    font-weight: bold !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    border: 2px solid #00FFFF !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.dice-control-btn {
    padding: 12px 20px;
    font-size: 1em;
    font-weight: bold;
    background: #003366;
    color: white;
    border: 2px solid #00FFFF;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.dice-control-btn:hover {
    background: #00FFFF;
    color: #003366;
    transform: scale(1.05);
}

.dice-control-btn:active {
    transform: scale(0.95);
}

/* Zone MOTD (en bas à gauche) avec bouton de fermeture */
.motd-message {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    background: #ffffff !important;
    color: #003366 !important;
    padding: 12px 40px 12px 20px !important; /* Padding à droite pour la croix */
    border-radius: 10px !important;
    font-size: 0.9em !important;
    font-style: italic !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2) !important;
    z-index: 100 !important;
    border: 1px solid #00FFFF !important;
    min-width: 350px !important;
    max-width: 450px !important;
    display: block !important;
}

/* Bouton de fermeture du MOTD */
.motd-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #f0f0f0;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    font-weight: bold;
    line-height: 1;
    padding: 0;
}

.motd-close-btn:hover {
    background: #e74c3c;
    color: white;
    transform: scale(1.1);
}

/* Style pour les dés */
.dice {
    width: 80px;
    height: 80px;
    background: white;
    color: black;
    border: 2px solid black;
    border-radius: 15px;
    font-size: 2em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: absolute;
    transition: top 1s ease, left 1s ease, transform 1s ease, background 0.3s;
    cursor: pointer;
}

/* Style pour les dés au survol */
.dice:hover {
    background: #000042;
    color: white;
}

/* Style pour les liens dans l'en-tête */
header a {
    text-decoration: none;
    color: inherit;
}

/* Style pour les liens dans l'en-tête au survol */
header a:hover {
    background: #00FFFF;
    color: black;
    padding: 0.2em 0.6em;
    border-radius: 10px;
}

div texte-bienvenue {
    background: #ffffff;
    color: black;
}

.status-message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.duplicate {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.word-input[style="display: none;"], .btn[style="display: none;"] {
    display: none !important;
}

/* === DICEÉLÉMENTS SANS MATTER.JS === */

.dice-element {
    width: 80px;
    height: 80px;
    background: white;
    color: black;
    border: 2px solid black;
    border-radius: 15px;
    font-size: 2em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: fixed;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.dice-element:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.dice-element.selected {
    background: #00FFFF !important;
    color: #000 !important;
    border-color: #00FFFF;
    box-shadow: 0 0 30px #00FFFF;
}

/* Dés spéciaux - BASE */
.dice-special {
    overflow: hidden;
    white-space: nowrap;
    border-width: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dice-special .dice-short {
    display: inline;
}

.dice-special .dice-full {
    display: none;
}

/* Dés spéciaux en TOPLEFT - se déploient vers la DROITE */
.dice-special[data-position="topleft"] {
    transform-origin: left center;
}

.dice-special[data-position="topleft"]:hover {
    width: 200px !important;
    z-index: 1001;
    /* Pas de translateX, se déploie naturellement vers la droite */
}

/* Dés spéciaux en TOPRIGHT - se déploient vers la GAUCHE */
.dice-special[data-position="topright"] {
    transform-origin: right center;
}

.dice-special[data-position="topright"]:hover {
    width: 200px !important;
    z-index: 1001;
    /* Se déploie vers la gauche */
    transform: translateX(-120px);
}

/* Affichage du texte complet au survol */
.dice-special:hover .dice-short {
    display: none;
}

.dice-special:hover .dice-full {
    display: inline;
    font-size: 0.7em;
}

/* === POPUP INSCRIPTION === */

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.popup-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.popup-close:hover {
    color: #000;
}

.popup-content h2 {
    color: #003366;
    margin-bottom: 25px;
}

.popup-content .form-group {
    margin-bottom: 20px;
}

.popup-content label {
    display: block;
    color: #003366;
    margin-bottom: 8px;
    font-weight: 600;
}

.popup-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.popup-content input:focus {
    outline: none;
    border-color: #00FFFF;
}

.password-checks {
    margin-top: 10px;
    font-size: 0.9em;
}

.check {
    color: #e74c3c;
    margin: 5px 0;
    transition: color 0.3s;
}

.check.valid {
    color: #27ae60;
}

.popup-content .btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #003366, #0066cc);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 10px;
}

.popup-content .btn-submit:hover {
    transform: translateY(-2px);
}

.popup-content .btn-submit:active {
    transform: translateY(0);
}

/* === STYLES POUR LA PAGE CONTACT === */

.contact-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.contact-header h1 {
    color: #003366;
    margin-bottom: 10px;
    font-size: 28px;
}

.contact-header p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    color: #003366;
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #00FFFF;
}

.captcha-group {
    background: #f0f8ff;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #00FFFF;
}

.captcha-group label {
    color: #003366;
}

.captcha-input-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.captcha-input-group input {
    flex: 1;
}

.btn-captcha-change {
    padding: 12px 20px;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}

.btn-captcha-change:hover {
    background: #f57c00;
}

.captcha-hint {
    display: block;
    color: #666;
    font-style: italic;
    margin-top: 8px;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #003366, #0066cc);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.back-link {
    text-align: center;
    margin-top: 30px;
}

.back-link a {
    color: #003366;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.back-link a:hover {
    color: #00FFFF;
    text-decoration: underline;
}