/*
 Theme Name:   Divi Child
 Theme URI:    https://jamtoly.com
 Description:  Th&egrave;me enfant pour Divi - jamtoly.com
 Author:       Jamtoly
 Author URI:   https://jamtoly.com
 Template:     Divi
 Version:      1.0.0
 Text Domain:  divi-child
*/

/* =============================================
   Panier Divi (#et-secondary-menu) visible sur mobile/tablette
   Tel + email a gauche, panier a droite — un seul panier partout
   ============================================= */

/* Mobile/tablette : rendre #et-secondary-menu visible (Divi le cache) */
@media (max-width: 980px) {
    #top-header #et-secondary-menu {
        display: block !important;
        float: right;
        padding-top: .75em;
    }
    #top-header #et-info {
        float: left;
    }
    /* Cacher le menu secondaire sauf le panier */
    #top-header #et-secondary-menu > ul,
    #top-header #et-secondary-menu .et_duplicate_social_icons {
        display: none !important;
    }
    /* Panier — meme taille que tel/email */
    #top-header .et-cart-info {
        font-size: inherit;
        margin-left: 0;
    }
}

/* Mobile petit : centrer tout */
@media (max-width: 767px) {
    #top-header #et-info,
    #top-header #et-secondary-menu {
        float: none;
        text-align: center;
    }
}

/* =============================================
   Footer personnalise JAMTOLY
   ============================================= */

/* Masquer les widgets footer Divi par defaut */
#main-footer #footer-widgets {
    display: none !important;
}

/* Conteneur principal */
#main-footer .jmtl-footer {
    background: #0e0a33;
    color: #ccc;
    padding: 50px 0 30px;
    font-size: 14px;
    line-height: 1.8;
    overflow: hidden;
}

#main-footer .jmtl-footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 40px;
    justify-content: space-between;
}

/* Colonnes */
#main-footer .jmtl-footer-col {
    flex: 1;
    min-width: 0;
    float: none !important;
    width: auto !important;
    display: block;
}

#main-footer .jmtl-footer-col h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #be773a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#main-footer .jmtl-footer-col ul {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

#main-footer .jmtl-footer-col ul li {
    display: block !important;
    float: none !important;
    margin-bottom: 6px;
    padding-left: 0 !important;
}

#main-footer .jmtl-footer-col ul li::before {
    display: none !important;
}

#main-footer .jmtl-footer-col ul li a {
    color: #ccc !important;
    text-decoration: none;
    transition: color 0.2s;
}

#main-footer .jmtl-footer-col ul li a:hover {
    color: #be773a !important;
}

/* Colonne carte — carré aligné sur la largeur du titre */
#main-footer .jmtl-footer-col-map {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.jmtl-map-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* carré : hauteur = largeur */
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.1);
    box-sizing: border-box;
}

#jmtl-footer-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Marqueur personnalise */
.jmtl-map-marker span {
    display: block;
    width: 12px;
    height: 12px;
    background: #be773a;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 6px rgba(226, 176, 74, 0.6);
}

/* Tooltip carte */
.jmtl-map-tooltip {
    background: rgba(26, 26, 46, 0.9) !important;
    color: #fff !important;
    border: 1px solid #be773a !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    padding: 2px 8px !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
}

.jmtl-map-tooltip::before {
    border-right-color: #be773a !important;
}

/* Bottom bar Divi - adapter au footer sombre */
#footer-bottom {
    background: #141425;
}

/* Responsive : tablette + mobile (a partir de 980px) */
@media (max-width: 980px) {
    #main-footer .jmtl-footer-inner {
        flex-wrap: wrap !important;
        padding: 0 20px;
        box-sizing: border-box;
    }
    #main-footer .jmtl-footer-col {
        flex: 1 1 45% !important;
        margin-bottom: 30px;
        max-width: 100%;
        box-sizing: border-box;
    }
    #main-footer .jmtl-footer-col-map {
        flex: 1 1 45% !important;
        overflow: hidden;
        box-sizing: border-box;
    }
    .jmtl-map-wrap {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    .jmtl-map-tooltip {
        font-size: 9px !important;
        max-width: 100px !important;
        white-space: normal !important;
    }
}

/* Responsive : mobile petit */
@media (max-width: 767px) {
    #main-footer .jmtl-footer {
        padding: 30px 0 20px;
    }
    #main-footer .jmtl-footer-inner {
        flex-direction: column !important;
        gap: 25px;
        padding: 0 15px;
    }
    #main-footer .jmtl-footer-col {
        flex: 1 1 100% !important;
        margin-bottom: 0;
    }
}
