@import 
url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');
:root {
    --error-color: #dc3545; 
    --success-color: #28a745; 
    --warning-color: #ffc107; 
}
 
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
} 
 
 
body { 
    padding-top: 150px;
    font-family: 'Open Sans', sans-serif; 
    font-size: 16px; 
    background-color: #f4f4f4; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    margin: 0; 
} 
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #333;
    color: white;
    z-index: 1000;
}

header .logo {
    cursor: pointer;
    display: flex;
    align-items: center;
}

header .logo img {
    height: 100px;
    margin-right: 10px;
}
header nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

header nav ul li a:hover {
    text-decoration: overline;
}

header .search-bar {
    display: flex;
    align-items: center;
}
.dropdown-list {
            display: none;
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            top: 100px;
            width: auto;
            background-color: white;
            color: black;
            border: 1px solid #ccc;
            border-radius: 5px;
            box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
            list-style: none;
            padding: 10px;
            z-index: 1000;
        }

header .search-bar input {
    padding: 5px;
    font-size: 16px;
    border: none;
    border-radius: 5px 0 0 5px;
}

header .search-bar button {
    padding: 6px 10px;
    border: none;
    background-color: #555;
    color: white;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

header .search-bar button:hover {
    background-color: #777;
}
 
.container { 
    background-color: #fff; 
    padding: 1em; 
    border-radius: 5px; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); 
    width: 400px; 
}
.form { 
    padding: 10px 20px; 
} 
 
.form h1 { 
    font-size: 1.5em; 
    text-align: center; 
    margin-bottom: 20px; 
 
} 
 
.form-field { 
    margin-bottom: 5px; 
 
} 
 
.form-field label { 
    display: block; 
    color: #777; 
    margin-bottom: 5px; 
} 
 
.form-field input { 
    border: solid 2px #f0f0f0; 
    border-radius: 3px; 
    padding: 10px; 
    margin-bottom: 5px; 
    font-size: 14px; 
    display: block; 
    width: 100%; 
} 
 
.form-field input:focus { 
    outline: none; 
} 
 
.form-field.error input { 
    border-color: var(--error-color); 
} 
 
.form-field.success input { 
    border-color: var(--success-color); 
} 
 
 
.form-field small { 
    color: var(--error-color); 
} 
 
 
/* button */ 
.btn { 
    width: 100%; 
    padding: 3%; 
    background: #007bff; 
    border-bottom: 2px solid #007bff; 
    border-top-style: none; 
    border-right-style: none; 
    border-left-style: none; 
    color: #fff; 
    text-transform: uppercase; 
} 
 
.btn:hover { 
    background: #0069d9; 
    cursor: pointer; 
} 
 
.btn:focus { 
    outline: none; 
}
/*Mise en forme nom et mail dans affichage.html*/
#nom {
    border: 1 px solid #007bff;
    color: white;
    background: #28a745;
    border-radius: 5px;
    width: 100px;
    text-align: center;
}
#mail{
    margin: 10px 0;
    border: 1 px solid #007bff;
    color: white;
    background: #5ea06d;
    border-radius: 5px;
    width: 170px;
    text-align: center;
}
/*Réglage p et a dans formulaire.html*/
p {
    text-align: center;
}
a {
    text-decoration: none;
}
/*Page product*/
h3 {
    color : rgb(99, 142, 99);
}
.card {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    border: 1px solid gray;
}
#cart {
    width: auto;
    top: 0; 
    left: 0; 
    margin: 15px; 
    padding: 20px; 
    background-color: #f9f9f9; 
    border: 1px solid #ccc; 
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); 
}
.card-body { /* Cors des produits*/
    margin-bottom: 5px;
    border-radius: 5px;
}
h4, span {
    font-size: 25px;
}
/*Message de bienvenue*/
#welcome-message {
    margin: 20px;
    font-size: 1.2em;
    background: gray;
    color: white;
}
#cart-items { /* Puces dans le Panier*/
    margin-left: 20px;
}
/* Footer */
footer {
    margin-top: 35%;
    background: #333; 
    width: 100%;
    bottom: 0; 
    left: 0; 
    display: flex; 
    align-items: center; 
    justify-content: space-around; 
    padding: 50px; 
    color: white;
}
footer div {
    display: flex; 
    align-items: center;
}
footer img {
    width: 50px; 
    height: 50px;
    margin-right: 10px;
}
footer p {
    margin: 0;
}
@media screen and (min-width: 600px) and (max-width: 1024px) { /* Styles pour les tablettes */
    header {
        width: 100%;
        margin-bottom: 10px;
        display: flex;
        justify-content: space-around;
        align-items: center;
        background-color: #333;
        color: white;
    }
    
    header .logo {
        cursor: pointer;
        display: flex;
        align-items: center;
    }
    
    header .logo img {
        height: 60px;
        margin-right: 10px;
    }
     header .search-bar {
        display: flex;
        align-items: center;
    }
    
    header .search-bar input {
        border: none;
        border-radius: 5px;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        width: 65px;
    }
    header .search-bar input:focus {
        font-size: 22px;
        width: 250px;
        height: 50px;
        border: 2px solid #007bff;
        outline: none;
        transform: translateX(-225px); /* Déplace vers la gauche */
        position: absolute;
    }
    header .search-bar button {
        display: none;
    }
    .container { 
        background-color: #fff; 
        padding: 1em; 
        border-radius: 5px; 
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); 
        width: auto; 
    }
    #cart {
        height: auto;
    }
    .dropdown-list {
        width: 100%;
        height: auto;
        top: 85px;
    }
    footer {
        margin-top: 100%;
    }
}
@media screen and (max-width: 600px) {  /* Styles pour les mobiles */
    header {
        width: 100%;
        margin-bottom: 10px;
        display: flex;
        justify-content: space-around;
        align-items: center;
        background-color: #333;
        color: white;
    }
    
    header .logo {
        cursor: pointer;
        display: flex;
        align-items: center;
    }
    
    header .logo img {
        height: 30px;
        width: 30px;
    }
    .container { 
        background-color: #fff; 
        padding: 1em; 
        border-radius: 5px; 
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); 
        width: auto; 
    }
    header nav ul li {
        margin: 0 5px;
    }
    header .search-bar {
        display: flex;
        align-items: center;
    }
    
    header .search-bar input {
        font-size: 6px;
        border: 2px solid #007bff;
        border-radius: 5px;
        width: 40px;
    }
    header .search-bar input:focus {
        font-size: 18px;
        width: 180px;
        height: 45px;
        border: 2px solid #007bff;
        outline: none;
        transform: translateX(-160px); /* Déplace vers la gauche */
        position: absolute;
    }
    
    header .search-bar button {
        display: none;
    }
    h1 {
        font-size: 10px;
        width: auto;
    }
    #cart {
        height: auto;
        width: 100%;
    }
    .dropdown-list {
        width: 100%;
        height: auto;
        top: 50px;
    }
     footer {
        height: 50px;
        padding: 10px;
        bottom: 0; 
        left: 0;
        margin-top: 100%;
    }
    footer img {
        width: 40px;
        height: 40px;
    }
    footer p {
        font-size: 15px;
    }
}