/* GENERAL SETTING - BASE MOBILE FIRST */

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    padding-top: 60px;
    flex: 1 0 auto;
}

/* HEADER - BASE MOBILE */

header {
    background-color: #333;
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 60px;
    box-sizing: border-box;
}

.Navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    position: relative;
    height: 100%;
}


.Navbar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.Navbar li {
    margin: 0 10px;
}

.Navbar a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: white;
    background-color: #444;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
}

.Navbar a:hover {
    background-color: #555;
}

.logo {
    display: flex;
    align-items: center;
    z-index: 100;
    background: none;
    height: 100%;
}

.logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.logo a, .logo a:hover {
    background: none;
    padding: 0;
}

.logo a{
    height: 100%;
    display: flex;
    align-items: center;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 20px 10px;
    background-color: #333;
    color: white;
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

footer p {
    margin: 0;
    font-size: 14px;
}

/* INDEX */

.accueil {
    background-image: url(../medias/index_back.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
}

form {
    background-color: rgba(128, 128, 128, 0.7);
    border-radius: 8px;
    padding: 15px;
    width: 95%;
    max-width: 800px;
    margin: 10px auto;
    box-sizing: border-box;
}

form label {
    display: block;
    margin-bottom: 10px;
    color: white;
}

form select, 
form input[type="submit"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: none;
}

form input[type="submit"] {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

form input[type="submit"]:hover {
    background-color: #555;
}

/* Style des cartes */
.card-container {
    width: 55px;
    height: 85px;
    margin: 3px;
    perspective: 1000px;
    cursor: pointer;
}

.card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 8px;
}

.card.flipping {
    animation: cardFlip 0.6s forwards;
}

.card.unflipping {
    animation: cardUnflip 0.6s forwards;
}

.card.flipped {
    transform: rotateY(180deg);
}

.card.paired {
    transform: rotateY(180deg);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.7);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
}

.card-back {
    transform: rotateY(180deg);
}

.card-front img, .card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Animation pour le retournement des cartes */
@keyframes cardFlip {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(180deg);
    }
}

@keyframes cardUnflip {
    0% {
        transform: rotateY(180deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}

/* Animation pour une paire trouvée */
@keyframes pairFound {
    0%, 100% {
        box-shadow: 0 0 8px rgba(0, 255, 0, 0.7);
    }
    50% {
        box-shadow: 0 0 16px rgba(0, 255, 0, 1);
    }
}

.card.paired {
    animation: pairFound 1.5s infinite;
}

img {
    width: 55px;
    height: 85px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.6s;
    overflow: hidden;
    border: none;
    background: none;
    padding: 0;
}

h2 {
    color: white;
    text-align: center;
    margin: 20px 0;
    font-size: 1.3rem;
}

h3 {
    color: black;
    margin-left: 10px;
}

.ind1, .ind2, .ind3 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    color: white;
}

.Jeux {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    max-width: 100%;
}

p {
    color: white;
    text-align: center;
}

/* CLASSEMENT.PHP */

.classement {
    background-image: url(../medias/classement_back.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

table {
    background-color: rgba(54, 221, 250, 0.5);
    margin: 20px auto;
    padding: 8px;
    border-radius: 20px;
    width: 95%;
    font-size: 0.9rem;
}

table th, table td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

table th {
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
}

.score-info {
    background-color: rgba(54, 221, 250, 0.5);
    margin: 20px auto;
    padding: 15px;
    border-radius: 20px;
    width: 95%;
    max-width: 800px;
    color: white;
}

.score-info h4 {
    text-align: center;
    margin-bottom: 15px;
    color: white;
}

.score-info ul {
    list-style-type: none;
    padding-left: 20px;
}

.score-info li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 25px;
}

.score-info li:before {
    content: "•";
    color: #36DDFA;
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

.score-info p {
    text-align: center;
    margin-top: 15px;
    font-style: italic;
}

/* PROFIL */

.profil {
    background-image: url(../medias/connect_back.webp);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.form-container {
    display: none;
}

.form-container.active {
    display: block;
}

.prof1, .prof2, .prof3, .prof4, .prof5, .prof6, .prof7 {
    width: 100%;
    color: white;
}

.prof2 input, .prof3 input, .prof4 input, .prof5 input, .prof6 input, .prof7 input {
    height: 35px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

#co, #regis, #p2co, #p3regis, #p4up, #p5deco, #p6suppr, #p7yes, #p7no {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    margin: 10px 0;
    transition: background-color 0.3s;
}

#co:hover, #regis:hover, #p2co:hover, #p3regis:hover, #p4up:hover, #p5deco:hover, #p6suppr:hover, #p7yes:hover, #p7no:hover {
    background-color: #555;
}
