/* Variables CSS personnalisées */
:root {
    --primary-color: #009595;
    --secondary-color: #009f9f;
    --accent-color: #009595;
    --text-dark: #2c1810;
    --text-light: #6c5b47;
    --background-light: #faf8f5;
    --white: #FFFFFF;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

/* Polices personnalisées */
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Couleurs Bootstrap personnalisées */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #5D2F09;
    border-color: #5D2F09;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Navigation */
.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
}

.brand-text {
    color: var(--primary-color);
    margin-left: 0.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    min-height: 60vh;
}

.min-vh-50 {
    min-height: 50vh;
}

/* Cards et composants */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-radius: 0.75rem;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.card-header {
    background-color: var(--background-light);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Produits */
.product-card {
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card .card-img-top {
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Boutons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

/* Formulaires */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Alertes */
.alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Features boxes */
.feature-box {
    text-align: center;
    transition: transform 0.3s ease;
    border-radius: 1rem;
}

.feature-box:hover {
    transform: translateY(-10px);
}

.feature-box i {
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: #d8d0cd !important;
}

footer h5,
footer h6 {
    color: var(--accent-color);
}

footer a {
    color: #adb5bd;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
    color: var(--white) !important;
    transform: translateY(-3px);
}

/* Panier */
.cart-item {
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.cart-item:hover {
    background-color: var(--background-light);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loader */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive */
@media (max-width: 991px) {

    /* Navigation mobile améliorée */
    .navbar-brand {
        flex: 1;
        max-width: calc(100% - 100px);
    }

    .navbar-brand img {
        height: 40px;
    }

    .brand-text {
        font-size: 0.9rem;
        display: inline-block;
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
    }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        padding: 1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid #eee;
    }

    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background: #f8f9fa;
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Grille produits mobile */
    .product-card {
        margin-bottom: 1rem;
    }

    .product-card .card-img-top {
        height: 200px;
        object-fit: cover;
    }

    /* Panier mobile */
    .cart-item {
        flex-direction: column;
        text-align: center;
    }

    .cart-item img {
        margin-bottom: 1rem;
    }

    /* Tables responsive */
    .table-responsive {
        font-size: 0.875rem;
    }

    /* Footer mobile */
    footer .col-md-4,
    footer .col-md-3 {
        text-align: center;
        margin-bottom: 2rem;
    }

    footer .social-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .hero-section {
        padding: 3rem 0;
        min-height: 40vh;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        width: 100%;
    }

    /* Logo et marque très petit écran */
    .brand-text {
        display: none;
    }

    .navbar-brand img {
        height: 35px;
    }

    /* Boutons tactiles plus grands */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Espacement formulaires */
    .form-control,
    .form-select {
        font-size: 16px;
        /* Évite le zoom sur iOS/Android */
        padding: 0.875rem 1rem;
    }

    /* Cards pleine largeur */
    .card {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }

    .container .card {
        margin-left: 0;
        margin-right: 0;
        border-radius: 0.75rem;
    }

    /* Produit détail mobile */
    .product-detail-img {
        max-height: 300px;
        object-fit: contain;
    }

    /* Quantité input */
    input[type="number"] {
        width: 100%;
        text-align: center;
    }

    /* Feature boxes mobile */
    .feature-box {
        margin-bottom: 2rem;
    }

    .feature-box i {
        font-size: 2.5rem;
    }

    /* Modal mobile */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }

    /* Pagination mobile */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-link {
        padding: 0.5rem 0.75rem;
    }
}

/* Amélioration touch pour Android */
@media (pointer: coarse) {

    .nav-link,
    .dropdown-item,
    .btn,
    .card {
        -webkit-tap-highlight-color: rgba(0, 149, 149, 0.2);
    }

    .dropdown-item {
        padding: 0.75rem 1rem;
    }

    /* Éviter les problèmes de hover sur touch */
    .product-card:hover {
        transform: none;
    }

    .product-card:active {
        transform: scale(0.98);
    }

    .btn:hover {
        transform: none;
    }

    .btn:active {
        transform: scale(0.95);
    }
}

/* Utilitaires */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.border-radius-lg {
    border-radius: 1rem !important;
}

.border-radius-xl {
    border-radius: 1.5rem !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {

    .navbar,
    .footer,
    .btn,
    .social-links {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}