/* Variables CSS communes */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --bg-light: #f9fafb;
    --text-dark: #111827;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Header moderne partagé */
.header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
}

.header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.page-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 20px;
}

/* Container principal */
.main-container {
    max-width: 1400px;
    margin: -40px auto 0;
    padding: 0 20px 40px;
    position: relative;
    z-index: 2;
}

/* Sections communes */
.content-section,
.cart-section {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 30px;
}

.section-header {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-color);
}

/* Boutons principaux */
.btn-primary {
    padding: 16px 32px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-secondary {
    padding: 12px 24px;
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Formulaires */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-help {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 6px;
}

/* Stats info */
.stats-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-item i {
    font-size: 1rem;
    opacity: 0.8;
}

.stat-divider {
    opacity: 0.5;
}

/* Cartes et items */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--border-color);
}

/* Photos section */
.photos-section {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 30px;
}

/* Photos grid */
.photos-grid {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.photo-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    cursor: pointer;
    background: #f3f4f6;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.photo-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s;
}

.photo-card:hover img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.photo-card:hover .photo-overlay {
    background: rgba(0,0,0,0.6);
}

.photo-overlay-content {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.photo-card:hover .photo-overlay-content {
    opacity: 1;
    transform: translateY(0);
}

.photo-icon {
    color: white;
    font-size: 2.5rem;
}

.photo-text {
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

/* Floating cart */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.3s;
}

.floating-cart:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: var(--text-dark);
    color: white;
    padding: 16px 24px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(400px);
    transition: transform 0.3s;
}

.toast.show {
    transform: translateX(0);
}

/* Cart styles */
.cart-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-bottom: 30px;
}

.items-count {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.cart-items {
    padding: 30px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 15px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.item-photo {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
}

.item-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.item-details p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

.item-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: white;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 5px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quantity-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px;
    font-weight: 600;
}

.item-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
}

.remove-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-light);
}

.remove-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: #fee2e2;
}

/* Summary section */
.summary-section {
    position: sticky;
    top: 90px;
}

.summary-content {
    padding: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.summary-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.summary-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

.summary-value {
    font-weight: 600;
    color: var(--text-dark);
}

.summary-total {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.summary-total .summary-row {
    border: none;
    padding: 0;
}

.summary-total .summary-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.summary-total .summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Empty cart */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    width: 120px;
    height: 120px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.empty-icon i {
    font-size: 3rem;
    color: var(--text-light);
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-text {
    color: var(--text-light);
    margin-bottom: 30px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.back-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Checkout styles */
.checkout-container {
    max-width: 1200px;
    margin: -40px auto 0;
    padding: 0 20px 40px;
    position: relative;
    z-index: 2;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.checkout-form-section {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.form-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-title i {
    color: var(--primary-color);
}

.summary-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 90px;
    overflow: hidden;
}

.summary-header {
    background: var(--bg-light);
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
}

.summary-body {
    padding: 30px;
}

.summary-footer {
    background: var(--bg-light);
    padding: 30px;
    border-top: 1px solid var(--border-color);
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-details {
    flex: 1;
}

.order-item-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.order-item-qty {
    font-size: 0.875rem;
    color: var(--text-light);
}

.order-item-price {
    font-weight: 600;
    color: var(--text-dark);
}

.total-section {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 2px solid var(--border-color);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.total-label {
    color: var(--text-light);
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.delivery-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.delivery-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.delivery-info-row:last-child {
    margin-bottom: 0;
}

.delivery-info-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

.delivery-info-value {
    font-weight: 600;
    color: var(--text-dark);
}

.secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.secure-badge i {
    color: #10b981;
}

.alternative-payment {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.alternative-payment-link {
    font-size: 0.875rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.alternative-payment-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.cgv-checkbox {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
}

.cgv-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

.cgv-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cgv-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.cgv-label a:hover {
    text-decoration: underline;
}

/* FAQ Styles */
.faq-container {
    max-width: 1000px;
    margin: -40px auto 50px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.faq-search {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 30px;
    margin-bottom: 30px;
}

.search-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: center;
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.category-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.category-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.faq-content {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.faq-category {
    padding: 30px;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title i {
    color: var(--primary-color);
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    padding: 20px;
    background: white;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-icon {
    transition: transform 0.3s;
    color: var(--primary-color);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer-content {
    padding: 0 20px 20px;
    color: var(--text-light);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.highlight-match {
    background: #fef3c7;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 60px;
    color: var(--text-light);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .header-section {
        padding: 40px 0 30px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .main-container {
        margin-top: -30px;
        padding: 0 15px 30px;
    }
    
    .section-header {
        padding: 20px;
        margin: -30px -30px 20px;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .btn-primary {
        width: 100%;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding: 20px;
    }
    
    .photo-card img {
        height: 200px;
    }
    
    .floating-cart {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .stats-info {
        gap: 15px;
        font-size: 0.9rem;
    }
    
    .cart-content {
        grid-template-columns: 1fr;
    }
    
    .summary-section {
        position: relative;
        top: 0;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }
    
    .item-photo {
        width: 80px;
        height: 80px;
    }
    
    .quantity-controls,
    .item-price,
    .remove-btn {
        grid-column: 2;
    }
    
    .cart-items {
        padding: 20px;
    }
    
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-card {
        position: relative;
        top: 0;
        margin-top: 30px;
    }
    
    .checkout-form-section {
        padding: 30px 20px;
    }
    
    .summary-header,
    .summary-body,
    .summary-footer {
        padding: 20px;
    }
}