/* ===========================================
   RESPONSIVE MOBILE - ALL PAGES
   Amélioration du responsive < 576px
   =========================================== */

@media (max-width: 768px) {
    th.hide-mobile, td.hide-mobile {
        display: none !important;
    }

    .hide-on-tablet {
        display: none !important;
    }

    .cart-img {
        width: 50px !important;
        height: 50px !important;
    }

    table.table {
        font-size: 0.85rem;
    }

    td.ps-4, th.ps-4 {
        padding-left: 0.5rem !important;
    }

    td.pe-4, th.pe-4 {
        padding-right: 0.5rem !important;
    }

    .py-4 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .col-lg-8, .col-lg-6, .col-lg-4 {
        padding: 0.5rem !important;
    }

    .container {
        padding: 0 1rem !important;
    }
}

@media (max-width: 576px) {
    /* === LAYOUT === */
    .col-lg-8, .col-lg-4, .col-lg-6 {
        margin-bottom: 1.5rem;
        padding: 0 !important;
    }

    .row {
        gap: 1rem !important;
    }

    .card {
        padding: 1rem !important;
        margin-bottom: 1.5rem !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    }

    .container {
        padding: 0 1rem !important;
    }

    /* === TYPOGRAPHY === */
    body {
        font-size: 16px !important;
    }

    .collection-header h1 {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem !important;
    }

    .collection-header p {
        font-size: 0.95rem !important;
        margin-top: 0.5rem !important;
    }

    h1 {
        font-size: 1.8rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3, h4, h5, h6 {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
    }

    p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 0.75rem !important;
    }

    /* === CONTRAST === */
    .text-muted {
        color: #666 !important;
    }

    .text-dark {
        color: #333 !important;
    }

    small {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        color: #555 !important;
    }

    /* === SECTIONS === */
    .d-flex.justify-content-between {
        margin-bottom: 1rem !important;
        padding: 0.75rem 0 !important;
        align-items: center !important;
    }

    .border-bottom {
        margin-bottom: 1rem !important;
    }

    /* === WORD WRAPPING === */
    p, span, div {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* === ICONS === */
    .bi {
        margin-right: 0.5rem !important;
        font-size: 1.2rem !important;
    }

    /* === EMPHASIS === */
    .fw-bold {
        font-weight: 700 !important;
        color: var(--color-burgundy) !important;
    }

    /* === LISTS === */
    ul, ol {
        margin-left: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    li {
        margin-bottom: 0.75rem !important;
        line-height: 1.6 !important;
    }

    /* === FORMS === */
    .form-label {
        margin-bottom: 0.5rem !important;
        font-weight: 600 !important;
        color: var(--color-burgundy) !important;
    }

    .form-control {
        padding: 0.75rem !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        line-height: 1.5 !important;
    }

    .form-control:focus {
        font-size: 16px !important;
    }

    /* === IMAGES === */
    img {
        max-width: 100% !important;
        margin-bottom: 0.5rem !important;
    }

    /* === TABLES === */
    table.table {
        display: block;
        width: 100%;
    }

    table thead {
        display: none;
    }

    table tbody {
        display: block;
    }

    table tr {
        display: block;
        border-bottom: 2px solid #f0f0f0;
        padding: 1rem;
        margin-bottom: 1rem;
        background: #fff;
        border-radius: 8px;
        position: relative;
    }

    table td {
        display: block;
        text-align: right;
        padding: 0.5rem 0 !important;
        border: none;
    }

    table td:first-child {
        text-align: left;
        padding-bottom: 0.75rem !important;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid #f0f0f0;
    }

    table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--color-burgundy);
        font-size: 0.85rem;
        margin-right: 0.5rem;
    }

    table td:first-child::before {
        content: "";
    }

    /* === BUTTONS === */
    .btn-sm {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.9rem !important;
        min-height: 44px !important;
        min-width: 44px !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-lg, .btn-primary {
        padding: 0.75rem 1.5rem !important;
        font-size: 1rem !important;
        min-height: 50px !important;
        border-radius: 25px !important;
        color: white !important;
    }

    /* Login/Register button */
    .btn.rounded-pill {
        color: white !important;
    }

    a.btn {
        color: white !important;
    }

    .heart-btn, .btn-link {
        min-width: 50px !important;
        min-height: 50px !important;
        font-size: 1.3rem !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-outline-secondary, .btn-outline-primary {
        padding: 0.65rem 1.2rem !important;
        font-size: 0.95rem !important;
        min-height: 48px !important;
    }

    /* === BURGUNDY BUTTONS - TEXT MUST BE WHITE === */
    [style*="background-color: #38111C"],
    [style*="background-color:#38111C"],
    [style*="background: #38111C"],
    [style*="#38111C"] {
        color: white !important;
    }

    .btn-custom,
    .btn-category-highlight,
    .btn-primary {
        color: white !important;
    }

    button[style*="#38111C"],
    a[style*="#38111C"],
    .btn[style*="#38111C"] {
        color: white !important;
    }

    /* Ensure all text within burgundy elements is white */
    [style*="background-color: #38111C"] *,
    [style*="background-color:#38111C"] *,
    [style*="background: #38111C"] *,
    .btn-custom *,
    .btn-category-highlight * {
        color: white !important;
    }

    /* === SPACING UTILITIES === */
    .gap-2 {
        gap: 1rem !important;
    }

    .gap-3 {
        gap: 1.5rem !important;
    }

    /* === CARD BODY === */
    .card-body {
        padding: 1.5rem !important;
        line-height: 1.6 !important;
    }

    /* === LISTS === */
    .list-group-item {
        padding: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* === SECTIONS === */
    section {
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        padding: 0 !important;
    }

    /* === HERO SECTION === */
    .hero-banner {
        margin: 0 !important;
        padding: 0.25rem 0 !important;
        min-height: auto !important;
    }

    .container-fluid.py-2 {
        padding: 0.5rem 0 !important;
        margin: 0 !important;
    }

    /* === REDUCE EXCESSIVE SPACING === */
    .py-5 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    .mb-5 {
        margin-bottom: 0.25rem !important;
    }

    .py-4 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    .mb-4 {
        margin-bottom: 0.25rem !important;
    }

    .py-3 {
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
    }

    .my-5 {
        margin-top: 0.25rem !important;
        margin-bottom: 0.25rem !important;
    }

    .gap-5, .gap-4 {
        gap: 0.5rem !important;
    }

    .g-5 {
        gap: 0.25rem !important;
    }

    .g-4 {
        gap: 0.25rem !important;
    }

    /* Container padding */
    .container {
        padding: 0 1rem !important;
    }

    .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* === SECTION HEADERS === */
    .bestsellers-header {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .bestsellers-title {
        margin-bottom: 0.25rem !important;
    }

    .bestsellers-section {
        padding: 0 !important;
    }

    /* === VALUE ITEMS (Authentique, Essentiel, Soigné) === */
    .d-flex.justify-content-end.align-items-center.gap-4 {
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: flex-end !important;
    }

    .value-item {
        padding: 0.5rem 0 !important;
        margin: 0 !important;
    }

    .value-icon-circle {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }

    .value-label {
        font-size: 0.75rem !important;
        margin-top: 0.25rem !important;
    }

    /* === MODALS === */
    .modal-body {
        padding: 1.5rem !important;
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    .modal-dialog {
        margin: 1rem !important;
    }

    /* === NAVBARS === */
    .navbar {
        padding: 0.75rem 1rem !important;
    }

    .navbar-brand {
        font-size: 1.2rem !important;
    }

    .nav-icon-btn {
        font-size: 1.3rem !important;
        margin-left: 1rem !important;
    }

    /* === BREADCRUMBS === */
    .breadcrumb {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
    }

    /* === ALERTS === */
    .alert {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        font-size: 0.95rem !important;
    }

    /* === PAGINATION === */
    .pagination {
        gap: 0.5rem !important;
    }

    .pagination .page-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem !important;
    }

    /* === BADGES === */
    .badge {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
    }

    /* === SHADOWS === */
    .shadow-sm {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }

    /* === BORDERS === */
    .border-radius-md {
        border-radius: 8px !important;
    }

    /* === GRID === */
    .grid {
        gap: 1rem !important;
    }

    /* === FOOTER === */
    footer {
        margin-top: 2rem !important;
        padding: 0 !important;
    }

    /* === FOOTER REASSURANCE BAR === */
    .footer-reassurance-bar {
        padding: 12px 0 !important;
        margin-bottom: 1.5rem !important;
    }

    .footer-reassurance-bar .row {
        row-gap: 0 !important;
        margin: 0 !important;
    }

    .footer-reassurance-bar .col-6 {
        border-end: none !important;
        border-bottom: 1px solid #d4e8e2 !important;
        padding: 10px 0 !important;
        flex-basis: 50% !important;
    }

    .footer-reassurance-bar .col-6:nth-child(3),
    .footer-reassurance-bar .col-6:nth-child(4) {
        border-bottom: none !important;
    }

    .reassurance-item {
        flex-direction: column !important;
        gap: 4px !important;
        font-size: 0.7rem !important;
        font-weight: 600 !important;
    }

    .reassurance-item i {
        font-size: 1.1rem !important;
        color: #38111C !important;
    }

    /* === SOCIAL STRIP === */
    .social-strip {
        padding: 0.8rem 0 !important;
    }

    .social-strip .container {
        padding: 0 !important;
    }

    .social-icon-link {
        margin: 0 0.5rem !important;
        font-size: 1.3rem !important;
    }

    /* === MAIN FOOTER === */
    .main-footer {
        padding: 1.5rem 0 1rem 0 !important;
    }

    .main-footer .container {
        padding: 0 0.5rem !important;
    }

    .footer-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.3rem !important;
        margin-bottom: 0.75rem !important;
        padding: 0 !important;
    }

    .footer-col {
        padding: 0 !important;
        min-width: 0 !important;
    }

    .footer-title {
        font-size: 0.6rem !important;
        margin-bottom: 0.2rem !important;
        text-align: center !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        letter-spacing: -0.3px !important;
    }

    .footer-links {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: center !important;
    }

    .footer-links li {
        margin-bottom: 0.15rem !important;
    }

    .footer-links a {
        font-size: 0.55rem !important;
        display: inline !important;
        white-space: nowrap !important;
        color: #5a1e2d !important;
        letter-spacing: -0.2px !important;
    }

    .contact-box {
        padding: 0.2rem 0.25rem !important;
        font-size: 0.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.2rem !important;
        border: 1px solid #d0d0d0 !important;
        border-radius: 3px !important;
    }

    .contact-box i {
        font-size: 0.7rem !important;
        flex-shrink: 0 !important;
        min-width: 0.7rem !important;
    }

    .contact-info {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.15rem !important;
        align-items: center !important;
    }

    .contact-info h5 {
        font-size: 0.5rem !important;
        margin: 0 !important;
        font-weight: 600 !important;
        letter-spacing: -0.25px !important;
        white-space: nowrap !important;
    }

    .contact-info span {
        font-size: 0.5rem !important;
        margin: 0 !important;
        letter-spacing: -0.25px !important;
        white-space: nowrap !important;
    }

    .footer-service {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.1rem !important;
        padding: 0.1rem !important;
        border: 1px solid #d0d0d0 !important;
        border-radius: 2px !important;
        font-size: 0.46rem !important;
    }

    .footer-service i {
        font-size: 0.58rem !important;
        flex-shrink: 0 !important;
    }

    .service-text {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.06rem !important;
        align-items: center !important;
        white-space: nowrap !important;
    }

    .service-text div {
        margin: 0 !important;
        padding: 0 !important;
        font-size: 0.46rem !important;
        letter-spacing: -0.3px !important;
    }

    /* === PRO MOBILE FOOTER - FULL WIDTH === */
    .main-footer {
        padding: 0 !important;
        margin: 0 !important;
    }

    .main-footer .container-fluid {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .footer-mobile-pro {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .footer-section {
        padding: 1.2rem 1rem !important;
        border-right: 1px solid rgba(56, 17, 28, 0.1) !important;
        border-bottom: 1px solid rgba(56, 17, 28, 0.1) !important;
    }

    .footer-section:nth-child(2n) {
        border-right: none !important;
    }

    .footer-section:nth-child(n+3) {
        border-bottom: none !important;
    }

    .footer-title {
        font-size: 0.8rem !important;
        margin-bottom: 0.6rem !important;
        text-align: center !important;
        font-weight: 700 !important;
        color: var(--color-burgundy) !important;
        letter-spacing: 0.5px !important;
    }

    .footer-links {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.4rem !important;
        text-align: center !important;
    }

    .footer-links a {
        font-size: 0.72rem !important;
        color: #5a1e2d !important;
        text-decoration: none !important;
        transition: color 0.2s !important;
    }

    .footer-links a:active {
        color: var(--color-burgundy) !important;
        font-weight: 600 !important;
    }

    .service-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.6rem !important;
        padding: 0.8rem !important;
        background: linear-gradient(135deg, #38111C 0%, #5a1e2d 100%) !important;
        border-radius: 0 !important;
        color: white !important;
        text-align: center !important;
        height: 100% !important;
    }

    .service-card i {
        font-size: 1.4rem !important;
        color: white !important;
    }

    .service-details {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.2rem !important;
    }

    .service-details > div:first-child {
        font-size: 0.75rem !important;
        opacity: 0.9 !important;
    }

    .service-details a {
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        color: white !important;
        text-decoration: none !important;
    }

    .footer-copyright {
        width: 100% !important;
        text-align: center !important;
        padding: 0.8rem 1rem !important;
        border-top: 1px solid rgba(56, 17, 28, 0.1) !important;
        font-size: 0.65rem !important;
        background: rgba(56, 17, 28, 0.02) !important;
    }

    .footer-copyright p {
        margin: 0.2rem 0 !important;
        color: #999 !important;
    }

    .footer-copyright a {
        color: var(--color-burgundy) !important;
        text-decoration: none !important;
        font-weight: 600 !important;
    }

    .footer-title {
        font-size: 0.85rem !important;
        margin-bottom: 0.6rem !important;
        text-align: center !important;
    }

    .footer-links {
        text-align: center !important;
    }

    .footer-links a {
        font-size: 0.75rem !important;
    }

    .contact-box {
        padding: 10px !important;
        font-size: 0.8rem !important;
    }

    .contact-box h5 {
        font-size: 0.85rem !important;
    }

    .phone-number {
        font-size: 0.9rem !important;
    }
}

/* === EXTRA SMALL PHONES (< 360px) === */
@media (max-width: 360px) {
    .collection-header h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.3rem !important;
    }

    h3 {
        font-size: 1rem !important;
    }

    p {
        font-size: 0.9rem !important;
    }

    .card {
        padding: 0.75rem !important;
    }

    table tr {
        padding: 0.75rem !important;
    }

    .btn-sm {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }

    .btn-lg {
        padding: 0.65rem 1.2rem !important;
    }
}
