/* Ajoutez ces lignes au début du fichier */
* {
    cookie-same-site: strict;
}

a {
    text-decoration: none;
}

:root {
    --primary-color: #2264d1;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --background-color: #fdfdfd;
    --text-color: #333;
    --light-gray: #f4f4f4;
    --border-color: #e0e0e0;
}
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}
.container { 
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.site-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    max-height: 60px;
}
.logo a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    font-weight: 600;
}
.site-nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
}
.site-nav ul li {
    margin-left: 1.5rem;
}
.site-nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 300;
    transition: color 0.3s ease;
}
.site-nav ul li a:hover {
    color: var(--accent-color);
}
.social-links {
    width: max-content;
}
.social-links a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}
.social-links a:hover {
    color: var(--accent-color);
}
main {
    padding: 1rem 0;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}
.btn:hover {
    background-color: #c0392b;
}



/* accueil */ 
.product-grid .product-info {
    max-width: 100%; /* Limite la largeur à 50% */
    text-align: center;
}


/* Styles pour la page produit */
.product-details {
    display: flex;
    flex-wrap: wrap; /* Permet le retour à la ligne sur les petits écrans */
    justify-content: space-between;
    gap: 2rem;
    margin-top: 2rem;
}

.product-image-container {
    flex: 1;
    max-width: 50%; /* Limite la largeur à 50% */
}

.product-image {
    width: 100%;
    height: auto;
    border-radius: 8px; 
}

.product-info {
    flex: 1;
    max-width: 50%; /* Limite la largeur à 50% */
    padding: 1rem;
        flex-grow: 1;
    overflow: hidden;
}

.product-title {
    font-size: 1.5rem; 
    color: #333;
    margin: 0 0 0.5rem 0;
    line-height: 1.8rem;
}

.product-ref {
    font-size: 1rem;
    color: var(--secondary-color);
    margin: 0rem;
}

.product-description {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.order-box {
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.order-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group select,
.form-group input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.price-info {
    margin-top: 1rem;
    font-weight: 500;
}

.total-price {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-top: 0.5rem;
}

.btn-commander {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background-color: var(--accent-color);
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-commander:hover {
    background-color: #c0392b;
}



/* Styles pour la page produit */
.product-page {
    max-width: 1200px; /* Limite la largeur maximale de la page */
    margin: 0 auto; /* Centre le contenu */
    padding: 20px;
}

.btn-back { 
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--light-gray);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.btn-back:hover {
    background-color: var(--border-color);
}

.btn-back i {
    margin-right: 0.5rem;
}



.status-update-form {
    margin-top: 1rem;
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: 4px;
}

.status-update-form select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    margin-right: 0.5rem;
}

.status-update-form button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.status-update-form button:hover {
    background-color: var(--accent-color);
}

/* Styles pour le formulaire de mise à jour du statut (admin) */
.status-update-form {
    margin-top: 1rem;
}

.status-update-form select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    margin-right: 0.5rem;
}

.status-update-form button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.status-update-form button:hover {
    background-color: var(--accent-color);
}

/* Styles pour les pages d'inscription et de connexion */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-container h1 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.auth-form input[type="text"],
textarea#delivery_address,
.auth-form input[type="email"],
.auth-form input[type="password"] { 
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.auth-form button[type="submit"] {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-form button[type="submit"]:hover {
    background-color: #2980b9;
}

.auth-links {
    margin-top: 1rem;
    text-align: center;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-links a:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}


/****************************************
    COMPONENTS DESIGN   
**************************************/

/* Alerts modernes */
.custom-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 300px;
    max-width: 90%;
    text-align: center;
    animation: alertFadeIn 0.3s ease;
}

.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    animation: overlayFadeIn 0.3s ease;
}

.custom-alert-title {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.custom-alert-message {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.custom-alert-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.custom-alert-button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-alert-button.primary {
    background: var(--primary-color);
    color: white;
}

.custom-alert-button.primary:hover {
    background: #1e56b0;
    transform: translateY(-2px);
}

.custom-alert-button.secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.custom-alert-button.secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

@keyframes alertFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}



/*********** FOOTER ***********/ 
.footer {
    background-color: var(--secondary-color); 
    color: white;
    padding: 0rem 0.3rem;
}


/*********** PRODUCT GRID***********/ 

.product-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* 4 colonnes par défaut (PC) */
        gap: 1rem; 
    }
    .product-card {
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
        transition: box-shadow 0.3s ease;
        display: flex;
        flex-direction: column;
    }
    .product-card:hover {
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    .product-info { 
        flex-grow: 1;
    }
    .product-name {
        margin: 0 0 0.5rem 0;
        font-size: 1.1rem;
        color: #000000;
    font-weight: 600;
    }
    .product-price {
        font-weight: 600;
        color: #3d120d; 
    }
    .btn-commander {
        display: block;
        width: 100%;
        padding: 0.75rem 0;
        background-color: var(--secondary-color);
        color: white;
        text-align: center;
        text-decoration: none;
        font-weight: bold;
        transition: background-color 0.3s ease;
        margin-top: auto;
    }
    .btn-commander:hover {
        background-color: var(--accent-color);
    }
    
    .product-variations {
        margin-top: 10px;
        font-size: 0.9em;
    }

    .product-variations ul {
        list-style-type: none;
        padding-left: 0;
    }

    .product-variations li {
        margin-bottom: 5px;
    }





/****************************************
    PAGES DESIGN   
**************************************/

/***********  PAGE AUTH ***********/ 


/*********** PAGE ACCUEIL ***********/ 
.banner-container {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        margin-bottom: 1rem;
    }
    .banner-image {
        width: 100%;
        height: auto;
        display: block;
    }
    .banner-mobile {
        display: none;
    }
    .shop-presentation { 
        margin: 2rem auto;
        padding: 1rem; 
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .shop-presentation img {
        max-width: 100%;
        height: auto;
    }

/*********** PAGE PRODUIT ***********/ 


/*********** PAGE CONTACT ***********/ 
.contact-container { 
    margin: 0 auto; 
}
.contact-container h2 {
    font-size: 1.5rem;
    color: #333;
    margin: 0 0 0.5rem 0;
    line-height: 1.8rem;
}
.contact-info, .contact-container .map-container {
    margin-bottom: 2rem;
}
.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
}
.contact-container .social-links ul {
    list-style-type: none;
    padding: 0;
}
.contact-container .social-links li {
    margin-bottom: 0.5rem;
}
.contact-container .social-links a {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.contact-container .social-links a:hover {
    color: var(--accent-color);
}
.contact-container .social-links i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/*********** PAGE ORDER DETAILS ***********/ 

.order-details-page {
    margin: 0 auto;
}

.order-details-page h1 {
    line-height: 1.8rem;
}

.order-details-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.order-details-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-details-header h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1rem;
    font-weight: 500;
}

.order-details-body {
    padding: 1rem;
}

.order-details-info p {
    margin: 0.5rem 0;
}

.order-details-status {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}

.order-details-section {
    margin-bottom: 1.5rem;
}

.order-details-section h3 {
    color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}



/****************************************
    Responsive design
**************************************/

@media screen and (max-width: 1200px) {
    .site-header { 
        padding: 0; 
    }

    /* Grid produit */
    .product-card .product-info {
        padding: 0.5rem; 
    }
    .product-card .product-name { 
        font-size: 0.8rem; 
    }
    .product-card .product-price { 
    font-size: 0.7rem;
    }
    .product-card .product-variations { 
        font-size: 0.7em;
    }
}


/* design laptop */
@media (max-width: 1024px) {


    .logo img {
        max-height: 46px;
    }
    .site-nav ul li {
        margin-left: 0.8rem;
    }
    .site-nav ul li a {
        font-size: 16px;
        font-weight: 300;
    }
    .social-links a { 
        margin-left: 0.8rem;
        font-size: 1rem; 
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 colonnes pour tablette */
    }
}

/* design tablette */
@media (max-width: 768px) {


    
    /* page Accueil */
    .banner-pc {
        display: none;
    }
    .banner-mobile {
        display: block;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes pour mobile */
    }

    /* page Contact */
    .contact-container .social-links { 
        display: flex;
        gap: 1.5rem;
        flex-direction: column;
    }   

    /* page Produit */
    .product-details {
        flex-direction: column;
    }
    .product-image-container,
    .product-info {
        flex-basis: 100%;
        max-width: 100%; 
        padding: 0;
    }

    .product-page .product-info { 
        width: 100%; 
    }


}

/* design mobile */
@media (max-width: 480px) {
    
    
}

/* Ajouter dans la section COMPONENTS DESIGN */
.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.lang-btn {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

/* Pour le support RTL en arabe */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .header-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .site-nav ul {
    flex-direction: row-reverse;
}

[dir="rtl"] .site-nav ul li {
    margin-right: 1.5rem;
    margin-left: 0;
}

@media (max-width: 768px) {
    .language-selector {
        margin: 1rem 0;
    }
}