@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
:root {
    --primary-bg-color: #f86403; --primary-bg-color-hover: #a74600;  --primary-bg-color-clair: #f8c8a9; 
    --primary-color: #f86403; --primary-color-hover: #a74600; --text-color: #666666;
    --form-border-defaut: #e4e5e7; --form-bg-defaut: #ffffff; --form-border-focus: #141a1f; --form-bg-focus: #fafafb;
}
/* CSS POUR ADAPTATION BETHEME */
html{height:auto !important;}
html .the_content_wrapper{margin:0; width:100%;}

.icon_fa::before {padding-right: 8px; display: inline-block; font-style: normal; font-variant: normal; text-rendering: auto; -webkit-font-smoothing: antialiased; font-family: "Font Awesome 5 Free"; font-weight: 900;}

.pct-app h1, .pct-app h2, .pct-app h3, .pct-app h4, .pct-app h5, .pct-app h6{font-family:"Inter", sans-serif; margin:0px 0 15px; font-weight: 600;}
.pct-app p, .pct-app a, .pct-app div, .pct-app span, .pct-app ul, .pct-app li, .pct-app ol{font-family:"Inter", sans-serif; font-size: 13px; font-weight: 400; color: var(--text-color);}

.the_content_wrapper .pct-app h1{font-size: 25px; font-weight: 600;}
.the_content_wrapper .pct-app h2{font-size: 22px; font-weight: 600;}
.the_content_wrapper .pct-app h3{font-size: 16px; font-weight: 600;}


/* Layout général */
.the_content_wrapper .pct-app {
    display: flex;
    /*min-height: 100vh;
    background: #f9f3f8;*/
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Sidebar */
.the_content_wrapper .pct-sidebar {
    position: fixed;          /* FIXE à l'écran */
    top: 0;
    left: 0;
    width: 220px;
    height: 92vh;            /* toute la hauteur de la fenêtre */

    background: linear-gradient(180deg, #f86403 0%, #a74600 100%);
    color: #ffffff;

    display: flex;
    flex-direction: column;

    padding: 6vh 12px 2vh;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
    z-index: 1000;            /* pour passer devant le contenu si besoin */
}

/* Marque */
.the_content_wrapper .pct-sidebar__brand {
    /* display: flex;*/
    align-items: center;
    margin-bottom: 24px;
    padding: 8px 10px;
    gap: 10px;
}

.the_content_wrapper .pct-sidebar__logo {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    margin: 0 auto 10px;
}
.the_content_wrapper .pct-sidebar__logo img {width: 90px; height: auto;}

.the_content_wrapper .pct-sidebar__brand-text {
    display: flex;
    flex-direction: column;
}

.the_content_wrapper .pct-sidebar__brand-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

.the_content_wrapper .pct-sidebar__brand-sub {
    font-size: 11px;
    opacity: 0.8;
    text-align: center;
    color: #fff;
}

/* Nav */
.the_content_wrapper .pct-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
}

.the_content_wrapper .pct-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    color: #e3f5ff;
    opacity: 0.85;
    transition: background 0.15s ease, opacity 0.15s ease, transform 0.05s ease;
}

.the_content_wrapper .pct-nav-item__icon {
    width: 22px;
    display: flex;
    justify-content: center;
}

.the_content_wrapper .pct-nav-item__label {
    flex: 1;
}

/* État actif */
.the_content_wrapper .pct-nav-item.is-active {
    background: rgba(255, 255, 255, 0.16);
    opacity: 1;
}

.the_content_wrapper .pct-nav-item:hover {
    background: rgba(255, 255, 255, 0.10);
    opacity: 1;
    transform: translateX(1px);
}

/* Version compacte */
.the_content_wrapper .pct-nav-item--small {
    font-size: 12px;
    margin-top: 4px;
}

/* Footer sidebar (user + paramètres) */
.the_content_wrapper .pct-sidebar__footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.the_content_wrapper .pct-sidebar__user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.10);
    color: inherit;
    cursor: pointer;
    text-align: left;
}
.the_content_wrapper .pct-sidebar__user:hover{background: rgba(255, 255, 255, 0.10)}

.the_content_wrapper .pct-sidebar__user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color-hover);
}

.the_content_wrapper .pct-sidebar__user-infos {
    display: flex;
    flex-direction: column;
}

.the_content_wrapper .pct-sidebar__user-name {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.the_content_wrapper .pct-sidebar__user-role {
    font-size: 11px;
    opacity: 0.8;
    color: #fff;
}

/* Zone principale */
.the_content_wrapper .pct-main {
    flex: 1;
    padding: 0;
    margin-left: 244px;
}

/* Tu peux ajuster ça si ton tableau a déjà sa largeur max */
.the_content_wrapper .pct-main > *:first-child {
    max-width: 100%;
}

@media (max-width: 900px) {
    .the_content_wrapper .pct-app {
        flex-direction: column;
    }
    .the_content_wrapper .pct-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 8px 12px;
        position: static;
    }
    .the_content_wrapper .pct-sidebar__nav {
        flex-direction: row;
        overflow-x: auto;
    }
    .the_content_wrapper .pct-main {
        padding: 16px;
    }
}

/* Reset des ul de menu */
.the_content_wrapper .pct-nav,
.the_content_wrapper .pct-nav-footer {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Éléments de menu principal */
.the_content_wrapper .pct-nav > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    color: #fff7f2;
    opacity: 0.85;
    transition: background 0.15s ease, opacity 0.15s ease, transform 0.05s ease;
}

.the_content_wrapper .pct-nav-footer > li::before{display: none;}

.the_content_wrapper .pct-nav > li > a > span{color: #fff7f2;}
/* .pct-nav > li > a.icon_fa::before {padding-right: 8px; display: inline-block; font-style: normal; font-variant: normal; text-rendering: auto; -webkit-font-smoothing: antialiased; font-family: "Font Awesome 5 Free"; font-weight: 900;}*/
.the_content_wrapper .pct-nav > li > a::before , .the_content_wrapper .pct-nav-footer > li > a::before, .the_content_wrapper .pct-flyout-title > a::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900; /* Solid */
    display: inline-block;
    width: 22px;
    margin-right: 8px;
    text-align: center;
    font-size: 15px;
}

/* Active (= page actuelle) */
.the_content_wrapper .pct-nav > li.current-menu-item > a/*,
.the_content_wrapper .pct-nav > li.current-page-ancestor > a*/ {
    background: rgba(255, 255, 255, 0.20);
    opacity: 1;
}

.the_content_wrapper .pct-nav > li > a:hover {
    background: rgba(255, 255, 255, 0.12);
    opacity: 1;
    transform: translateX(1px);
}

/* Menu footer, plus compact */
.the_content_wrapper .pct-nav-footer > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    color: #fff7f2;
    opacity: 0.85;
    text-decoration: none;
}
.the_content_wrapper .pct-nav-footer > li > a > span {color: #fff7f2;}

/* Dashboard */
.the_content_wrapper .pct-nav > li.icon-dashboard > a::before, .the_content_wrapper .pct-flyout-title.icon-dashboard > a::before {
    content: "\f015"; /* fa-house */
}

/* Projets */
.the_content_wrapper .pct-nav > li.icon-livraison > a::before, .the_content_wrapper .pct-flyout-title.icon-livraison > a::before {
    content: "\f0d1"; /* fa-truck */
}

/* Devis */
.the_content_wrapper .pct-nav > li.icon-metiers > a::before, .the_content_wrapper .pct-flyout-title.icon-metiers > a::before {
    content: "\f2e7"; /* fa-utensils */
}

/* Clients */
.the_content_wrapper .pct-nav > li.icon-clients > a::before, .the_content_wrapper .pct-flyout-title.icon-clients > a::before {
    content: "\f0c0"; /* fa-users */
}

/* Paramètres */
.the_content_wrapper .pct-nav > li.icon-settings > a::before, .the_content_wrapper .pct-flyout-title.icon-settings > a::before {
    content: "\f013"; /* fa-gear */
}
/* Déconnexion */
.the_content_wrapper .pct-nav-footer > li.icon-logout > a::before, .the_content_wrapper .pct-flyout-title.icon-logout > a::before {
    content: "\f2f5"; /* fa-right-from-bracket */
}

/* ********************** */
/* Réduction largeur menu */

.the_content_wrapper .pct-sidebar__brand {
    /*display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px; */
    position: relative;
}

.the_content_wrapper .pct-sidebar__toggle {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background:#fff; /* background: rgba(255, 255, 255, 0.14); */
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: -24px;
    top: 36px;
    cursor: pointer;
    padding: 0;
    box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.42);
}
.the_content_wrapper .pct-sidebar__toggle:hover {background:var(--primary-bg-color);}
.the_content_wrapper .pct-sidebar__toggle:focus{outline-style: none;}
.the_content_wrapper .pct-app.pct-collapsed .pct-sidebar__toggle {right:-20px;}

.the_content_wrapper .pct-sidebar__toggle-icon {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: rotate(135deg); /* chevron vers la gauche */
    transition: transform 0.3s ease;
    margin-left:5px;
    margin-right:0px;
}
.the_content_wrapper .pct-app.pct-collapsed .pct-sidebar__toggle-icon{margin-left:0; margin-right:5px;}
.the_content_wrapper .pct-sidebar__toggle:hover .pct-sidebar__toggle-icon{border-color:#fff;}

/* Quand le menu est réduit, on inverse le chevron */
.the_content_wrapper .pct-app.pct-collapsed .pct-sidebar__toggle-icon {
    transform: rotate(-45deg); /* chevron vers la droite */
}

/* Mode réduit */
.the_content_wrapper .pct-app.pct-collapsed .pct-sidebar {
    width: 64px;
    padding: 6vh 8px 2vh;
}

.the_content_wrapper .pct-app.pct-collapsed .pct-main {
    margin-left: 80px;
}

/* On masque les textes, on garde les icônes */
.the_content_wrapper .pct-app.pct-collapsed .pct-sidebar__brand-text,
.the_content_wrapper .pct-app.pct-collapsed .pct-nav > li > a span,
.the_content_wrapper .pct-app.pct-collapsed .pct-sidebar__user-infos,
.the_content_wrapper .pct-app.pct-collapsed .pct-nav-footer > li > a span {
    display: none;
}

/* On centre les icônes dans la colonne */
.the_content_wrapper .pct-app.pct-collapsed .pct-nav > li > a,
.the_content_wrapper .pct-app.pct-collapsed .pct-nav-footer > li > a {
    justify-content: center;
    margin:0;
}
.the_content_wrapper .pct-app.pct-collapsed .pct-nav > li > a::before, .pct-app.pct-collapsed .pct-nav-footer > li > a::before{margin-right: 0;}

/* Avatar et logo légèrement réduits */
.the_content_wrapper .pct-app.pct-collapsed .pct-sidebar__logo {
    margin: 0 auto;
    width: auto;
    height: auto;
    border-radius: 5px;
    padding: 2px;
}
.the_content_wrapper .pct-app.pct-collapsed .pct-sidebar__logo img {max-width: 100%; height: auto;}

.the_content_wrapper .pct-app.pct-collapsed .pct-sidebar__user {
    justify-content: center;
    padding-inline: 0;
}


/* Container des sous-menus */
.the_content_wrapper .pct-nav li.menu-item-has-children > .sub-menu {
    margin-top: 4px;
    margin-left: 24px;
    margin-bottom: 4px;
    padding-left: 10px;
    list-style: none;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.the_content_wrapper .pct-nav .sub-menu > li{margin-bottom: 0;}

/* Liens de sous-menu */
.the_content_wrapper .pct-nav .sub-menu > li > a {
    font-size: 13px;
    margin-left:10px;
    padding: 0px 0;
    color: #fff7f2;
    opacity: 0.8;
    position: relative;
    text-decoration: none;
    display: block;
}
.the_content_wrapper .pct-nav .sub-menu > li > a > span {color: #fff7f2;}

/* Petit bullet au lieu des grosses icônes principales */
.the_content_wrapper .pct-nav .sub-menu > li > a::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
}

/* Hover sous-menu */
.the_content_wrapper .pct-nav .sub-menu > li > a:hover {
    opacity: 1;
}

/* Menu réduit : on cache toute la liste des sous-menus */
.the_content_wrapper .pct-app.pct-collapsed .pct-nav li.menu-item-has-children > .sub-menu {
    display: none;
}

/* Sous-menu actif (page courante) */
.the_content_wrapper .pct-nav .sub-menu > li.current-menu-item > a/*,
.the_content_wrapper .pct-nav .sub-menu > li.current_page_item > a */{
    color: #ffffff;
    font-weight: 600;
    opacity: 1;
}

/* Bullet du sous-menu actif */
.the_content_wrapper .pct-nav .sub-menu > li.current-menu-item > a::before/*,
.the_content_wrapper .pct-nav .sub-menu > li.current_page_item > a::before */{
    background: #ffffff;
}

/* Le parent d'un sous-menu actif est marqué comme "ancestor" par WP */
.the_content_wrapper .pct-nav li.menu-item-has-children.current-menu-ancestor > a/*,
.the_content_wrapper .pct-nav li.menu-item-has-children.current_page_ancestor > a */{
    background: rgba(255, 255, 255, 0.20);  /* même style que tes onglets actifs */
    opacity: 1;
}

/* Le span doit être positionné pour accueillir un ::after */
.the_content_wrapper .pct-nav .sub-menu > li > a .pct-menu-label {
    position: relative;
    display: inline-block;
}

/* Triangle pour le sous-menu actif */
.the_content_wrapper .pct-nav .sub-menu > li.current-menu-item > a .pct-menu-label::after/*,
.the_content_wrapper .pct-nav .sub-menu > li.current_page_item > a .pct-menu-label::after*/ {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    /* Collé juste après le texte */
    left: 100%;
    margin-left: 8px; /* distance texte ↔ flèche */

    /* Triangle */
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid #ffffff;
}

/* Désactiver le tooltip en mode normal */
.the_content_wrapper .pct-app:not(.pct-collapsed) .pct-nav a,
.the_content_wrapper .pct-app:not(.pct-collapsed) .pct-nav-footer a {
    pointer-events: auto;
    position: relative;
}

/* Technique : on masque le title via un pseudo-élément transparent */
.the_content_wrapper .pct-app:not(.pct-collapsed) .pct-nav a[title]::after,
.the_content_wrapper .pct-app:not(.pct-collapsed) .pct-nav-footer a[title]::after {
    content: "";
    position: absolute;
    inset: 0;
}

/* SOUS-MENU EN FLYOUT EN MENU REDUIT */
/* Masquer les sous-menus dans la sidebar réduite */
.the_content_wrapper .pct-app.pct-collapsed .pct-nav li.menu-item-has-children > .sub-menu {
    display: none;
}

/* V3  */
/* --- Structure du flyout --- */
.the_content_wrapper .pct-flyout {
    margin-top: 0;
    position: fixed;
    left: 80px; /* aligné avec menu réduit */
    background: #ffffff;
    color: #333;
    min-width: 200px;
    padding: 0;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.20);
    z-index: 2000;
    display: none;
}

/* --- Titre du flyout (parent cliquable) --- */
.the_content_wrapper .pct-flyout-title {
    font-size: 14px;
    font-weight: 700;
    padding: 0;
    margin: 0;
    background: #f8c8a9;
    border-radius: 0 8px 0 0;
}

.the_content_wrapper .pct-flyout-title a {
    display: block;
    padding: 8px 10px;
    color: var(--primary-color);
    text-decoration: none;
}

/* --- Container des sous-menus --- */
.the_content_wrapper .pct-flyout ul {
    list-style: none;
    margin: 4px 0 4px 24px;
    padding: 0px 0 0px 0px; /* indentation générale */
    border-left: 2px solid #f8c8a9; /* trait vertical */
}

/* --- Liens de sous-menu --- */
.the_content_wrapper .pct-flyout ul li {
    margin: 6px 0;
    padding-left: 20px;
}

.the_content_wrapper .pct-flyout ul li a {
    display: block;
    padding: 4px 0;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    position: relative;
}

/* --- Petit bullet avant chaque sous-menu (comme en mode normal) --- */
.the_content_wrapper .pct-flyout ul li a::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);

    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary-color);
}

/* --- Hover des sous menus --- */
.the_content_wrapper .pct-flyout ul li a:hover, .the_content_wrapper .pct-flyout ul li a:hover span {
    color: var(--primary-color);
}

/* --- Sous-menu actif avec triangle (version flyout) --- */
.the_content_wrapper .pct-flyout ul li.current-menu-item > a/*,
.the_content_wrapper .pct-flyout ul li.current_page_item > a */{
    color: var(--primary-color);
    font-weight: 600;
}

.the_content_wrapper .pct-flyout ul li.current-menu-item > a::after/*,
.the_content_wrapper .pct-flyout ul li.current_page_item > a::after */{
    content: "";
    display: inline-block;
    margin-left: 8px;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid var(--primary-color);
}
