/* Style CSS géré par le fichier style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
    font-family: Arial;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
}

header {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1.2em;
    position: fixed;
    width: 100%;
    z-index: 1;
}

header h1 a {
    font-size: 1em;
    color: #fff;
    text-decoration: none;
    margin-left: 250px;
}

header p {
    font-size: 1.1em;
    margin-left: 250px;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1em;
    margin-top: auto;
    margin-left: 250px;
}

nav {
    background-color: #444;
    color: #fff;
    width: 250px;
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 2;
}

nav h2 a {
    font-size: 1em;
    color: #fff;
    text-decoration: none;
}

nav h2 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

nav ul {
    list-style-type: none;
}

nav ul li {
    margin: 0.5rem 0;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

nav ul li a:hover {
    text-decoration: underline;
}

.submenu {
    display: none;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.submenu li {
    margin-left: 20px;
}

main {
    margin-left: 250px;
    padding: 2rem;
}

#travail_projet .film-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 20px;
}

#travail_projet .film-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    transition: transform 0.3s ease-in-out;
    transform: scale(1);
}

#travail_projet .film-card:hover {
    transform: scale(1.02);
}

#travail_projet .film-poster {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

#travail_projet .film-info {
    text-align: left;
    padding: 10px;
}

#travail_projet .film-info h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

#travail_projet .film-info p {
    margin: 5px 0;
    line-height: 1.5;
}

.film-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
}

.film-container img {
    width: 227px;
    height: 340px;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.1);
}

.lazy-image {
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lazy-image.loaded {
    opacity: 1;
}

.film-details {
    flex-grow: 1;
    min-width: 0;
    text-align: justify;
}

.film-details h1 {
    font-size: 2em;
}

.film-details h2 {
    font-size: 1.5em;
}

.film-separateur {
    display: none;
    margin: 2em;
}

table, td {
    color: black;
    border: 1px solid black;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    width: 100%;
    min-width: 600px;
}

.tableau {
    border: none;
    background-color: white;
}

.td1 {
    text-align: center;
    background-color: rgb(141, 141, 141);
    color: white;
}

.td2 {
    text-align: center;
    background-color: rgb(228, 228, 228); /*Couleur codée selon rgb()*/
    color: black;
}

form {
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

fieldset {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
}

legend {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    padding: 0 10px;
    display: block;
    text-align: center;
}

label {
    display: block;
    font-size: 1rem;
    margin: 10px 0 5px;
    color: #555;
}

select {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    transition: border-color 0.3s;
}

select:focus {
    border-color: #007BFF;
    outline: none;
}

button {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    color: #fff;
    background-color: #007BFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
}

button:hover {
    background-color: #0056b3;
}

/*Style CSS géré par un lien de type ID*/
#propos a {
    color: #000; /*Couleur codée selon #*/
    font-weight: bold;
    text-decoration: none;
}

#propos a:hover {
    text-decoration: underline;
}

/*Style CSS géré par un lien de type class*/
.CV a {
    color: white; /*Couleur codée selon un nom de couleur*/
    font-weight: bold;
    text-decoration: none;
}

.CV a:hover {
    text-decoration: underline;
}

#annee-page section {
    margin-bottom: 2rem;
}

#annee {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-left: 250px;
}

#annee a {
    margin: 5px 10px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
}

#annee a:hover {
    text-decoration: underline;
}

#genres-page section {
    margin-bottom: 2rem;
}

#game-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

#game-container > div {
    min-height: 470px;
}

.sql-container, .intro {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    max-width: 100%;
    margin: auto;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    overflow-x: auto;
}

.intro.sql-container {
    margin-bottom: 40px;
    text-align: justify;
}

textarea {
    width: 100%;
    height: 100px;
    font-family: monospace;
    font-size: 1rem;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #ccc;
    resize: none;
}

.interface-sql button {
    margin-top: 10px;
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    background-color: #444;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

.interface-sql button:hover {
    background-color: #222;
}

.interface-sql table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    margin-top: 20px;
    overflow-x: auto;
    min-width: 800px;
}

.interface-sql th, .interface-sql td {
    border: 1px solid #999;
    padding: 8px;
    text-align: left;
    word-wrap: break-word;
}

.interface-sql th {
    font-weight: bold;
    background-color: #f2f2f2;
    text-align: center;
}

.intro-table {
    margin-top: 1em;
    overflow-x: auto;
    display: block;
}

#results {
    overflow-x: auto;
}

#results p {
    margin-top: 20px;
}

#hamburger {
    position: fixed;
}

#overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
    body {
        position: relative;
        margin: 0;
        padding: 0;
        background: transparent !important;
    }

    body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url("../image/landscape.avif");
        background-size: cover;
        background-position: center;
        background-attachment: scroll;
        z-index: -1;
    }

    main {
        margin-left: 0;
    }

    header {
        top: 3.5em;
        z-index: 1;
    }

    header h1 a,
    header p,
    footer {
        margin-left: 0;
        text-align: center;
    }

    #film-selection .film-container:nth-child(n+4) {
        display: none;
    }

    form {
        max-width: 100%;
        padding: 15px 10px;
        margin: 1rem auto;
    }
    
    .film-container {
        flex-direction: column;
        max-width: 100%;
    }

    .film-container img {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
    }

    .film-details {
        max-width: 100%;
        min-width: auto;
        margin-left: 0;
    }

    .film-separateur {
        display: block;
    }

    #annee {
        margin-left: 0;
    }

    #annee a {
        font-size: 0.5em;
        font-weight: normal;
    }

    #game-container {
        flex-direction: column;
        align-items: center;
        padding: 0 1rem;
    }

    #game-container > div {
        width: 100%;
        max-width: 400px;
    }

    #poster {
        width: 200px !important;
        height: auto !important;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    #synopsis {
        text-align: justify;
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    nav {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        height: 100%;
        overflow: visible;
        z-index: 1002;
    }

    nav.open {
        transform: translateX(0);
    }

    #hamburger {
        top: 0;
        left: 0;
        width: 100%;
        height: 3.5em;
        line-height: 3.5em;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
        border: none;
        border-radius: 0;
        background-color: #333;
        color: white;
        box-sizing: border-box;
        z-index: 1002;
        cursor: pointer;
    }

    #overlay.show {
        display: block;
    }
}