/* ================================
   Caviar Style — Design System
   ================================ */

:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-muted: #666666;
    --color-border: #e5e5e5;
    --color-accent: #c9a96e;
    --color-accent-dark: #a8864d;
    --color-success: #22c55e;
    --color-danger: #ef4444;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
}

.cart-btn {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    color: var(--color-text);
    padding: 8px;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--color-accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 120px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201,169,110,0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 40px;
    font-weight: 300;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* Sections */
section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
}

.text-center {
    text-align: center;
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 10px 24px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-text-muted);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

/* Product Card */
.product-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-image {
    width: 100%;
    height: 380px;
    background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

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

.product-image-placeholder {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #d4d4d4;
    font-weight: 700;
}

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-homme { background: #dbeafe; color: #1e40af; }
.badge-femme { background: #fce7f3; color: #9d174d; }
.badge-unisexe { background: #f3f4f6; color: #374151; }
.badge-traditionnel { background: #fef3c7; color: #92400e; }
.badge-accessoires { background: #d1fae5; color: #065f46; }

.product-info {
    padding: 24px;
}

.product-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
}

.product-stock {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 100px;
    font-weight: 500;
}

.stock-ok { background: #dcfce7; color: #166534; }
.stock-low { background: #fef3c7; color: #92400e; }
.stock-out { background: #fee2e2; color: #991b1b; }

.product-sizes {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.size-option {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--color-surface);
    color: var(--color-text);
}

.size-option:hover {
    border-color: var(--color-text);
}

.size-option.selected {
    background: var(--color-text);
    color: white;
    border-color: var(--color-text);
}

.size-option:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* À propos */
.apropos {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.apropos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.apropos-content p {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.apropos-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.apropos-list li {
    font-size: 1rem;
    color: var(--color-text);
}

.apropos-visual {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.visual-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.visual-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 8px;
}

.visual-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.contact-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-card strong {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
}

.contact-card span {
    font-size: 1rem;
    color: var(--color-text);
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--color-text);
    color: rgba(255,255,255,0.6);
    padding: 32px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Cart Panel */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 200;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 201;
    display: flex;
    flex-direction: column;
}

.cart-panel.open {
    transform: translateX(0);
}

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

.cart-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
    line-height: 1;
}

.cart-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.cart-empty {
    text-align: center;
    color: var(--color-text-muted);
    margin-top: 40px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: var(--color-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

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

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

.cart-item-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-variant {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 4px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text);
    border-radius: 4px;
}

.qty-btn:hover {
    background: var(--color-bg);
}

.cart-item-price {
    font-weight: 600;
    margin-left: auto;
}

.cart-remove {
    background: none;
    border: none;
    color: var(--color-danger);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-text);
    color: white;
    padding: 14px 28px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 300;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ================================
   Pages internes
   ================================ */

.page-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 100px 24px 60px;
    text-align: center;
}

.page-hero-small {
    padding: 80px 24px 40px;
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 12px;
}

.page-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}

/* Contact page */
.contact-section {
    padding: 60px 0 80px;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: start;
}

.contact-form-wrapper {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 40px;
}

.contact-form .btn {
    margin-top: 8px;
}

.contact-info-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px;
}

.info-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.info-card p {
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 4px;
}

.info-card span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Legal page */
.legal-section {
    padding: 60px 0 80px;
}

.legal-container {
    max-width: 800px;
}

.legal-block {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
}

.legal-block h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--color-text);
}

.legal-block h3 {
    font-size: 1.1rem;
    margin: 20px 0 10px;
    color: var(--color-text);
}

.legal-block p {
    color: var(--color-text-muted);
    margin-bottom: 10px;
    line-height: 1.7;
}

/* Checkout */
.checkout-section {
    padding: 40px 0 80px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.checkout-block {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
}

.checkout-block h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.payment-option:hover {
    border-color: var(--color-text);
}

.payment-option input {
    accent-color: var(--color-accent);
    width: 18px;
    height: 18px;
}

.payment-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-icons {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-label input {
    margin-top: 4px;
    accent-color: var(--color-accent);
}

.checkbox-label a {
    color: var(--color-accent-dark);
    text-decoration: underline;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

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

.checkout-summary {
    position: sticky;
    top: 96px;
}

.summary-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 16px;
}

.summary-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
}

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

.summary-item-qty {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.summary-item-name small {
    color: var(--color-text-muted);
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.summary-line strong {
    color: var(--color-text);
    font-weight: 600;
}

.summary-total {
    border-top: 2px solid var(--color-border);
    margin-top: 8px;
    padding-top: 16px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
}

.summary-total strong {
    font-size: 1.3rem;
    color: var(--color-accent-dark);
}

.summary-trust {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.summary-trust p {
    margin-bottom: 8px;
}

.empty-checkout {
    text-align: center;
    color: var(--color-text-muted);
    padding: 20px 0;
}

.empty-checkout a {
    color: var(--color-accent-dark);
    text-decoration: underline;
}

/* Product detail */
.product-detail-section {
    padding: 40px 0 80px;
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--color-text);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.product-detail-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
    aspect-ratio: 3/4;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-detail-info {
    padding-top: 16px;
}

.product-detail-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.product-detail-desc {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-detail-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin: 24px 0 12px;
}

.product-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.product-detail-features {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.product-detail-features h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.product-detail-features ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-detail-features li {
    color: var(--color-text-muted);
}

.product-not-found {
    text-align: center;
    padding: 80px 24px;
}

.product-not-found h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.product-not-found p {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav { display: none; }
    .hero { padding: 80px 24px; }
    .apropos-grid { grid-template-columns: 1fr; gap: 40px; }
    .apropos-visual { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: 1fr; }
    .cart-panel { max-width: 100%; }
    
    .contact-layout { grid-template-columns: 1fr; }
    .checkout-layout { grid-template-columns: 1fr; }
    .product-detail-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .checkout-summary { position: static; }
}
