/* -----------------------------------------------------
   BASE
----------------------------------------------------- */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #ffffff;
    color: #333;
}

main {
    padding: 20px;
}

/* -----------------------------------------------------
   HEADER & MENU DESKTOP
----------------------------------------------------- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
/*    padding: 12px 20px; */
    padding: 8px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: #003366;
}
.logo img {
    display: none;
    height: 40px;
    width: auto; 
}
.logo img.logo-md.light { display: none; }
.logo img.logo-md.dark { display: none; }
.logo.img.light { display: none; }
.logo.img.dark { display: none; }
.hidden { display: none; }

@media (min-width: 1400px) {
    .logo img.logo-xl.light { display: inline; }
}
@media (min-width: 1400px) and  (prefers-color-scheme: dark) {
    .logo img.logo-xl.light { display: none; }
    .logo img.logo-xl.dark { display: inline; }
}

@media (min-width: 1000px) and (max-width: 1399px) {
    .logo img.logo-lg.light { display: inline; }
}
@media (min-width: 1000px) and (max-width: 1399px) and (prefers-color-scheme: dark) {
    .logo img.logo-lg.light { display: none; }
    .logo img.logo-lg.dark { display: inline; }
}

@media (min-width: 800px) and (max-width: 999px) {
    .logo img.logo-md.light { display: inline; }
}
@media (min-width: 800px) and (max-width: 999px) and (prefers-color-scheme: dark) {
    .logo img.logo-md.light { display: none; }
    .logo img.logo-md.dark { display: inline; }
}

@media (min-width: 600px) and (max-width: 799px) {
    .logo img.logo-wide.light { display: inline; }
}
@media (min-width: 600px) and (max-width: 799px) and (prefers-color-scheme: dark) {
    .logo img.logo-wide.light { display: none; }
    .logo img.logo-wide.dark { display: inline; }
}

@media (min-width: 400px) and (max-width: 599px) {
    .logo img.logo-compact.light { display: inline; }
}
@media (min-width: 400px) and (max-width: 599px) and (prefers-color-scheme: dark) {
    .logo img.logo-compact.light { display: none; }
    .logo img.logo-compact.dark { display: inline; }
}

@media (max-width: 320px) and (max-width: 399px) {
    .logo img.logo-sm.light{ display: inline; }
}
@media (max-width: 320px) and (max-width: 399px) and (prefers-color-scheme: dark) {
    .logo img.logo-sm.light { display: none; }
    .logo img.logo-sm.dark { display: inline; }
}

@media (max-width: 280px)  and (max-width: 319px) {
    .logo img.logo-mini.light{ display: inline; }
}
@media (max-width: 280px)  and (max-width: 319px) and (prefers-color-scheme: dark) {
    .logo img.logo-mini.light { display: none; }
    .logo img.logo-mini.dark { display: inline; }
}

@media (max-width: 200px) and (max-width: 279px) {
    .logo img.logo-mini.light{ display: inline; }
}
@media (max-width: 200px)  and (max-width: 279px) and (prefers-color-scheme: dark) {
    .logo img.logo-ss.light { display: none; }
    .logo img.logo-ss.dark { display: inline; }
}

#sous-menu ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}
#sous-menu li {
    display: inline-block;
}
#sous-menu a:hover {
    color: #0077cc;
}

#main-menu ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

#main-menu li {
    display: inline-block;
}

#main-menu a {
    text-decoration: none;
    color: #003366;
    font-weight: bold;
    padding: 8px 5px;
    transition: color 0.2s ease;
}

#main-menu a:hover {
    color: #0077cc;
}

/* -----------------------------------------------------
   HAMBURGER (MOBILE)
----------------------------------------------------- */
.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
    padding: 10px;
}

/* -----------------------------------------------------
   SEARCH FIELD
----------------------------------------------------- */
.search-form {
    position: relative;
}

.search-form input[type="text"] {
    padding: 8px 12px 8px 32px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-form input[type="text"]:focus {
    border-color: #0077cc;
    outline: none;
    box-shadow: 0 0 4px rgba(0, 119, 204, 0.4);
}

.search-form::before {
    content: "🔍";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

/* -----------------------------------------------------
   LANG SELECTOR
----------------------------------------------------- */
.lang-selector select {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-selector select:focus {
    border-color: #0077cc;
    outline: none;
    box-shadow: 0 0 4px rgba(0, 119, 204, 0.4);
}

/* -----------------------------------------------------
   CATALOGUE LISTING
----------------------------------------------------- */
.catalogue {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.produit {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.produit img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.lientitre {
    text-decoration: none;
    font-weight: bold;
	color:  #003366;
}

.btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background: #003366;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}

/* -----------------------------------------------------
   PRODUCT PAGE
----------------------------------------------------- */
.fiche-produit {
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
}

.fiche-container {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.fiche-photo img {
    max-width: 400px;
    border-radius: 6px;
}

.fiche-info {
    flex: 1;
    min-width: 300px;
}

.btn-prix {
    display: inline-block;
    padding: 12px 20px;
    background: #0077cc;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 20px;
    font-weight: 700;
}

.produit-titre {
    background: #e6f0ff; /* bleu pâle */
    padding: 8px 8px;
    border-radius: 6px;
    font-size: 26px;
    font-weight: 700;
    color: #1a3d7c; /* bleu foncé élégant */
    text-align: left;
    letter-spacing: 0.5px;
}
.produit-titre {
    background: linear-gradient(90deg, #dce9ff 0%, #bcd4ff 100%);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 28px;
    font-weight: 700;
    color: #0f2f6b; /* bleu foncé lisible */
    text-align: left;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
@media (max-width: 600px) {
    .product-title {
        font-size: 22px;
        padding: 12px 16px;
    }
}

/* -----------------------------------------------------
   PRODUCT GALLERY
----------------------------------------------------- */
.product-gallery {
    max-width: 600px;
    margin: 0 auto;
}

.product-main-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    touch-action: none;
}

.product-main-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 6px;
    transition: transform 0.2s ease-out;
    transform-origin: center center;
}

@media (hover: hover) {
    .product-main-image:hover img {
        transform: scale(2);
        cursor: zoom-in;
    }
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    justify-content: center;
    flex-wrap: wrap;
    -webkit-overflow-scrolling: touch;
}

.product-thumbnails::-webkit-scrollbar {
    display: none;
}

.product-thumbnails img {
    flex: 0 0 auto;
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    padding: 4px;
}

.product-thumbnails img:hover {
    border-color: #888;
}

.product-thumbnails img.active {
    border-color: #333;
}

/* -----------------------------------------------------
   SPECS TABLE
----------------------------------------------------- */

.diff {
    background: #fff3cd;
    font-weight: 700;
}

/* -----------------------------------------------------
   BREADCRUMB
----------------------------------------------------- */
.breadcrumb {
    margin: 20px 0;
    font-size: 14px;
}

.breadcrumb a {
    color: #0073aa;
    text-decoration: none;
}

.breadcrumb span {
    font-weight: 700;
}

/* -----------------------------------------------------
   RESPONSIVE
----------------------------------------------------- */
@media (max-width: 900px) {
    .product-main-image img {
        max-width: 400px;
    }
}

@media (max-width: 800px) {
    .hamburger {
        display: block;
    }

    #main-menu {
        display: none;
        position: absolute;
        top: 60px;
        right: 10px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 10px;
        width: 200px;
    }

    #main-menu.open {
        display: block;
    }

    #main-menu ul {
        display: block;
    }

    #main-menu li {
        margin: 10px 0;
    }

    .search-form input[type="text"],
    .lang-selector select {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 600px) {
    .product-main-image img {
        max-width: 100%;
    }
}

/* -----------------------------------------------------
   DARK MODE
----------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #e5e5e5;
    }

    header {
        background: #1e1e1e;
        border-color: #333;
    }

    .logo {
        color: #fff;
    }

    #main-menu {
        background: #1e1e1e;
        border-color: #333;
    }

    #main-menu a {
        color: #ddd;
    }

    .hamburger {
        color: #fff;
    }

    .search-form input[type="text"] {
        background: #2a2a2a;
        color: #eee;
        border: 1px solid #444;
    }

    .search-form input[type="text"]:focus {
        border-color: #4da3ff;
        box-shadow: 0 0 4px rgba(77, 163, 255, 0.4);
    }

    .lang-selector select {
        background: #2a2a2a;
        color: #eee;
        border: 1px solid #444;
    }

    .lang-selector select option {
        background: #2a2a2a;
        color: #eee;
    }

    .produit,
    .fiche-produit,
    .product-gallery,
    .specs-table,
    .breadcrumb {
        background: #1e1e1e;
        color: #e5e5e5;
        border-color: #333;
    }

    .product-thumbnails img.active {
        border-color: #4da3ff;
    }

    .spec-group {
        color: #fff;
    }

    .spec-name {
        color: #ddd;
    }

    .spec-value {
        color: #bbb;
    }

    .diff {
        background-color: #4d3f00;
    }
}

.bloc-photos-large {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
}

.bloc-photos-large-main img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.bloc-photos-large-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.thumb-large {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.thumb-large:hover {
    opacity: 1;
}

#zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

#zoom-overlay img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/**********************************************/
/*** catalogues ***/

/* Conteneur */
.tree {
    margin-top: 20px;
    padding-left: 5px;
}

.tree-item {
    margin-bottom: 12px;
}

.tree-line {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 6px;
    transition: background .15s;
}

.tree-line:hover {
    background: rgba(0,0,0,0.05);
}

.arrow {
    font-size: 14px;
    transition: transform .2s;
}

.icon {
    font-size: 18px;
}

.tree-title {
    font-size: 17px;
    color: #222;
    text-decoration: none;
}

.tree-title:hover {
    text-decoration: underline;
}

.count {
    font-size: 13px;
    color: #666;
}

.tree-children {
    margin-left: 32px;
    margin-top: 6px;
    display: none;
}

.tree-sub {
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sub-connector {
    color: #888;
}

/* Barre de recherche */
.tree-search {
    margin: 15px 0;
}

.tree-search input {
    width: 100%;
    max-width: 400px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* Badges */
.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 6px;
    font-weight: bold;
}

/* Couleurs par type */
.badge[data-type="nouveau"]   { background: #4caf50; color: #fff; }
.badge[data-type="essentiel"] { background: #2196f3; color: #fff; }
.badge[data-type="populaire"] { background: #9c27b0; color: #fff; }
.badge[data-type="vide"]      { background: #bdbdbd; color: #000; }

/* Highlight recherche */
.tree-line.match,
.tree-sub.match {
    background: rgba(255, 235, 59, 0.25);
}

/* Mode sombre lisible */
@media (prefers-color-scheme: dark) {
    .aska-main {
        color: #e6e6e6;
    }

    .breadcrumb {
        color: #bbb;
    }

    .breadcrumb a {
        color: #4ea9ff;
    }

    .tree-line:hover {
        background: rgba(255,255,255,0.10);
    }

    .tree-title {
        color: #f5f5f5;
    }

    .tree-title:hover {
        color: #ffffff;
    }

    .icon {
        color: #f5f5f5;
    }

    .count {
        color: #cccccc;
    }

    .sub-connector {
        color: #999;
    }

    .tree-sub a {
        color: #e0e0e0;
    }

    .tree-sub a:hover {
        color: #ffffff;
    }

    .tree-search input {
        background: #111;
        border-color: #444;
        color: #eee;
    }
}

