* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
}

/* Pages */
.page {
    display: none;
    width: 100%;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page.active {
    display: flex;
}

/* Page de connexion */
.login-container {
    background: #ffffff;
    padding: 80px 60px;
    border: 1px solid #e0e0e0;
    text-align: center;
    max-width: 400px;
    width: 100%;
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.heart-icon {
    font-size: 40px;
    color: #000000;
    margin-bottom: 50px;
}

.input-group {
    margin-bottom: 20px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-bottom: 1px solid #000000;
    background: transparent;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #999999;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-bottom: 2px solid #000000;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: #000000;
    color: #ffffff;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
    letter-spacing: 1px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
}

.btn-submit:hover {
    background: #333333;
}

.btn-submit:active {
    transform: scale(0.98);
}

.error-message {
    color: #000000;
    font-size: 13px;
    margin-top: 20px;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 0.6;
}

.forgot-password {
    display: inline-block;
    margin-top: 20px;
    color: #666666;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #000000;
    text-decoration: underline;
}

.hint-message {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-left: 3px solid #000000;
    color: #333333;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.hint-message.show {
    opacity: 1;
    max-height: 200px;
    margin-top: 20px;
}

/* Animation de transition */
.fade-out {
    animation: fadeOutUp 0.8s ease-out forwards;
}

@keyframes fadeOutUp {
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* Page explicative */
.explanation-container {
    background: #ffffff;
    padding: 80px 60px;
    border: 1px solid #e0e0e0;
    max-width: 700px;
    width: 100%;
}

.explanation-container h1 {
    font-size: 36px;
    font-weight: 300;
    color: #000000;
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: 2px;
}

.message-section {
    margin-bottom: 50px;
}

.personal-message {
    font-size: 16px;
    line-height: 1.8;
    color: #333333;
    text-align: center;
    padding: 30px;
    border-left: 2px solid #000000;
}

.rules-section {
    margin-bottom: 50px;
}

.rules-section h2 {
    font-size: 20px;
    font-weight: 500;
    color: #000000;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.rules-section ul {
    list-style: none;
    padding-left: 0;
}

.rules-section > ul > li {
    font-size: 16px;
    line-height: 2;
    color: #333333;
    margin-bottom: 15px;
}

.jokers-list {
    margin-top: 15px;
    margin-left: 30px;
}

.jokers-list li {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 10px;
}

.btn-start {
    width: 100%;
    padding: 18px;
    background: #000000;
    color: #ffffff;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
}

.btn-start:hover {
    background: #333333;
}

.btn-start:active {
    transform: scale(0.98);
}

/* Animations pour la page explicative */
.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */

/* Tablettes et petits écrans */
@media (max-width: 1024px) {
    .login-container,
    .explanation-container {
        padding: 60px 40px;
    }
}

/* Tablettes en portrait */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .page {
        padding: 10px;
    }

    .login-container,
    .explanation-container {
        padding: 40px 30px;
        max-width: 100%;
    }

    .explanation-container h1 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .personal-message {
        font-size: 15px;
        padding: 20px;
    }

    .rules-section h2 {
        font-size: 20px;
    }

    .rules-section > ul > li {
        font-size: 15px;
    }

    .jokers-list li {
        font-size: 14px;
    }

    .btn-submit,
    .btn-start {
        padding: 14px;
        font-size: 15px;
    }
}

/* Mobiles */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .page {
        padding: 5px;
    }

    .login-container,
    .explanation-container {
        padding: 30px 20px;
    }

    .heart-icon {
        font-size: 30px;
        margin-bottom: 30px;
    }

    .explanation-container h1 {
        font-size: 24px;
        letter-spacing: 1px;
    }

    .personal-message {
        font-size: 14px;
        padding: 15px;
    }

    .rules-section h2 {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .rules-section > ul > li {
        font-size: 14px;
        line-height: 1.8;
        margin-bottom: 12px;
    }

    .jokers-list {
        margin-left: 20px;
    }

    .jokers-list li {
        font-size: 13px;
    }

    input[type="text"],
    input[type="password"] {
        padding: 12px 15px;
        font-size: 14px;
    }

    .btn-submit,
    .btn-start {
        padding: 12px;
        font-size: 14px;
        margin-top: 20px;
    }

    .hint-message {
        font-size: 13px;
        padding: 12px;
    }

    .forgot-password {
        font-size: 12px;
    }
}
