/* Variables globales */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-gray: #f5f6fa;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --success-color: #2ecc71;
    --warning-color: #f1c40f;
    --pending-color: #3498db;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
}

.site-footer {
    background: linear-gradient(to right, #2c3e50, #0056b3);
    color: #fff;
    padding: 30px 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-middle {
    text-align: center;
}

/* Header Styles */
.main-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: static;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.cart-link {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: var(--white);
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 50%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url('https://images.unsplash.com/photo-1522065893269-6fd20f6d7438?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Section Articles */
.articles-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* Filtres */
.filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    background-color: var(--white);
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn-filter:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Grille d'articles */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
}

.article-item {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-item h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.article-item a {
    text-decoration: none;
    color: inherit;
}

.article-item p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.prix-barre {
    text-decoration: line-through;
    color: #999;
}

.prix-promo {
    color: var(--accent-color);
    font-weight: bold;
}

.nouveau-label {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.login-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .article-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .filters {
        flex-direction: column;
        align-items: center;
    }

    .btn-filter {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }
}

/* Styles communs */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 40px;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

/* Formulaires */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.form-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-error {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Panier */
.cart-container {
    max-width: 1000px;
    margin: 0 auto;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-details h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.cart-item-price {
    font-weight: 600;
    color: var(--accent-color);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: var(--light-gray);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.cart-summary {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Style général du tableau de bord */
.dashboard {
    max-width: 1200px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
}

/* Titre de la page */
.titre-page h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
}

/* Conteneur des cartes */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 30px;
}

/* Carte */
.card {
    background: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
    flex: 1 1 250px;
    /* S'adapte à la largeur des écrans */
}

/* Titre de la carte */
.card h2 {
    font-size: 24px;
    font-weight: 500;
    color: #444;
    margin-bottom: 10px;
}

/* Description de la carte */
.card p {
    color: #777;
    font-size: 16px;
    margin-bottom: 20px;
}

/* Bouton de la carte */
.card button {
    background: linear-gradient(to right, #007bff, #0056b3);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.card button:hover {
    background: linear-gradient(to right, #0056b3, #003366);
    transform: translateY(-3px);
}

/* Effet de survol sur la carte */
.card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Media queries pour mobile et petits écrans */
@media (max-width: 1024px) {
    .container {
        justify-content: space-evenly;
    }

    .card {
        width: 280px;
        /* Un peu plus large pour les tablettes */
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
        /* Carte pleine largeur sur mobile */
        margin: 15px 0;
    }

    .titre-page h2 {
        font-size: 26px;
        /* Plus petit titre sur mobile */
    }
}

@media (max-width: 480px) {
    .card h2 {
        font-size: 20px;
        /* Réduction du titre pour petits écrans */
    }

    .card p {
        font-size: 14px;
        /* Réduction de la description */
    }

    .card button {
        padding: 10px 14px;
        font-size: 14px;
        /* Bouton plus petit sur mobile */
    }
}

.corps-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.titre-page {
    text-align: center;
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
}

.lien-creation {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.lien-creation:hover {
    background: #0056b3;
}

.tableau-articles {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.entete-tableau {
    background: #007bff;
    color: white;
    padding: 10px;
    text-align: left;
}

.ligne-tableau:nth-child(even) {
    background: #f9f9f9;
}

.cellule-tableau {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.lien-article {
    color: #28a745;
    text-decoration: none;
    font-weight: bold;
}

.lien-article:hover {
    text-decoration: underline;
}

.lien-supprimer {
    color: #dc3545;
    text-decoration: none;
    font-weight: bold;
}

.lien-supprimer:hover {
    text-decoration: underline;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    margin: 10px 0;
    border-left: 5px solid #28a745;
    border-radius: 5px;
}


/* Style général de la page d'informations */
.info-page-body {
    background: linear-gradient(to bottom, white, white);
    color: #333;
    margin: 0;
    padding: 40px 40px;
}

/* Conteneur principal */
.info-page-container {
    max-width: 800px;
    margin: auto;
    background-color: #fff;
    border-radius: 25px;
    padding: 50px 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Titre de la page */
.info-page-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 40px;
}

/* Formulaire */
.info-page-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Labels */
.info-page-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

/* Champs */
.info-page-input,
.info-page-textarea {
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background-color: #fafafa;
    width: 100%;
    transition: border 0.3s ease;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.05);
}

.info-page-input:focus,
.info-page-textarea:focus {
    outline: none;
    border-color: #4e8ef7;
}

/* Bouton principal */
.info-page-button {
    background: linear-gradient(to right, #4e8ef7, #7aa9ff);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    align-self: center;
    box-shadow: 0 6px 12px rgba(78, 142, 247, 0.2);
    transition: background 0.3s ease, transform 0.2s ease;
}

.info-page-button:hover {
    background: linear-gradient(to right, #3a76e0, #5e94ff);
    transform: translateY(-2px);
}

/* Style de la table */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.user-table th,
.user-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.user-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.user-table td {
    background-color: #fafafa;
}

.user-table tr:hover {
    background-color: #f1f1f1;
}

/* Bouton Modifier */
.btn-update {
    background-color: #4e8ef7;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-update:hover {
    background-color: #3a76e0;
}

/* Bouton Supprimer */
.btn-delete {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.btn-delete:hover {
    background-color: #c0392b;
    transform: scale(1.05);
}

.user-page-input {
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background-color: #fafafa;
    width: 50%;
    transition: border 0.3s ease;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Style général du formulaire */
form {
    max-width: 600px;
    margin: auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Titre du formulaire */
form h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 20px;
}

/* Labels */
form label {
    font-weight: 500;
    color: #555;
    display: block;
    margin-bottom: 8px;
}

/* Champs de saisie */
form input[type="text"],
form input[type="password"],
form select {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 14px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background-color: #fafafa;
    transition: border 0.3s ease;
}

form input[type="text"]:focus,
form input[type="password"]:focus,
form select:focus {
    outline: none;
    border-color: #4e8ef7;
}

/* Bouton de soumission */
form button {
    background: linear-gradient(to right, #4e8ef7, #7aa9ff);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    width: 100%;
}

form button:hover {
    background: linear-gradient(to right, #3a76e0, #5e94ff);
    transform: translateY(-2px);
}

/* Style des messages de succès/erreur */
.alert-success {
    padding: 15px;
    margin: 20px 0;
    background-color: #d4edda;
    color: #155724;
    border-radius: 8px;
    font-weight: bold;
}

.alert-error {
    padding: 15px;
    margin: 20px 0;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 8px;
    font-weight: bold;
}