/**
 * OGEBO - CSS Principal
 * Design luxe et élégant pour la plateforme publique
 */

/* Cacher le footer sur la page détail produit */
body.page-products-detail footer,
body.page-products-detail .footer,
body.page-products-detail .site-footer {
    display: none !important;
}

/* Supprimer l'espace entre le header et la barre de domaines */
body.page-products .main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.page-products .section {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.page-products .domain-filter-bar {
    margin-top: 0 !important;
    padding-top: 0.5rem !important;
}

/* Supprimer l'espace entre la navbar et la bannière hero sur la page home */
body.page-home .main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.page-home .hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.page-home .section:first-child {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* === VARIABLES CSS === */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #d4af37;
    --accent-color: #8b7355;
    /* Variables RGB pour compatibilité */
    --primary-rgb: 26, 26, 26;
    --secondary-rgb: 212, 175, 55;
    --accent-rgb: 139, 115, 85;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #111827;
    --border-color: #e2e8f0;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 24px 48px -8px rgba(0, 0, 0, 0.18);
    --shadow-colored: 0 8px 24px -4px rgba(var(--secondary-rgb), 0.25);
}

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === CONTAINER === */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 0.75rem;
}

/* === NAVBAR === */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar-brand .logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.navbar-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.navbar-actions {
    display: flex;
    gap: 1rem;
}

/* Bouton Panier */
.btn-cart {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--primary-color);
    position: relative;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cart .cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.btn-search {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--primary-color);
}

/* === HERO SECTION === */
.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    color: white;
    margin-top: 0;
    padding-top: 0;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.4));
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 700px;
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff !important;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.45);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(26, 26, 26, 0.15);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 26, 26, 0.25);
}

.btn-secondary:active {
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    box-shadow: 0 2px 10px rgba(26, 26, 26, 0.08);
}

.btn-outline:hover {
    background: #1a1a1a;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 26, 26, 0.25);
}

.btn-outline:active {
    transform: translateY(-1px);
}

/* Bouton accent/doré */
.btn-accent {
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
    color: #000000 !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-accent:hover {
    background: linear-gradient(135deg, #d4af37 0%, #b8960c 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* Bouton succès */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Bouton danger */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-lg {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
    border-radius: 14px;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    border-radius: 10px;
}

.btn-block {
    width: 100%;
    display: flex;
}

/* Bouton désactivé */
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn:disabled::before,
.btn.disabled::before {
    display: none;
}

/* === SECTIONS === */
.section {
    padding: 5rem 0;
}

/* Page home - ajuster le padding de la première section (hero) */
body.page-home .main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.page-home .section:first-child {
    padding: 0 !important;
    margin: 0 !important;
}

body.page-home .hero {
    margin: 0 !important;
    padding: 0 !important;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

/* === PRODUCT GRID === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns, 4), 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.product-card-link {
    display: block;
}

.product-card-image {
    position: relative;
    padding-top: 125%;
    overflow: hidden;
    background: var(--bg-secondary);
}

.product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    right: 1rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 16px;
    z-index: 1;
}

.badge-new {
    background: var(--secondary-color);
    color: white;
    top: 1rem;
    right: 1rem;
}

.badge-promo,
.badge-sale {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    bottom: 0.5rem;
    right: 0.5rem;
}

/* Responsive pour grands écrans */
@media (min-width: 1200px) {
    .badge-new {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .badge-promo,
    .badge-sale {
        bottom: 1rem;
        right: 1rem;
    }
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .badge-new {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .badge-promo,
    .badge-sale {
        bottom: 0.5rem;
        right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .badge-new {
        top: 0.25rem;
        right: 0.25rem;
    }
    
    .badge-promo,
    .badge-sale {
        bottom: 0.25rem;
        right: 0.25rem;
    }
}

.badge-promo-label {
    font-size: 0.7rem;
    font-weight: 700;
    font-weight: 800;
    letter-spacing: 0.5px;
    opacity: 0.95;
    text-transform: uppercase;
}

.badge-promo-value {
    font-size: 0.85rem;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    letter-spacing: 0.3px;
}

.product-card-body {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.product-creator {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-original {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.75rem;
}

.price-current {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* === CREATOR GRID === */
.creator-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns, 3), 1fr);
    gap: 2rem;
}

/* Masquer le 4ème créateur sur desktop UNIQUEMENT sur la page d'accueil (afficher 3) */
.page-home .creator-grid .creator-card:nth-child(4) {
    display: none;
}

/* Sur mobile, afficher les 4 créateurs sur la page d'accueil */
@media (max-width: 768px) {
    .page-home .creator-grid .creator-card:nth-child(4) {
        display: block;
    }
}

.creator-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.creator-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.creator-card-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: var(--bg-secondary);
}

 .creator-image-stat {
     position: absolute;
     z-index: 2;
     font-size: 0.75rem;
     font-weight: 700;
     line-height: 1;
     padding: 0.35rem 0.55rem;
     border-radius: 999px;
     color: white;
     background: rgba(26, 26, 26, 0.65);
     border: 1px solid rgba(255, 255, 255, 0.25);
     backdrop-filter: blur(6px);
 }

 .creator-image-stat-products {
     top: 0.75rem;
     left: 0.75rem;
 }

 .creator-image-stat-views {
     right: 0.75rem;
     bottom: 0.75rem;
 }

 [data-theme="dark"] .creator-image-stat {
     background: rgba(15, 23, 42, 0.65);
     border-color: rgba(255, 255, 255, 0.18);
 }

.creator-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.creator-card-body {
    padding: 1.5rem;
    text-align: center;
}

.creator-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.creator-specialty {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.creator-location {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.creator-stats {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.creator-stats .stat {
    text-align: center;
}

/* === FOOTER === */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.footer-heading {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* === ALERTS === */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde047;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.alert-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0.5;
}

.alert-close:hover {
    opacity: 1;
}

/* === PAGINATION === */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--bg-secondary);
}

.page-link.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

/* === UTILITY CLASSES === */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1.5rem; }
.d-none { display: none; }
