/**
 * Maison des Meubles — Design System
 * Palette : taupe clair + blanc
 */

/* ===== TOKENS ===== */
:root {
    --mdm-navy:        #1B2A4A;
    --mdm-navy-dark:   #111827;
    --mdm-navy-light:  #2A3A5A;
    --mdm-gold:        #C8A96E;
    --mdm-gold-light:  #DFB96A;
    --mdm-gold-dark:   #A88B3D;
    --mdm-gold-pale:   #FDF3E1;
    --mdm-dark:        #1A1A1A;
    --mdm-text:        #444444;
    --mdm-muted:       #666666;
    --mdm-border:      #F0EBE2;
    --mdm-bg:          #FFFFFF;
    --mdm-cream:       #F9F6F1;
    --mdm-white:       #FFFFFF;
    --mdm-success:     #25D366;
    --mdm-danger:      #E8523A;

    --mdm-radius:      8px;
    --mdm-radius-lg:   12px;
    --mdm-radius-pill: 50px;
    --mdm-shadow:      0 2px 8px rgba(27, 42, 74, 0.06);
    --mdm-shadow-lg:   0 8px 32px rgba(27, 42, 74, 0.10);

    --mdm-font-heading: 'Cormorant Garamond', Georgia, serif;
    --mdm-font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --mdm-transition:   all 0.2s ease;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--mdm-font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--mdm-text);
    background: var(--mdm-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--mdm-gold-pale);
    color: var(--mdm-navy);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--mdm-font-heading);
    color: var(--mdm-dark);
    line-height: 1.15;
    margin-top: 0;
}

h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; }
h3 { font-size: clamp(22px, 3vw, 32px); font-weight: 600; }
h4 { font-size: 22px; font-weight: 600; }
h5 { font-size: 18px; font-weight: 600; }
h6 { font-size: 16px; font-weight: 600; }

a {
    color: var(--mdm-gold-dark);
    text-decoration: none;
    transition: var(--mdm-transition);
}

a:hover {
    color: var(--mdm-navy);
}

/* ===== LAYOUT ===== */
.mdm-section {
    max-width: 1300px;
    margin: 0 auto;
    padding: 80px 24px;
}

.mdm-section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mdm-gold);
    margin-bottom: 10px;
}

.mdm-section-title {
    font-family: var(--mdm-font-heading);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    color: var(--mdm-dark);
    line-height: 1.1;
}

.mdm-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 48px;
    gap: 24px;
}

/* ===== BUTTONS ===== */
.mdm-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--mdm-gold);
    color: var(--mdm-white);
    padding: 14px 32px;
    border-radius: var(--mdm-radius);
    font-family: var(--mdm-font-body);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    transition: var(--mdm-transition);
    text-decoration: none;
}

.mdm-btn-primary:hover {
    background: var(--mdm-gold-dark);
    color: var(--mdm-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 165, 90, 0.35);
}

.mdm-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--mdm-navy);
    color: var(--mdm-white);
    padding: 14px 32px;
    border-radius: var(--mdm-radius);
    font-family: var(--mdm-font-body);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--mdm-transition);
    text-decoration: none;
}

.mdm-btn-secondary:hover {
    background: var(--mdm-navy-light);
    color: var(--mdm-white);
    transform: translateY(-2px);
}

.mdm-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--mdm-navy);
    padding: 13px 31px;
    border-radius: var(--mdm-radius);
    font-family: var(--mdm-font-body);
    font-size: 15px;
    font-weight: 500;
    border: 1px solid var(--mdm-navy);
    cursor: pointer;
    transition: var(--mdm-transition);
    text-decoration: none;
}

.mdm-btn-outline:hover {
    background: var(--mdm-navy);
    color: var(--mdm-white);
}

.mdm-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--mdm-success);
    color: var(--mdm-white);
    padding: 12px 24px;
    border-radius: var(--mdm-radius-pill);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--mdm-transition);
}

.mdm-btn-whatsapp:hover {
    color: var(--mdm-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
}

/* ===== BADGES ===== */
.mdm-badge-promo {
    display: inline-block;
    background: var(--mdm-danger);
    color: var(--mdm-white);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.mdm-badge-new {
    display: inline-block;
    background: var(--mdm-gold);
    color: var(--mdm-white);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.mdm-badge-cod {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--mdm-gold-pale);
    color: var(--mdm-gold-dark);
    padding: 6px 12px;
    border-radius: var(--mdm-radius);
    font-size: 12px;
    font-weight: 600;
}

/* ===== SEE ALL LINK ===== */
.mdm-see-all {
    color: var(--mdm-gold-dark);
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid var(--mdm-gold);
    padding-bottom: 2px;
    white-space: nowrap;
}

.mdm-see-all:hover {
    color: var(--mdm-navy);
    border-color: var(--mdm-navy);
}

/* ===== CARDS ===== */
.mdm-card {
    background: var(--mdm-white);
    border-radius: var(--mdm-radius-lg);
    overflow: hidden;
    transition: var(--mdm-transition);
}

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

/* ===== HOMEPAGE FULL-WIDTH ===== */
/* Remove Hello Elementor container constraints on full-width pages */
.elementor-location-single .elementor-widget-theme-post-content,
.page-template-elementor_header_footer .entry-content,
.page-template-elementor_header_footer .site-main,
.page-template-elementor_header_footer .page-content,
body.page .site-main > article {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide page title on homepage */
.home .entry-header,
.home .page-header,
.home .entry-title,
body.page-id-12 .entry-title,
body.page-id-12 .entry-header {
    display: none !important;
}

/* Ensure full-bleed sections work */
.page-template-elementor_header_footer .entry-content > section,
.page-template-elementor_header_footer .entry-content > div {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* But keep inner containers max-width */
.page-template-elementor_header_footer .entry-content > section > div[style*="max-width"],
.page-template-elementor_header_footer .entry-content > section > div > div[style*="max-width"] {
    margin-left: auto;
    margin-right: auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .mdm-section {
        padding: 48px 16px;
    }

    .mdm-section-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 32px;
    }

    .mdm-btn-primary,
    .mdm-btn-secondary,
    .mdm-btn-outline {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* ==========================================================================
   DIAPORAMA ACCUEIL — visuels portrait sur mobile
   Le fond du bloc d'accroche (conteneur c952c84) est un diaporama Elementor.
   Sa galerie n'a pas de variante par appareil : les diapos sont construites en
   JavaScript avec l'image paysage en style inline. On substitue donc la version
   portrait sous 767 px, en ciblant chaque image par son NOM DE FICHIER — et non
   par sa position, que Swiper décale en dupliquant les diapos pour la boucle.
   Si une diapo est remplacée dans Elementor, la règle cesse simplement de
   s'appliquer et le paysage reprend : pas de casse, mais pensez à mettre à jour.
   ========================================================================== */
@media (max-width: 767px) {
    .elementor-element-c952c84 .elementor-background-slideshow__slide__image[style*="mdm-diapo-matelas-desktop"] {
        background-image: url("/wp-content/uploads/2026/09/mdm-diapo-matelas-mobile-v2.jpg") !important;
    }
    .elementor-element-c952c84 .elementor-background-slideshow__slide__image[style*="mdm-diapo-lits-desktop"] {
        background-image: url("/wp-content/uploads/2026/09/mdm-diapo-lits-mobile-v2.jpg") !important;
    }
    .elementor-element-c952c84 .elementor-background-slideshow__slide__image[style*="mdm-diapo-meuble-tv-desktop"] {
        background-image: url("/wp-content/uploads/2026/09/mdm-diapo-meuble-tv-mobile-v2.jpg") !important;
    }
}

/* ==========================================================================
   BLOG — images des cartes d'articles (boucles 1284 et 1262, page Blog 1256,
   lien « Actualités » des menus)
   Les visuels à la une sont en 4:3 (800 × 600). Le cadre fixé à 180 px de haut
   les recadrait à environ 2:1 sur toute la largeur d'un téléphone : un tiers de
   l'image disparaissait (effet « zoom »). Sur mobile, le cadre prend le format
   4:3 des visuels : l'image s'affiche entière. Ordinateur inchangé (180 px).
   Le recadrage (cover, centré) est aussi posé ici, et pas seulement dans le CSS
   de boucle généré par Elementor : quand ce fichier manque (flush sans
   régénération), l'image sortait à sa taille naturelle, très zoomée.
   Cible : cadre à fond dynamique d990607 (1284), image 59080dc (1262).
   ========================================================================== */
.e-loop-item .elementor-element-d990607 {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.e-loop-item .elementor-element-59080dc img {
    object-fit: cover;
}
@media (max-width: 767px) {
    .e-loop-item .elementor-element-d990607 {
        aspect-ratio: 4 / 3;
    }
    .e-loop-item .elementor-element-59080dc img {
        height: auto !important;
        aspect-ratio: 4 / 3;
    }
}
