/* Responsive Styles pour Memory Game */

/* ============= GLOBAL STYLES ============= */
/* These styles apply to all screen sizes */

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: auto;
}

/* Burger Menu Base Styles */
.burger-icon {
    cursor: pointer;
    z-index: 100;
    position: absolute;
    top: 12px;
    right: 15px;
    width: 30px;
    height: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.burger-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

.burger-icon.toggle span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.burger-icon.toggle span:nth-child(2) {
    opacity: 0;
}

.burger-icon.toggle span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Navigation Menu */
.Navbar {
    position: relative;
}

.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 100%;
    background-color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.4s ease;
    z-index: 50;
}

.nav-links.nav-active {
    right: 0;
}

.Navbar li {
    opacity: 0;
    width: 100%;
    text-align: center;
    margin: 20px 0;
}

.Navbar li a {
    width: 80%;
    margin: 0 auto;
    padding: 12px 20px;
}

.nav-active li {
    animation: navLinkFade 0.5s ease forwards 0.2s;
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Game Container */
.Jeux {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    max-width: 100%;
}

/* Background images */
.accueil, .classement, .profil {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============= MOBILE STYLES (BASE) ============= */
/* Styles for small mobile devices (up to 480px) */

main {
    padding-top: 70px;
    flex: 1;
}

/* Corriger les styles des cartes en mode mobile */
.card-container {
    width: 65px !important;
    height: 100px !important;
    margin: 5px !important;
}

.card-front img, .card-back img, .card-container img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px;
}

form {
    width: 95%;
    padding: 10px;
    margin: 10px auto;
}

form select, 
form input[type="submit"] {
    width: 100%;
    margin-bottom: 1rem;
}

.card-button {
    width: 55px;
    height: 85px;
    margin: 3px;
}

h2 {
    font-size: 1.3rem;
    text-align: center;
    margin: 10px 0;
    padding: 0 10px;
}

.ind1, .ind2, .ind3 {
    width: 100%;
}

/* Profile form adjustments */
.prof1, .prof2, .prof3, .prof4, .prof5, .prof6, .prof7 {
    width: 100%;
}

.prof2 input, .prof3 input, .prof4 input, .prof5 input, .prof6 input, .prof7 input {
    width: 100%;
}

#p2co, #p3regis, #p4up, #p5deco, #p6suppr, #p7yes, #p7no {
    margin-left: 0;
    width: 100%;
    margin-top: 10px;
}

table {
    width: 95%;
    margin: 0 auto;
    font-size: 0.9rem;
}

/* ============= TABLET STYLES ============= */
@media screen and (min-width: 481px) and (max-width: 768px) {
    header {
        height: 90px !important;
    }
    
    .burger-icon {
        top: 20px !important;
    }
    
    .logo img {
        height: 50px !important;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    main {
        padding-top: 100px !important;
    }
}

/* ============= DESKTOP STYLES ============= */
@media screen and (min-width: 769px) {
    /* Reset mobile menu */
    header {
        height: 85px;
        padding: 20px;
    }
    
    .burger-icon {
        display: none;
    }
    
    .nav-links {
        position: static;
        height: auto;
        width: 100%;
        background-color: transparent;
        flex-direction: row;
        justify-content: center;
        padding: 10px 0;
        right: 0;
    }
    
    .Navbar li {
        margin: 0 30px;
        opacity: 1;
        width: auto;
    }
    
    .Navbar li a {
        width: auto;
        margin: 0;
    }
    
    /* Game elements */
    main {
        padding-top: 60px;
    }
    
    .card-button {
        width: 85px;
        height: 130px;
        margin: 8px;
    }
    
    img {
        width: 85px;
        height: 130px;
    }
    
    h2 {
        font-size: 1.8rem;
        text-align: left;
        margin-left: 30px;
    }
    
    form {
        width: 80%;
        max-width: 700px;
        padding: 20px;
    }
    
    .Jeux {
        gap: 10px;
    }
    
    /* Profile forms */
    .prof2 input, .prof3 input, .prof4 input, .prof5 input, .prof6 input, .prof7 input {
        width: 180px;
    }
    
    #co, #regis, #p2co, #p3regis, #p4up, #p5deco, #p6suppr, #p7yes, #p7no {
        width: auto;
        margin-left: 20px;
    }
    
    /* Ajustements footer */
    footer {
        padding: 20px;
    }
}

/* ============= LARGE DESKTOP STYLES ============= */
@media screen and (min-width: 1201px) {
    .Navbar li {
        margin: 0 70px;
    }
    
    .card-button {
        width: 100px;
        height: 150px;
        margin: 10px;
    }
    
    img {
        width: 100px;
        height: 150px;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    form {
        max-width: 800px;
    }
}

/* ===== STYLES MOBILES (BASE) ===== */
@media screen and (max-width: 480px) {
    /* Ajustements spécifiques pour petits écrans */
    footer {
        padding: 15px 5px;
    }
    
    footer p {
        font-size: 12px;
    }
    
    .logo img {
        height: 35px;
    }
    
    .card-container {
        width: 55px;
        height: 85px;
    }
}

/* Logo dans le header */
.logo img {
    height: 40px;
    margin-top: 0;
}

/* ===== STYLES TABLETTE ===== */
@media screen and (min-width: 481px) {
    header {
        height: 50px;
    }
    
    .burger-icon {
        top: 12px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .card-container {
        width: 70px;
        height: 105px;
        margin: 5px;
    }
    
    form {
        width: 90%;
        padding: 15px;
    }
    
    form select, 
    form input[type="submit"] {
        width: 70%;
        margin: 0 auto 1rem;
    }
    
    .Jeux {
        gap: 8px;
    }
    
    table {
        width: 90%;
        font-size: 1rem;
    }
    
    main {
        padding-top: 60px;
    }
    
    .logo img {
        height: 40px;
    }
}

/* ===== STYLES DESKTOP ===== */
@media screen and (min-width: 769px) {
    /* Reset mobile menu */
    header {
        height: 70px;
        padding: 0;
    }
    
    .burger-icon {
        display: none;
    }
    
    .nav-links {
        position: static;
        height: auto;
        width: 100%;
        background-color: transparent;
        flex-direction: row;
        justify-content: center;
        padding: 10px 0;
        right: 0;
    }
    
    .Navbar li {
        margin: 0 30px;
        opacity: 1;
        width: auto;
    }
    
    .Navbar li a {
        width: auto;
        margin: 0;
    }
    
    /* Game elements */
    main {
        padding-top: 60px;
    }
    
    .card-container {
        width: 85px;
        height: 130px;
        margin: 8px;
    }
    
    img {
        width: 85px;
        height: 130px;
    }
    
    h2 {
        font-size: 1.8rem;
        text-align: left;
        margin-left: 30px;
    }
    
    form {
        width: 80%;
        max-width: 700px;
        padding: 20px;
    }
    
    .Jeux {
        gap: 10px;
    }
    
    /* Profile forms */
    .prof2 input, .prof3 input, .prof4 input, .prof5 input, .prof6 input, .prof7 input {
        width: 180px;
    }
    
    #co, #regis, #p2co, #p3regis, #p4up, #p5deco, #p6suppr, #p7yes, #p7no {
        width: auto;
        margin-left: 20px;
    }
    
    /* Ajustements footer */
    footer {
        padding: 20px;
    }
    
    .logo img {
        height: 40px;
    }
}

/* ===== STYLES GRAND DESKTOP ===== */
@media screen and (min-width: 1201px) {
    .Navbar li {
        margin: 0 70px;
    }
    
    .card-container {
        width: 100px;
        height: 150px;
        margin: 10px;
    }
    
    img {
        width: 100px;
        height: 150px;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    form {
        max-width: 800px;
    }
    
    .logo img {
        height: 45px;
    }
} 