/* =========================================
   Variables et fondations
   ========================================= */
:root {
    --boys-black: #0a0a0a;
    --boys-dark: #141414;
    --boys-yellow: #f5c518;
    --boys-red: #b30000;
    --text-color: #e0e0e0;
    --font-head: 'Arial Black', 'Impact', sans-serif;
    --font-body: 'Arial', Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style-type: none;
}

body {
    background-color: var(--boys-black);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    background-image: linear-gradient(rgba(0,0,0,0.9), rgba(0,0,0,0.9)), url('https://www.transparenttextures.com/patterns/dark-matter.png');
}

/* =========================================
   Header et nav
   ========================================= */
header {
    background-color: black;
    border-bottom: 3px solid var(--boys-red);
    text-align: center;
    padding: 15px 0;
}

header img {
    height: 100px;
    transition: transform 0.3s;
}
header img:hover { transform: scale(1.05); }

.logshop{
    float: right;
    position: relative;
    top: 40px;
}

header button{
    background-color: var(--boys-dark);
    font-size: 16px;
    text-transform: uppercase;
    border-radius: 15px;
    flex-direction: column;
    justify-content: space-between;
    right: 5%;
    top: 5%;
    width: 140px;
    height: 30px;
    object-fit: cover;
    border: 2px solid #333;
    transition: 0.4s;

}

header button:hover{
    border-color: var(--boys-red);
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(245, 197, 24, 0.2);
}

header button a{
    color: var(--text-color);
    font-weight: bold;
}

nav {
    background-color: var(--boys-dark);
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

.menu {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.menu > li {
    position: relative;
    padding: 15px 20px;
    font-family: var(--font-head);
    text-transform: uppercase;
    color: white;
    cursor: pointer;
}

.menu > li:hover { color: var(--boys-red); }
.menu > li > a { color: inherit; }

/* Sous-menu */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: black;
    border: 1px solid var(--boys-red);
    min-width: 180px;
    z-index: 200;
}

.menu > li:hover .submenu { display: block; }

.submenu li { padding: 10px; border-bottom: 1px solid #333; }
.submenu li:hover { background-color: var(--boys-red); }
.submenu li:hover a { color: black; }
.submenu a { color: #ccc; display: block; font-family: var(--font-body); font-weight: bold; }

/* =========================================
   Le main
   ========================================= */
main {

    max-width: 1100px;
    margin: 40px auto;
    padding: 30px;
    background-color: rgba(30, 30, 30, 0.6);
    border: 1px solid #333;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);

}
/*=======================
Page de personnage
=========================
*/
.personnage {
    display: grid;
    grid-template-columns: repeat(3, 33.3%);
    grid-template-rows: 15% 35% 25% 25%;
    grid-template-areas: "title title title "
                         "texte texte aside"
                         "texte texte aside"
                         "texte texte aside";
    column-gap: 10px;

}

.aside{
    border: solid var(--boys-red);
    border-radius: 5px;
    grid-area: aside;
    box-shadow: 1px 1px 5px var(--boys-red);
    
}

.aside img{
    max-width: 100%;
    border-bottom: var(--boys-red) solid 3px;
}
.aside p{
    text-overflow: ellipsis;
    display: inline-block;
    text-align: justify;
    margin: 5px;
    box-sizing: border-box;
    margin-bottom: 10px;
}
.small{
    font-size: 10px;
}

.titrepage {
    font-family: var(--font-head);
    color: var(--boys-red);
    text-transform: uppercase;
    font-size: 3rem;
    text-align: center;
    border-bottom: 2px solid var(--boys-red);
    margin-bottom: 30px;
    text-shadow: 3px 3px 0 #000;
    grid-area: title;
}
.texte {
    grid-area: texte;
}
.texte p {
    text-overflow: ellipsis;
}

h6{
    color: maroon;
    font-weight: bold;
    font-size: medium;
    margin: 5px;
    display: inline;
    text-decoration: underline;
}

h3 {
    font-family: var(--font-head);
    color: white;
    font-size: 1.5rem;
    margin-top: 40px;
    padding-left: 15px;
    border-left: 5px solid var(--boys-red);
    text-transform: uppercase;
    background: linear-gradient(90deg, rgba(179,0,0,0.2), transparent);

}
iframe{
    height: 250px;
    max-width: 100%;
}
p { margin-bottom: 15px; text-align: justify; }

/* Liens dans le texte */
main a { color: var(--boys-red); font-weight: bold; border-bottom: 1px dotted var(--boys-red); transition: 0.3s; }
main a:hover { color: var(--boys-red); border-bottom: 1px solid var(--boys-red); }

/* =========================================
   Galerie des personnages (index)
   ========================================= */
.imglink {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.imglink li {
    flex: 1 1 200px;
    max-width: 300px;
    transition: 0.3s;
}

.imglink img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border: 2px solid #333;
    filter: grayscale(100%);
    transition: 0.4s;
}

.imglink li:hover img {
    filter: grayscale(0%);
    border-color: var(--boys-red);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(245, 197, 24, 0.2);
}

/* =========================================
   Tableau
   ========================================= */
.faction-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.faction-table th { background: var(--boys-red); color: white; padding: 10px; font-family: var(--font-head); }
.faction-table td { border: 1px solid #444; padding: 15px; vertical-align: top; background: rgba(0,0,0,0.3); }

/* =========================================
   Footer
   ========================================= */
footer {
    text-align: center;
    padding: 30px;
    color: #666;
    border-top: 1px solid #333;
    margin-top: 50px;
    font-size: 0.8rem;
}

/* =========================================
   Formulaire de connection
   ========================================= */

form{
    display: block;
    margin-left: 20%;
    margin-right: 20%;
    border: 2px solid var(--boys-red);
    border-radius: 25px;
}

form .legende{
    text-align: center;
    font-size: 18px;
    text-transform: uppercase;
    color: var(--boys-red-);
}

form .label{
    position: relative;
    left: 30%;
}
form .input{
    position: relative;
    left: 32%;
}

form .submit{
    display: block;
    margin: auto;
    text-align: center;
    background-color: var(--boys-dark);
    font-size: 16px;
    text-transform: uppercase;
    border-radius: 15px;
    width: 140px;
    height: 30px;
    object-fit: cover;
    border: 2px solid #333;
    transition: 0.4s;
    color:var(--text-color);
    font-weight: bold;
}

form .submit:hover{
    border-color: var(--boys-red);
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(245, 197, 24, 0.2);
}

form p{
    display: block;
    margin: auto;
    text-align: center;
}

/* =========================================
   Page du shop
   ========================================= */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
    padding: 20px;
}

.product-card {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.product-card:hover {
    border-color: var(--boys-red);
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-bottom: 2px solid var(--boys-red);
}

.product-info {
    padding: 15px;
}

.product-info h4 {
    font-family: var(--font-head);
    color: var(--boys-yellow);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.product-info .price {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 15px;
}

/* Bouton Indisponible */
.btn-unavailable {
    width: 100%;
    padding: 10px;
    background-color: #222;
    color: #666;
    border: 1px solid #444;
    cursor: not-allowed;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.8rem;
    border-radius: 5px;
}

/* =========================================
   ANIMATION PUB FOOTER
   ========================================= */

.pub-slider {
    width: 100%;
    height: 150px;
    overflow: hidden; 
    background: #000;
    border-top: 2px solid var(--boys-red);
    border-bottom: 2px solid var(--boys-red);
    display: flex;
    align-items: center;
}

.pub-track {
    display: flex;
    width: max-content; 
    animation: scrollPub 10s linear infinite; 
}

/* ARRET AU SURVOL */
.pub-track:hover {
    animation-play-state: paused;
}

.pub-track a {
    display: block; 
}

.pub-track img {
    height: 120px;   
    width: auto;       
    max-width: 500px;  
    object-fit: contain; 
    filter: grayscale(20%);
    transition: 0.3s;
}

.pub-track img:hover {
    filter: grayscale(0%);
    transform: scale(1.02); 
}

/* L'ANIMATION FLUIDE */
@keyframes scrollPub {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); 
    }
}

/*=================
      FORMAT TELEPHONE
==================*/




@media screen and (max-width: 447px){
    /*Les images permettant d'accéder au personnages en colone*/
    .imglink{
        flex-direction: column;
        align-items: center;
    }

    /* décalage du logo à gauche*/
    header{
        text-align: left;
    }
    /*Changement mettant l'Aside au dessus */
    .personnage{
        grid-template-columns: 100%;
        grid-template-rows: auto auto auto;
        grid-template-areas: "title"
                             "aside"
                             "texte";
    }
    .titrepage{
        border: none;
    }
    nav li{
        padding: 10px;
        text-align: center;
    }
    form .input{
        position: relative;
        left: 5%;
        width: 80%;
    }
    form .label{
        left: 5%;
        width: 100%;
    }
    .menu >li {
        font-size: 11px;
    }
    
    header button{

    font-size: 14px;
    width: 100px;
    height: 25px;
    }
    .titrepage{
        font-size: 40px;
    }
    
}



/*============
 Format tablette portrait
 =============*/
@media (min-width: 447px) and (max-width: 768px) {
    .personnage{
        grid-template-columns: 34% 33% 33%;
        grid-template-rows: 7% auto auto;
        grid-template-areas: "title title title"
                             "aside aside aside"
                             "texte texte texte";
        
    }
    header{
        text-align: left;
    }
    .titrepage{
        border: none;
    }
    .menu >li {
        font-size: 13.9px;
    }
    nav li{
        padding: 10px;
        text-align: center;
    }
   
}