/**
 * Tout Vrai Tout Près - Styles front-office
 *
 * @package TVTP_Core
 * @since   1.0.0
 */

/* ─────────────────────────────────────────────
   Variables CSS globales TVTP
   ───────────────────────────────────────────── */
:root {
    --tvtp-color-primary:    #2e7d32;  /* Vert forêt - couleur principale */
    --tvtp-color-secondary:  #81c784;  /* Vert clair - couleur secondaire */
    --tvtp-color-accent:     #ff8f00;  /* Ambre - couleur d'accent */
    --tvtp-color-text:       #212121;
    --tvtp-color-text-light: #757575;
    --tvtp-color-bg:         #f9f6f0;  /* Fond crème naturel */
    --tvtp-color-white:      #ffffff;
    --tvtp-radius:           8px;
    --tvtp-shadow:           0 2px 8px rgba(0, 0, 0, 0.1);
    --tvtp-transition:       0.25s ease;
}

/* ─────────────────────────────────────────────
   Styles généraux TVTP
   ───────────────────────────────────────────── */

.tvtp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.tvtp-button {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background-color: var(--tvtp-color-primary);
    color: var(--tvtp-color-white);
    border: none;
    border-radius: var(--tvtp-radius);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--tvtp-transition);
}

.tvtp-button:hover,
.tvtp-button:focus {
    background-color: #1b5e20;
    color: var(--tvtp-color-white);
    outline: 2px solid var(--tvtp-color-secondary);
    outline-offset: 2px;
}

.tvtp-button--secondary {
    background-color: var(--tvtp-color-accent);
}

.tvtp-button--secondary:hover,
.tvtp-button--secondary:focus {
    background-color: #e65100;
}

/* ─────────────────────────────────────────────
   Messages de notification
   ───────────────────────────────────────────── */

.tvtp-notice {
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--tvtp-color-primary);
    background-color: #e8f5e9;
    border-radius: 0 var(--tvtp-radius) var(--tvtp-radius) 0;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.tvtp-notice--error {
    border-color: #c62828;
    background-color: #ffebee;
}

.tvtp-notice--warning {
    border-color: var(--tvtp-color-accent);
    background-color: #fff8e1;
}

/* ─────────────────────────────────────────────
   Shortcode [tvtp_relais_map] — Carte et liste
   ───────────────────────────────────────────── */

/* Conteneur global */
.tvtp-relais-map-wrapper {
    display:        flex;
    flex-direction: column;
    gap:            1.5rem;
    margin:         1.5rem 0;
}

/* Élément canvas Google Maps */
.tvtp-relais-map {
    width:         100%;
    border-radius: var(--tvtp-radius);
    overflow:      hidden;
    box-shadow:    var(--tvtp-shadow);
}

/* Message "aucun relais" */
.tvtp-relais-vide {
    text-align:  center;
    color:       var(--tvtp-color-text-light);
    font-style:  italic;
    padding:     2rem;
}

/* ── Liste latérale des relais ─────────────────── */

.tvtp-relais-liste {
    border:        1px solid #e0e0e0;
    border-radius: var(--tvtp-radius);
    background:    var(--tvtp-color-white);
    overflow:      hidden;
    box-shadow:    var(--tvtp-shadow);
}

.tvtp-relais-liste-titre {
    margin:      0;
    padding:     0.85rem 1.25rem;
    font-size:   1rem;
    font-weight: 700;
    color:       var(--tvtp-color-primary);
    border-bottom: 1px solid #e8f5e9;
    background:  #f1f8f1;
}

.tvtp-relais-items {
    list-style: none;
    margin:     0;
    padding:    0;
    max-height: 320px;
    overflow-y: auto;
}

/* Scrollbar personnalisée (navigateurs Webkit) */
.tvtp-relais-items::-webkit-scrollbar {
    width: 5px;
}
.tvtp-relais-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.tvtp-relais-items::-webkit-scrollbar-thumb {
    background: #a5d6a7;
    border-radius: 3px;
}

.tvtp-relais-item {
    display:        flex;
    flex-direction: column;
    gap:            0.2rem;
    padding:        0.75rem 1.25rem;
    border-bottom:  1px solid #f5f5f5;
    cursor:         pointer;
    transition:     background-color var(--tvtp-transition);
}

.tvtp-relais-item:last-child {
    border-bottom: none;
}

.tvtp-relais-item:hover,
.tvtp-relais-item:focus-within {
    background-color: #f1f8f1;
}

.tvtp-relais-item--actif {
    background-color: #e8f5e9 !important;
    border-left:      3px solid var(--tvtp-color-primary);
}

.tvtp-relais-nom {
    display:     block;
    font-weight: 600;
    color:       var(--tvtp-color-text);
    font-size:   0.95rem;
}

.tvtp-relais-adresse,
.tvtp-relais-responsable,
.tvtp-relais-creneaux {
    display:     block;
    font-size:   0.82rem;
    color:       var(--tvtp-color-text-light);
    line-height: 1.4;
}

.tvtp-relais-tel {
    display:     block;
    font-size:   0.82rem;
    color:       var(--tvtp-color-primary);
    font-weight: 500;
}

/* ── InfoWindow Google Maps ─────────────────────── */

.tvtp-infowindow {
    font-family: inherit;
    min-width:   200px;
    max-width:   280px;
    padding:     0.25rem 0.1rem 0.1rem;
    line-height: 1.5;
}

.tvtp-infowindow-nom {
    display:       block;
    font-size:     1rem;
    font-weight:   700;
    color:         var(--tvtp-color-text);
    margin-bottom: 0.35rem;
}

/* Badges de statut dans l'InfoWindow */
.tvtp-infowindow-statut {
    display:       inline-block;
    font-size:     0.72rem;
    font-weight:   600;
    padding:       0.15rem 0.55rem;
    border-radius: 20px;
    margin-bottom: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tvtp-infowindow-statut--actif {
    background-color: #e8f5e9;
    color:            #2e7d32;
}

.tvtp-infowindow-statut--construction {
    background-color: #ECEFF1;
    color:            #455A64;
}

/* Icône épingle dans l'adresse */
.tvtp-iw-icone {
    width:          14px;
    height:         14px;
    vertical-align: middle;
    margin-right:   3px;
    flex-shrink:    0;
    color:          var(--tvtp-color-text-light);
}

.tvtp-infowindow p {
    margin:    0.3rem 0;
    font-size: 0.87rem;
    color:     var(--tvtp-color-text);
}

.tvtp-infowindow-adresse {
    display:     flex;
    align-items: flex-start;
    gap:         3px;
    color:       var(--tvtp-color-text-light) !important;
}

.tvtp-infowindow-responsable {
    color: var(--tvtp-color-text-light) !important;
}

.tvtp-infowindow-creneaux {
    color:       var(--tvtp-color-text-light) !important;
    font-style:  italic;
}

.tvtp-infowindow-tel a,
.tvtp-infowindow-tel-inline {
    color:           var(--tvtp-color-primary);
    font-weight:     500;
    text-decoration: none;
    font-size:       inherit; /* Même taille que le texte responsable */
}

.tvtp-infowindow-tel a:hover,
.tvtp-infowindow-tel-inline:hover {
    text-decoration: underline;
}

.tvtp-infowindow-lien a {
    font-size:       0.82rem;
    color:           var(--tvtp-color-text-light);
    text-decoration: none;
}

.tvtp-infowindow-lien a:hover {
    text-decoration: underline;
    color:           var(--tvtp-color-primary);
}

/* Zone bouton dans l'InfoWindow */
.tvtp-infowindow-actions {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top:  1px solid #f0f0f0;
}

/* Bouton "Choisir ce relais" */
.tvtp-btn-choisir-relais {
    display:          block;
    width:            100%;
    padding:          0.55rem 1rem;
    background-color: var(--tvtp-color-primary);
    color:            var(--tvtp-color-white);
    border:           none;
    border-radius:    var(--tvtp-radius);
    font-size:        0.9rem;
    font-weight:      600;
    cursor:           pointer;
    text-align:       center;
    transition:       background-color var(--tvtp-transition),
                      opacity var(--tvtp-transition);
}

.tvtp-btn-choisir-relais:hover,
.tvtp-btn-choisir-relais:focus {
    background-color: #1b5e20;
    outline:          2px solid var(--tvtp-color-secondary);
    outline-offset:   2px;
}

.tvtp-btn-choisir-relais:disabled {
    opacity: 0.6;
    cursor:  not-allowed;
}

/* ── Toast de confirmation ──────────────────────── */

.tvtp-toast {
    position:      fixed;
    bottom:        1.5rem;
    left:          50%;
    transform:     translateX(-50%) translateY(1rem);
    z-index:       99999;
    padding:       0.9rem 1.5rem;
    border-radius: var(--tvtp-radius);
    font-size:     0.95rem;
    font-weight:   500;
    color:         var(--tvtp-color-white);
    box-shadow:    0 4px 20px rgba(0, 0, 0, 0.18);
    max-width:     90vw;
    text-align:    center;
    opacity:       0;
    pointer-events: none;
    transition:    opacity 0.3s ease, transform 0.3s ease;
    white-space:   pre-line;
}

.tvtp-toast--visible {
    opacity:        1;
    transform:      translateX(-50%) translateY(0);
    pointer-events: auto;
}

.tvtp-toast--succes {
    background-color: var(--tvtp-color-primary);
    border-left:      4px solid #a5d6a7;
}

.tvtp-toast--erreur {
    background-color: #c62828;
    border-left:      4px solid #ef9a9a;
}

/* ── Responsive : affichage côte-à-côte sur grands écrans ── */

@media ( min-width: 900px ) {
    .tvtp-relais-map-wrapper {
        flex-direction: row;
        align-items:    flex-start;
    }

    .tvtp-relais-map {
        flex: 2;          /* La carte prend 2/3 de la largeur */
        min-width: 0;
    }

    .tvtp-relais-liste {
        flex:       1;    /* La liste prend 1/3 de la largeur */
        min-width:  240px;
        max-width:  340px;
    }
}

/* ─────────────────────────────────────────────
   Shortcode [tvtp_relais_actuel] — Indicateur relais
   ───────────────────────────────────────────── */

.tvtp-relais-actuel {
    display:       flex;
    flex-wrap:     wrap;
    align-items:   center;
    gap:           0.35rem;
    padding:       0.5rem 0.75rem;
    background:    var(--tvtp-color-bg);
    border-radius: var(--tvtp-radius);
    font-size:     0.95rem;
}

.tvtp-relais-actuel-label {
    font-weight:   600;
    color:         var(--tvtp-color-text);
}

.tvtp-relais-actuel-nom {
    color: var(--tvtp-color-text);
}

.tvtp-relais-actuel-changer {
    color:           var(--tvtp-color-primary);
    text-decoration: underline;
}

.tvtp-relais-actuel-changer:hover,
.tvtp-relais-actuel-changer:focus {
    color: #1b5e20;
}

.tvtp-relais-actuel--vide .tvtp-relais-actuel-choisir {
    color:           var(--tvtp-color-primary);
    font-weight:     500;
    text-decoration: underline;
}

.tvtp-relais-actuel--vide .tvtp-relais-actuel-choisir:hover,
.tvtp-relais-actuel--vide .tvtp-relais-actuel-choisir:focus {
    color: #1b5e20;
}

.tvtp-relais-actuel-invite {
    color: var(--tvtp-color-text-light);
}

/* ─────────────────────────────────────────────
   Bandeau relais (shortcode [tvtp_relais_actuel] — classes tvtp-bandeau-*)
   ───────────────────────────────────────────── */

/* Fond jaune clair et bordure bleue pour le bandeau relais */
.tvtp-bandeau-relais {
    display:       flex;
    flex-wrap:     wrap;
    align-items:   center;
    gap:           0.5rem 1rem;
    padding:       0.75rem 1rem;
    margin-bottom: 1rem;
    background:    #fff9c4;
    border-left:   4px solid #1565c0;
    border-radius: var(--tvtp-radius);
    font-size:     0.95rem;
}

/* Marqueur vert (rond) pour indiquer le relais — CSS pur, pas d’émoji */
.tvtp-bandeau-icone {
    display:       inline-block;
    width:         12px;
    height:        12px;
    background:    #2e7d32;
    border-radius: 50%;
    flex-shrink:   0;
}

.tvtp-bandeau-texte {
    flex:         1;
    color:        var(--tvtp-color-text);
    min-width:    10rem;
}

/* Couleur des liens « Changer » / « Choisir » dans le bandeau */
.tvtp-bandeau-changer,
.tvtp-bandeau-choisir {
    color:           #1565c0;
    font-weight:     500;
    text-decoration: underline;
}

/* Couleur au survol des liens du bandeau */
.tvtp-bandeau-changer:hover,
.tvtp-bandeau-choisir:hover {
    color: #0d47a1;
    text-decoration: underline;
}

/* Bandeau catalogue (Catalogue du relais — vert informatif) */
.tvtp-bandeau-vert {
    display:         flex;
    flex-wrap:       wrap;
    align-items:     center;
    gap:             0.75rem 1.5rem;
    padding:         1rem 1.25rem;
    margin-bottom:   1.25rem;
    background:      #e8f5e9;
    border-left:     4px solid #2e7d32;
    border-radius:   var(--tvtp-radius);
    font-size:       0.95rem;
}
.tvtp-bandeau-catalogue-texte { flex: 1; min-width: 16rem; }
.tvtp-bandeau-catalogue-actions { flex-shrink: 0; }
.tvtp-dropdown-selection-defaut { position: relative; }
.tvtp-dropdown-panel {
    position:   absolute;
    top:        100%;
    left:       0;
    margin-top: 0.5rem;
    padding:    0.75rem 1rem;
    background: #fff;
    border:     1px solid #ddd;
    border-radius: var(--tvtp-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index:    100;
    min-width:  220px;
}
.tvtp-dropdown-panel select { margin-right: 0.5rem; min-width: 180px; }
.tvtp-dropdown-panel .tvtp-btn { margin-top: 0.5rem; }
.tvtp-dropdown-vide { margin: 0; font-size: 0.9rem; }
.tvtp-dropdown-vide a { color: #2e7d32; text-decoration: underline; }

/* Bandeau alerte (aucun relais sélectionné) */
.tvtp-bandeau-alerte {
    background:        #fff9c4;
    border-left-color: #1565c0;
}

/* Lien « Choisir » dans le bandeau alerte — accentué */
.tvtp-bandeau-alerte .tvtp-bandeau-choisir {
    color:       #1565c0;
    font-weight: bold;
}

/* ─────────────────────────────────────────────
   Bandeau compte à rebours (prochaine ouverture)
   ───────────────────────────────────────────── */

#tvtp-bandeau-compte-rebours {
    background:        #2d7a2d;
    color:             #fff;
    padding:           12px 20px;
    text-align:        center;
    font-size:         1rem;
    font-weight:       600;
    width:             100%;
    display:           flex;
    align-items:       center;
    justify-content:   center;
    gap:               12px;
    position:          fixed;
    top:               32px;
    left:              0;
    z-index:           9999;
}

body.logged-in #tvtp-bandeau-compte-rebours {
    top: 32px;
}

body:not(.logged-in) #tvtp-bandeau-compte-rebours {
    top: 0;
}

.tvtp-bandeau-label {
    font-size: 0.95rem;
}

.tvtp-bandeau-timer {
    font-size:     1.1rem;
    font-weight:   700;
    letter-spacing: 1px;
}

/* ─────────────────────────────────────────────
   Modale carte relais (bandeau → « Changer de relais »)
   ───────────────────────────────────────────── */

.tvtp-modale {
    position:   fixed;
    top:        0;
    left:       0;
    width:      100%;
    height:     100%;
    z-index:    99999;
    display:    flex;
    align-items: center;
    justify-content: center;
}

.tvtp-modale-overlay,
.tvtp-modale-backdrop {
    position:   absolute;
    top:        0;
    left:       0;
    width:      100%;
    height:     100%;
    background: rgba( 0, 0, 0, 0.5 );
}

.tvtp-modale-contenu,
.tvtp-modale-content {
    position:   relative;
    background: #fff;
    border-radius: 8px;
    width:       90%;
    max-width:   800px;
    max-height:  90vh;
    overflow:    auto;
    box-shadow: 0 4px 20px rgba( 0, 0, 0, 0.3 );
}

.tvtp-modale-header {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    padding:         16px 20px;
    border-bottom:  1px solid #eee;
}

.tvtp-modale-header h2 {
    margin:   0;
    font-size: 1.3em;
    color:    #333;
}

.tvtp-modale-fermer {
    background: none;
    border:    none;
    font-size: 24px;
    cursor:   pointer;
    color:    #666;
    padding:  0 8px;
}

.tvtp-modale-fermer:hover {
    color: #000;
}

.tvtp-modale-body {
    padding: 20px;
}

/* Modale postuler multi-relais : backdrop et content (alias contenu) */
.tvtp-modale-backdrop {
    position:   absolute;
    top:        0;
    left:       0;
    width:      100%;
    height:     100%;
    background: rgba( 0, 0, 0, 0.5 );
    cursor:     pointer;
}

.tvtp-modale-content {
    position:   relative;
    background: #fff;
    border-radius: 8px;
    width:       90%;
    max-width:   800px;
    max-height:  90vh;
    overflow:    auto;
    box-shadow: 0 4px 20px rgba( 0, 0, 0, 0.3 );
    padding:     20px;
}

.tvtp-modale-content h3 {
    margin: 0 0 16px 0;
    font-size: 1.3em;
}

.tvtp-modale-footer {
    display:         flex;
    gap:             12px;
    justify-content: flex-end;
    margin-top:      20px;
    padding-top:     16px;
    border-top:      1px solid #eee;
}

/* Modales B3 Candidatures : Accepter / Refuser — ergonomie améliorée */
.tvtp-modale-candidature .tvtp-modale-candidature-body {
    padding: 0 20px 20px;
}
.tvtp-modale-candidature-champ {
    margin-bottom: 0;
}
/* Libellé au-dessus du textarea sur sa propre ligne */
.tvtp-modale-candidature-label {
    display:       block;
    margin-bottom:  8px;
    font-weight:    600;
    color:          #333;
}
/* Textarea : 100 % largeur, hauteur min 150px, police 14px */
.tvtp-modale-candidature .tvtp-message-modale-candidature {
    display:        block;
    width:          100%;
    min-height:     150px;
    font-size:      14px;
    line-height:    1.5;
    padding:        10px 12px;
    border:         1px solid #ccc;
    border-radius:   4px;
    resize:         vertical;
    box-sizing:     border-box;
}
/* Note sous le textarea en gris clair */
.tvtp-modale-candidature-note {
    margin:         8px 0 0;
    font-size:      0.875rem;
    color:          #888;
}
/* Boutons Annuler / Confirmer alignés à droite avec espacement */
.tvtp-modale-candidature-footer {
    justify-content: flex-end;
    gap:             16px;
}

.tvtp-modale-relais-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.tvtp-modale-relais-item:last-child {
    border-bottom: none;
}

.tvtp-modale-relais-item label {
    cursor: pointer;
    display: block;
}

/* Bouton vert « Postuler à un ou plusieurs relais » */
.tvtp-btn--green {
    background: #2e7d32;
    color:      #fff;
    border-color: #2e7d32;
}

.tvtp-btn--green:hover {
    background: #1b5e20;
    border-color: #1b5e20;
    color: #fff;
}

/* En-tête section Mes relais : titre + bouton alignés */
.tvtp-relais-header {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    flex-wrap:       wrap;
    gap:             12px;
    margin-bottom:   16px;
}

.tvtp-relais-header h3 {
    margin: 0;
}

/* En-tête section Invitations (B2) : titre + bouton alignés */
.tvtp-invitations-header {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    flex-wrap:       wrap;
    gap:             12px;
    margin-bottom:   16px;
}

.tvtp-invitations-header h3 {
    margin: 0;
}

/* Modale invitation : producteurs déjà invités/associés — grisés */
.tvtp-modale-producteur-item--disabled {
    opacity: 0.6;
    color: #666;
}

.tvtp-modale-producteur-item--disabled label {
    cursor: default;
}

/* Label producteur sur fiche produit (évite clear:both qui casserait la grille) */
.tvtp-produit-vendeur {
    clear:    none;
    display:  block;
}

/* Séparateurs par producteur (restructuration JS côté frontend) */
.tvtp-separateur-producteur {
    padding-top:    15px;
    margin-top:    25px;
    margin-bottom: 15px;
    clear:          both;
}

.tvtp-separateur-producteur h3 {
    font-size:   1.4em;
    font-weight: bold;
    margin:      0;
}

.tvtp-separateur-producteur h3 a {
    color:           #2e7d32;
    text-decoration: none;
}

.tvtp-separateur-producteur h3 a:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────────
   Widget "Nos producteurs" (sidebar)
   ───────────────────────────────────────────── */

.tvtp-widget-producteurs-liste {
    list-style: none;
    margin:     0;
    padding:    0;
}

.tvtp-widget-producteur-item {
    margin:      0;
    padding:     0.4rem 0;
    border-bottom: 1px solid #e8e8e8;
}

.tvtp-widget-producteur-item:last-child {
    border-bottom: none;
}

.tvtp-widget-producteur-lien {
    color:           var(--tvtp-color-text);
    text-decoration:  none;
    display:         block;
    transition:      color var(--tvtp-transition);
}

.tvtp-widget-producteur-lien:hover,
.tvtp-widget-producteur-lien:focus {
    color: var(--tvtp-color-primary);
}

.tvtp-widget-producteur-nom {
    font-weight: 600;
}

.tvtp-widget-producteur-count {
    font-size:   0.85em;
    color:       var(--tvtp-color-text-light);
    font-weight: 400;
}

/* ─────────────────────────────────────────────
   Shortcode [tvtp_accueil] — Page d'accueil
   ───────────────────────────────────────────── */

/* Titre */
.tvtp-accueil-titre {
	text-align: center;
	padding: 40px 20px 30px;
}
.tvtp-accueil-titre h1 {
	font-size: 2.4em;
	color: #2e7d32;
	margin-bottom: 8px;
}
.tvtp-accueil-slogan {
	font-size: 1.3em;
	color: #555;
	font-style: italic;
}

/* Grille 3 colonnes */
.tvtp-accueil-blocs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	padding: 0 20px 40px;
	max-width: 1200px;
	margin: 0 auto;
}

/* Bloc commun */
.tvtp-bloc {
	border-radius: 12px;
	padding: 30px 24px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: transform 0.2s;
}
.tvtp-bloc:hover {
	transform: translateY(-4px);
}
.tvtp-bloc-icone {
	font-size: 3em;
	margin-bottom: 16px;
}
.tvtp-bloc h2 {
	font-size: 1.3em;
	margin-bottom: 12px;
}
.tvtp-bloc p {
	font-size: 0.95em;
	line-height: 1.5;
	margin-bottom: 20px;
	flex: 1;
}

/* Bouton commun */
.tvtp-bloc-btn {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: bold;
	font-size: 1em;
	transition: opacity 0.2s;
}
.tvtp-bloc-btn:hover {
	opacity: 0.85;
}

/* Bloc Client - Vert */
.tvtp-bloc-client {
	background: #e8f5e9;
	border: 2px solid #2e7d32;
}
.tvtp-bloc-client h2 { color: #2e7d32; }
.tvtp-btn-client {
	background: #2e7d32;
	color: #fff;
}

/* Bloc Producteur - Bleu */
.tvtp-bloc-producteur {
	background: #e3f2fd;
	border: 2px solid #1565c0;
}
.tvtp-bloc-producteur h2 { color: #1565c0; }
.tvtp-btn-producteur {
	background: #1565c0;
	color: #fff;
}

/* Bloc Responsable - Orange */
.tvtp-bloc-responsable {
	background: #fff3e0;
	border: 2px solid #e65100;
}
.tvtp-bloc-responsable h2 { color: #e65100; }
.tvtp-btn-responsable {
	background: #e65100;
	color: #fff;
}

/* Responsive mobile */
@media (max-width: 768px) {
	.tvtp-accueil-blocs {
		grid-template-columns: 1fr;
	}
	.tvtp-accueil-titre h1 {
		font-size: 1.8em;
	}
}

/* ─────────────────────────────────────────────
   Module 1 : Formulaire inscription producteur
   [tvtp_inscription_producteur]
   ───────────────────────────────────────────── */

.tvtp-form-inscription {
	max-width:   700px;
	margin:      0 auto;
	padding:     20px;
}

.tvtp-form-inscription .tvtp-fieldset {
	border:      1px solid #ddd;
	border-radius: 8px;
	padding:     20px;
	margin-bottom: 24px;
}

.tvtp-form-inscription .tvtp-fieldset legend {
	font-size:   1.1em;
	font-weight: bold;
	color:       #2e7d32;
	padding:     0 10px;
}

.tvtp-form-inscription .tvtp-fieldset label {
	display:     block;
	margin-top:  12px;
	margin-bottom: 4px;
	font-weight: 600;
	color:       #333;
}

.tvtp-form-inscription .tvtp-fieldset input[type="text"],
.tvtp-form-inscription .tvtp-fieldset input[type="email"],
.tvtp-form-inscription .tvtp-fieldset input[type="tel"],
.tvtp-form-inscription .tvtp-fieldset input[type="password"],
.tvtp-form-inscription .tvtp-fieldset textarea {
	width:       100%;
	padding:     10px;
	border:      1px solid #ccc;
	border-radius: 4px;
	font-size:   1em;
}

.tvtp-form-inscription .tvtp-fieldset input:focus,
.tvtp-form-inscription .tvtp-fieldset textarea:focus {
	border-color: #2e7d32;
	outline:      none;
	box-shadow:  0 0 3px rgba(46,125,50,0.3);
}

.tvtp-form-inscription .tvtp-checkbox-group {
	display:              grid;
	grid-template-columns: repeat(2, 1fr);
	gap:                  8px;
	margin-top:           8px;
}

.tvtp-form-inscription .tvtp-checkbox-group label {
	font-weight: normal;
	margin:      0;
	display:    flex;
	align-items: center;
	gap:        6px;
}

.tvtp-form-inscription .tvtp-btn-submit {
	background:   #2e7d32;
	color:        #fff;
	border:       none;
	padding:      14px 32px;
	font-size:    1.1em;
	font-weight:  bold;
	border-radius: 6px;
	cursor:       pointer;
	width:        100%;
	margin-top:   20px;
}

.tvtp-form-inscription .tvtp-btn-submit:hover {
	background: #1b5e20;
}

.tvtp-form-inscription .tvtp-form-cgv {
	margin-top: 16px;
}

.tvtp-form-inscription .tvtp-form-cgv label {
	font-weight: normal;
	display:     flex;
	align-items: center;
	gap:         8px;
}

/* Messages d'erreur de validation sous les champs (formulaire responsable relais) */
.tvtp-field-error {
	display:     block;
	margin-top:  4px;
	font-size:   0.9em;
	color:       #c62828;
}

.tvtp-field-wrap--error input,
.tvtp-field-wrap--error textarea {
	border-color: #c62828;
}

/* Bouton "Retour à l'accueil" stylé comme lien (modal remerciement responsable relais) */
.tvtp-modal-inscription-fermer--lien {
	display:         inline-block;
	text-decoration: none;
	text-align:      center;
}

/* Modal accès restreint — responsable en attente (espace relais) */
.tvtp-modal-acces-restreint-overlay {
	position:         fixed;
	top:              0;
	left:             0;
	width:            100%;
	height:           100%;
	z-index:          99999;
	display:          flex;
	align-items:      center;
	justify-content:  center;
	background:       rgba( 0, 0, 0, 0.6 );
	padding:          20px;
	pointer-events:   auto;
}

.tvtp-modal-acces-restreint-contenu {
	position:      relative;
	background:    #fff;
	border-radius: 12px;
	padding:       32px;
	max-width:     480px;
	width:         100%;
	text-align:    center;
	box-shadow:    0 8px 32px rgba( 0, 0, 0, 0.3 );
}

.tvtp-modal-acces-restreint-titre {
	font-size:   1.3em;
	color:       #c62828;
	margin:      0 0 16px;
	font-weight: bold;
}

.tvtp-modal-acces-restreint-message {
	margin:  0;
	line-height: 1.6;
	color:   #333;
}

/* Bloc informatif fieldset 4 — Inscription responsable relais (point relais) */
.tvtp-form-inscription .tvtp-fieldset--point-relais .tvtp-fieldset-info {
	background:    #f5f5f5;
	border-left:   4px solid var(--tvtp-color-primary);
	padding:       1rem 1.25rem;
	margin-bottom: 1rem;
	border-radius: 0 var(--tvtp-radius) var(--tvtp-radius) 0;
	font-style:    italic;
	color:         var(--tvtp-color-text-light);
}

.tvtp-form-inscription .tvtp-checkbox-label {
	display:     flex;
	align-items: center;
	gap:         8px;
	font-weight: 600;
	margin-top:  0.5rem;
}

.tvtp-form-inscription .tvtp-champs-point-relais label {
	margin-top: 12px;
}

/* Message centrale sur page correction producteur */
.tvtp-correction-message-centrale {
	background:    #fff3e0;
	border-left:   4px solid #ff8f00;
	padding:       1rem 1.25rem;
	margin-bottom: 1.5rem;
	border-radius: 0 var(--tvtp-radius) var(--tvtp-radius) 0;
}

.tvtp-correction-message-centrale p {
	margin: 0.5rem 0 0;
}

/* Fenêtre modale de confirmation d'inscription */
.tvtp-modal-inscription-overlay {
	position:   fixed;
	top:        0;
	left:       0;
	width:      100%;
	height:     100%;
	z-index:    99999;
	display:    flex;
	align-items: center;
	justify-content: center;
	background: rgba( 0, 0, 0, 0.5 );
	padding:    20px;
}

.tvtp-modal-inscription-contenu {
	position:      relative;
	background:    #fff;
	border-radius: 12px;
	padding:       32px;
	max-width:     480px;
	width:         100%;
	text-align:    center;
	box-shadow:    0 8px 32px rgba( 0, 0, 0, 0.2 );
}

.tvtp-modal-inscription-logo {
	margin-bottom: 20px;
}

.tvtp-modal-inscription-logo img {
	max-width:  180px;
	height:     auto;
	display:    block;
	margin:     0 auto;
}

.tvtp-modal-inscription-titre {
	font-size:   1.4em;
	color:       #2e7d32;
	margin:      0 0 16px;
	font-weight: bold;
}

.tvtp-modal-inscription-message {
	text-align:  left;
	margin-bottom: 24px;
	line-height:  1.6;
}

.tvtp-modal-inscription-message p {
	margin: 0 0 12px;
	color:  #333;
}

.tvtp-modal-inscription-message p:last-child {
	margin-bottom: 0;
}

.tvtp-modal-inscription-message a {
	color:           #2e7d32;
	text-decoration:  none;
	font-weight:     600;
}

.tvtp-modal-inscription-message a:hover {
	text-decoration: underline;
}

.tvtp-modal-inscription-fermer {
	background:    #2e7d32;
	color:         #fff;
	border:        none;
	padding:       12px 28px;
	font-size:     1em;
	font-weight:   bold;
	border-radius: 6px;
	cursor:        pointer;
	transition:    background-color 0.2s;
}

.tvtp-modal-inscription-fermer:hover {
	background: #1b5e20;
}

/* ─────────────────────────────────────────────
   Espace Relais & Espace Producteur — layout 2 colonnes
   Menu gauche fixe (sticky) pendant le défilement du contenu droit
   Classes partagées : tvtp-espace-relais-layout, tvtp-espace-relais-sidebar, tvtp-espace-relais-contenu
   ───────────────────────────────────────────── */

/* Conteneur principal (position relative pour le sélecteur admin en absolute) */
.tvtp-espace-relais {
	position: relative;
	max-width: 1400px;
	margin: 0 auto;
	padding: 1rem;
}

.tvtp-espace-relais--refuse {
	padding: 2rem;
}

/* Sélecteur de relais intégré dans la navigation (admin / responsable multi-relais) — sans libellé "Relais :" */
.tvtp-espace-relais-menu-principal .tvtp-espace-relais-selecteur-wrapper {
	padding: 0.85rem 1.25rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.tvtp-espace-relais-menu-principal .tvtp-selecteur-relais {
	width: 100%;
	padding: 0.5rem 2rem 0.5rem 0.75rem;
	min-width: 0;
	border-radius: var(--tvtp-radius);
	border: 1px solid rgba(255, 255, 255, 0.3);
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 0.95em;
	cursor: pointer;
}
/* Styles relais menu uniquement — ne pas appliquer au sélecteur producteur (fond clair) */
.tvtp-espace-relais-menu-principal .tvtp-selecteur-relais:hover,
.tvtp-espace-relais-menu-principal .tvtp-selecteur-relais:focus {
	background: rgba(255, 255, 255, 0.25);
	outline: 2px solid var(--tvtp-color-secondary);
	outline-offset: 2px;
}
.tvtp-espace-relais-menu-principal .tvtp-selecteur-relais option {
	background: #2e7d32;
	color: #fff;
}

/* Masquer la zone de titre "Espace Relais" entre fil d'Ariane et sélecteur (inutile) */
body.tvtp-page-espace-relais .entry-content h1.entry-title,
body.tvtp-page-espace-relais .entry-content h2.entry-title,
body.tvtp-page-espace-relais .entry-header .entry-title,
body.tvtp-page-espace-relais .entry-header h1,
body.tvtp-page-espace-relais .page-header .page-title,
body.tvtp-page-espace-relais .page-header h1,
body.tvtp-page-espace-relais .page-title,
body.tvtp-page-espace-relais .title-area h1 {
	display: none !important;
}
/* Masquer la zone entière du titre (entry-header) — le fil d'Ariane est souvent dans un conteneur séparé */
body.tvtp-page-espace-relais .entry-header,
body.tvtp-page-espace-relais .page-header {
	display: none !important;
}

/* Bouton hamburger (masqué sur desktop, visible en mobile) */
.tvtp-espace-relais-hamburger {
	display: none;
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 1001;
	width: 44px;
	height: 44px;
	padding: 0;
	background: #2e7d32;
	border: none;
	border-radius: var(--tvtp-radius);
	cursor: pointer;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
}

.tvtp-espace-relais-hamburger span {
	display: block;
	width: 22px;
	height: 2px;
	background: #fff;
	border-radius: 1px;
	transition: transform var(--tvtp-transition), opacity var(--tvtp-transition);
}

.tvtp-espace-relais-hamburger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.tvtp-espace-relais-hamburger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.tvtp-espace-relais-hamburger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Layout 2 colonnes : menu gauche fixe + contenu central qui défile
   S'applique aux espaces producteur et relais (mêmes classes partagées)
   Pas de overflow: hidden sur le layout (casserait position: sticky) */
.tvtp-espace-relais--2colonnes .tvtp-espace-relais-layout,
.tvtp-espace-producteur.tvtp-espace-relais--2colonnes .tvtp-espace-relais-layout {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	min-height: 100vh;
	min-width: 480px;
	border-radius: var(--tvtp-radius);
	box-shadow: var(--tvtp-shadow);
}

/* Menu gauche — appliqué aux 3 espaces (relais, producteur, admin).
   overflow-y: auto + min-height: 100vh pour que le menu soit scrollable quand les sous-menus
   dépliés dépassent la hauteur de l'écran ; les entrées du bas restent visibles. */
.tvtp-espace-relais-sidebar {
	position: sticky;
	top: 0;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	width: 280px;
	min-width: 280px;
	min-height: 100vh;
	max-height: 100vh;
	overflow-y: auto;
	border-radius: var(--tvtp-radius) 0 0 var(--tvtp-radius);
}

/* Zone du sélecteur de relais — séparée visuellement de la navigation (fond clair) */
.tvtp-espace-relais-selecteur-zone {
	padding: 1rem;
	background: var(--tvtp-color-bg);
	border-bottom: 2px solid #2e7d32;
}
.tvtp-espace-relais-selecteur-zone:empty {
	display: none;
}
.tvtp-espace-relais-selecteur-zone .tvtp-selecteur-relais {
	width: 100%;
	padding: 0.5rem 2rem 0.5rem 0.75rem;
	min-width: 0;
	border-radius: var(--tvtp-radius);
	border: 1px solid #ccc;
	background: var(--tvtp-color-white);
	color: var(--tvtp-color-text);
	font-size: 0.95em;
	cursor: pointer;
	appearance: auto;
	-webkit-appearance: menulist;
}
.tvtp-espace-relais-selecteur-zone .tvtp-selecteur-relais:hover,
.tvtp-espace-relais-selecteur-zone .tvtp-selecteur-relais:focus {
	border-color: var(--tvtp-color-primary);
	outline: 2px solid var(--tvtp-color-secondary);
	outline-offset: 2px;
}
.tvtp-espace-relais-selecteur-zone .tvtp-selecteur-relais option {
	background: var(--tvtp-color-white);
	color: var(--tvtp-color-text);
}

/* Sélecteur producteur (espace producteur admin) — évite doublon visuel, ouverture liste native */
.tvtp-espace-producteur .tvtp-selecteur-producteur-zone {
	flex-shrink: 0;
	position: relative;
}
/* Annuler tout style custom thème/WCFM pouvant créer un doublon visuel */
.tvtp-espace-producteur .tvtp-selecteur-producteur-zone .tvtp-espace-relais-selecteur-wrapper {
	position: relative;
	background: transparent;
}
.tvtp-espace-producteur #tvtp-selecteur-producteur-admin {
	position: relative;
	z-index: 2;
	pointer-events: auto;
	width: 100%;
	min-height: 44px;
	padding: 0.5rem 2.5rem 0.5rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: var(--tvtp-radius);
	background: var(--tvtp-color-white) !important;
	color: var(--tvtp-color-text) !important;
	font-size: 0.95em;
	cursor: pointer;
	appearance: menulist !important;
	-webkit-appearance: menulist !important;
	-moz-appearance: menulist !important;
}
.tvtp-espace-producteur #tvtp-selecteur-producteur-admin:hover,
.tvtp-espace-producteur #tvtp-selecteur-producteur-admin:focus {
	background: var(--tvtp-color-white) !important;
	color: var(--tvtp-color-text) !important;
	border-color: var(--tvtp-color-primary);
	outline: 2px solid var(--tvtp-color-secondary);
	outline-offset: 2px;
}
.tvtp-espace-producteur #tvtp-selecteur-producteur-admin option {
	background: var(--tvtp-color-white);
	color: var(--tvtp-color-text);
	padding: 0.5rem;
}

/* Menu principal (navigation) — refonte Module 5.
   Layout flex pour le wrapper, fond vert #2d7a2d pour la barre. */
.tvtp-espace-relais-menu-principal {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: min-content;
	background: #2d7a2d;
	color: #fff;
	padding: 0;
}

/* Wrapper du menu relais (6 entrées n1 + alertes en bas) */
.tvtp-menu-relais-wrapper {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

/* ─── Niveau 1 : fond vert #2d7a2d, texte blanc ─── */
.tvtp-espace-relais-menu-principal .tvtp-menu-n1 {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	color: white;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	transition: background 0.2s;
	text-decoration: none;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n1:hover {
	background: rgba(255, 255, 255, 0.1);
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n1.actif {
	background: rgba(255, 255, 255, 0.15);
}

/* Icônes SVG inline : currentColor hérite du parent (blanc n1, vert n2/n3) */
.tvtp-espace-relais-menu-principal .tvtp-menu-icone,
.tvtp-espace-relais-menu-principal .tvtp-menu-icone-alerte {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

/* Icônes SVG niveau 1 : 24px (augmentées d’un tiers par rapport à 18px) */
.tvtp-espace-relais-menu-principal .tvtp-menu-n1 .tvtp-menu-icone {
	width: 24px;
	height: 24px;
	font-size: 16px;
}
.tvtp-espace-relais-menu-principal .tvtp-menu-n1 .tvtp-menu-icone svg {
	width: 24px;
	height: 24px;
}
.tvtp-espace-relais-menu-principal .tvtp-menu-n1 {
	align-items: center;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-icone svg,
.tvtp-espace-relais-menu-principal .tvtp-menu-icone-alerte svg {
	display: block;
	color: inherit;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n1 .tvtp-menu-caret,
.tvtp-espace-relais-menu-principal .tvtp-menu-caret-trigger svg {
	display: block;
	flex-shrink: 0;
	transition: transform 0.2s;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n1-avec-sous.ouvert .tvtp-menu-caret-trigger svg {
	transform: rotate(90deg);
}

/* Niveau 1 avec sous-menu : lien (navigation) + bouton caret (déploiement) — accordion vertical */
.tvtp-espace-relais-menu-principal .tvtp-menu-n1-avec-sous {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	width: 100%;
	padding: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n1-ligne {
	display: flex;
	align-items: center;
	width: 100%;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n1-lien {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
	padding: 14px 16px;
	color: white;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n1-lien:hover {
	background: rgba(255, 255, 255, 0.1);
	color: white;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n1-avec-sous.ouvert .tvtp-menu-n1-lien {
	background: rgba(255, 255, 255, 0.15);
}

/* Bouton caret : seul le clic sur le caret déplie/replie (pas le survol) */
.tvtp-espace-relais-menu-principal .tvtp-menu-caret-trigger {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px 12px;
	background: transparent;
	border: none;
	color: inherit;
	cursor: pointer;
	transition: background 0.2s;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-caret-trigger:hover {
	background: rgba(255, 255, 255, 0.15);
}

.tvtp-espace-relais-menu-principal .tvtp-menu-caret-trigger .tvtp-menu-caret,
.tvtp-espace-relais-menu-principal .tvtp-menu-caret-trigger svg {
	margin-left: 0;
}

/* ─── Sous-menus accordion vertical : affichage EN DESSOUS du parent, jamais à droite ─── */
/* Blocage des flyouts WCFM/thème (position: absolute, left: 100%) */
.tvtp-espace-relais .tvtp-espace-relais-menu-principal .tvtp-sous-menu,
.tvtp-espace-relais .tvtp-espace-relais-menu-principal .tvtp-menu-n2-wrapper,
.tvtp-espace-relais .tvtp-espace-relais-menu-principal .tvtp-menu-n3-wrapper {
	position: static !important;
	left: auto !important;
	top: auto !important;
	right: auto !important;
	min-width: unset !important;
}

.tvtp-espace-relais .tvtp-espace-relais-menu-principal .tvtp-sous-menu {
	display: none !important;
	width: 100% !important;
	overflow: hidden;
	flex-direction: column;
}

.tvtp-espace-relais .tvtp-espace-relais-menu-principal .tvtp-menu-n1-avec-sous.ouvert > .tvtp-sous-menu,
.tvtp-espace-relais .tvtp-espace-relais-menu-principal .tvtp-menu-n2-avec-sous.ouvert > .tvtp-sous-menu {
	display: flex !important;
}

/* ─── Niveau 2 : fond blanc, texte vert #2d7a2d ─── */
.tvtp-espace-relais-menu-principal .tvtp-menu-n2-wrapper {
	display: flex;
	flex-direction: column;
	background: white;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n2 {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px 10px 44px;
	color: #2d7a2d;
	font-size: 12px;
	background: white;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	transition: background 0.2s;
	text-decoration: none;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n2:hover {
	background: #f5f5f5;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n2.actif {
	font-weight: 600;
	background: #f0f7f0;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n2-avec-sous .tvtp-menu-caret-trigger svg {
	font-size: 11px;
	color: #2d7a2d;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n2-avec-sous.ouvert .tvtp-menu-caret-trigger svg {
	transform: rotate(90deg);
}

/* Niveau 2 avec sous-sous-menu (Gestion des producteurs) : lien + bouton caret — empiler verticalement */
.tvtp-espace-relais-menu-principal .tvtp-menu-n2-avec-sous {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	padding: 0;
	width: 100%;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n2-ligne {
	display: flex;
	align-items: center;
	width: 100%;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n2-lien {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
	padding: 10px 16px 10px 44px;
	color: #2d7a2d;
	font-size: 12px;
	text-decoration: none;
	background: white;
	transition: background 0.2s;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n2-lien:hover {
	background: #f5f5f5;
	color: #2d7a2d;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n2-avec-sous.ouvert .tvtp-menu-n2-lien {
	font-weight: 600;
	background: #f0f7f0;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n2-avec-sous .tvtp-menu-caret-trigger {
	padding: 10px 12px;
	color: #2d7a2d;
}

/* ─── Niveau 3 : fond vert clair #eaf3de ─── */
.tvtp-espace-relais-menu-principal .tvtp-menu-n3-wrapper {
	display: flex;
	flex-direction: column;
	background: #eaf3de;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n3 {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px 8px 56px;
	color: #2d7a2d;
	font-size: 11px;
	background: #eaf3de;
	cursor: pointer;
	border-bottom: 1px solid #d4e8c2;
	transition: background 0.2s;
	text-decoration: none;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n3:hover {
	background: #d4e8c2;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-n3.actif {
	font-weight: 600;
}

/* Badge rouge pour actions en attente (candidatures) */
.tvtp-espace-relais-menu-principal .tvtp-badge {
	background: #e74c3c;
	color: white;
	border-radius: 50%;
	width: 18px;
	height: 18px;
	font-size: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 6px;
}

/* Fonctions orphelines (menu producteur) : en rouge avec icône avertissement */
.tvtp-espace-relais-menu-principal .tvtp-menu-orphelines {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.tvtp-espace-relais-menu-principal .tvtp-menu-orpheline {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	font-size: 11px;
	color: #c62828;
	background: rgba(198, 40, 40, 0.1);
}
.tvtp-espace-relais-menu-principal .tvtp-menu-orpheline-icone {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.tvtp-espace-relais-menu-principal .tvtp-menu-orpheline-icone svg {
	color: #c62828;
}

/* Rétrocompatibilité : anciennes classes menu (espace producteur, admin) */
.tvtp-espace-relais-menu-principal .tvtp-menu-item {
	display: block;
	padding: 0.85rem 1.25rem;
	color: #fff;
	text-decoration: none;
	font-weight: 500;
	transition: background-color var(--tvtp-transition);
}

.tvtp-espace-relais-menu-principal .tvtp-menu-item:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.tvtp-espace-relais-menu-principal .tvtp-menu-item--active {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-weight: 600;
}

.tvtp-menu-parent {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tvtp-menu-parent-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0.85rem 1.25rem;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 1em;
	font-weight: 500;
	text-align: left;
	cursor: pointer;
	transition: background-color var(--tvtp-transition);
}

.tvtp-menu-parent-trigger:hover {
	background: rgba(255, 255, 255, 0.1);
}

.tvtp-menu-parent-trigger--active {
	background: rgba(255, 255, 255, 0.15);
	font-weight: 600;
}

.tvtp-menu-parent-icone {
	display: inline-block;
	width: 0.5em;
	height: 0.5em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform var(--tvtp-transition);
}

.tvtp-menu-parent--ouvert .tvtp-menu-parent-icone {
	transform: rotate(-135deg);
}

.tvtp-menu-badge {
	background: #d63638;
	color: #fff;
	border-radius: 50%;
	font-size: 11px;
	font-weight: bold;
	min-width: 18px;
	height: 18px;
	line-height: 18px;
	text-align: center;
	display: inline-block;
	margin-left: 6px;
	padding: 0 4px;
}

.tvtp-menu-badge--hidden {
	display: none !important;
}

.tvtp-menu-sous {
	display: flex;
	flex-direction: column;
	background: rgba(0, 0, 0, 0.15);
}

.tvtp-menu-parent:not(.tvtp-menu-parent--ouvert) .tvtp-menu-sous {
	display: none;
}

.tvtp-menu-sous-item {
	display: block;
	padding: 0.6rem 1.25rem 0.6rem 2rem;
	color: rgba(255, 255, 255, 0.95);
	text-decoration: none;
	font-size: 0.95em;
	transition: background-color var(--tvtp-transition);
}

.tvtp-menu-sous-item:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.tvtp-menu-sous-item--active {
	background: rgba(0, 0, 0, 0.2);
	font-weight: 600;
}

/* Contenu central (colonne droite) — défile normalement avec la page */
.tvtp-espace-relais-contenu {
	flex: 1;
	min-width: 0;
	background: var(--tvtp-color-white);
	padding: 2rem;
	border-radius: 0 var(--tvtp-radius) var(--tvtp-radius) 0;
}

/* Tableau de bord */
.tvtp-dashboard-infos {
	margin-bottom: 1.5rem;
}

.tvtp-dashboard-infos h2 {
	margin: 0 0 0.5rem;
	font-size: 1.3em;
}

.tvtp-dashboard-adresse,
.tvtp-dashboard-creneaux {
	margin: 0.25rem 0;
	font-size: 0.95em;
	color: var(--tvtp-color-text-light);
}

.tvtp-dashboard-compteurs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.tvtp-compteur {
	text-align: center;
	padding: 1rem;
	background: #f5f5f5;
	border-radius: var(--tvtp-radius);
}

.tvtp-compteur-valeur {
	display: block;
	font-size: 1.5em;
	font-weight: 700;
	color: var(--tvtp-color-primary);
}

.tvtp-compteur-label {
	font-size: 0.85em;
	color: var(--tvtp-color-text-light);
}

.tvtp-dashboard-alertes {
	background: #fff8e1;
	border-left: 4px solid var(--tvtp-color-accent);
	padding: 1rem;
	border-radius: 0 var(--tvtp-radius) var(--tvtp-radius) 0;
}

.tvtp-dashboard-alertes h3 {
	margin: 0 0 0.5rem;
	font-size: 1em;
}

.tvtp-dashboard-alertes ul {
	margin: 0;
	padding-left: 1.25rem;
}

.tvtp-dashboard-alertes a {
	color: var(--tvtp-color-primary);
	font-weight: 500;
}

/* Alerte invitations en attente — orange pour attirer l'attention */
.tvtp-dashboard-alertes a.tvtp-alerte-invitations {
	color: #e65100;
	font-weight: 600;
}

/* Section ventes dashboard relais — cartes dépliables */
.tvtp-dashboard-ventes-en-cours h3 {
	margin: 0 0 1rem;
	font-size: 1.15em;
	color: var(--tvtp-color-text);
}
.tvtp-dashboard-ventes-vide {
	margin: 0 0 1rem;
	padding: 1.5rem;
	background: var(--tvtp-color-white);
	border: 1px solid #ddd;
	border-radius: var(--tvtp-radius);
}
.tvtp-ventes-cards {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 1.5rem;
}
/* Cartes vente espace relais : bordure = couleur du bandeau, corps blanc. */
.tvtp-vente-card {
	background: #fff;
	border: 2px solid #ccc;
	border-radius: 8px;
	margin-bottom: 12px;
	overflow: hidden;
	box-sizing: border-box;
}
.tvtp-vente-card--attente {
	border-color: #e67e22;
}
.tvtp-vente-card--ouverte {
	border-color: #2d7a2d;
}
.tvtp-vente-card--planifiee {
	border-color: #888888;
}
.tvtp-vente-card--attente .tvtp-vente-card-header {
	background: #e67e22;
	border-color: #e67e22;
	color: #fff;
}
.tvtp-vente-card--ouverte .tvtp-vente-card-header {
	background: #2d7a2d;
	border-color: #2d7a2d;
	color: #fff;
}
.tvtp-vente-card--planifiee .tvtp-vente-card-header {
	background: #888888;
	border-color: #888888;
	color: #fff;
}
.tvtp-vente-card-header {
	padding: 10px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	color: #fff;
}
.tvtp-vente-card-body {
	background: #fff;
	padding: 12px 16px;
	border-radius: 0;
}
.tvtp-vente-card-infos-ligne {
	font-size: 12px;
	color: #666;
	margin-bottom: 10px;
}
.tvtp-vente-card-badge {
	display: inline-block;
	background: rgba(0, 0, 0, 0.2);
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
}
/* Libellé « Valider la distribution » : primaire orange sur carte attente. */
.tvtp-vente-card--attente .tvtp-btn-distribution {
	background: #e67e22;
	color: #fff;
	border-color: #cf711f;
}
.tvtp-vente-card--attente .tvtp-btn-distribution:hover,
.tvtp-vente-card--attente .tvtp-btn-distribution:focus {
	background: #d35400;
	border-color: #b84700;
	color: #fff;
}
/* Panneau détail AJAX (onglets Clients / Produits). */
.tvtp-detail-vente-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
	border-bottom: 1px solid #eee;
}
.tvtp-detail-tab {
	background: transparent;
	border: none;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 14px;
	color: #666;
}
.tvtp-detail-tab--active {
	color: #2d7a2d;
	font-weight: 600;
	border-bottom: 2px solid #2d7a2d;
	margin-bottom: -1px;
}
.tvtp-detail-table {
	width: 100%;
	font-size: 13px;
}
.tvtp-detail-vente {
	border-top: 1px solid #eee;
	padding: 16px;
	background: #fff;
}
.tvtp-vente-infos {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	font-size: 12px;
	margin: 8px 0 10px;
}
.tvtp-vente-infos span {
	display: inline-block;
}
.tvtp-vente-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.tvtp-vente-card-titre {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: 1 1 100%;
}
.tvtp-vente-card-titre-text {
	font-weight: 600;
	font-size: 1.05em;
}
.tvtp-vente-card-titre .tvtp-badge--vert {
	background: #2d7a2d;
	color: #fff;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	font-size: 0.85em;
}
.tvtp-vente-card-titre .tvtp-badge--gris,
.tvtp-vente-card-titre .tvtp-badge--orange,
.tvtp-vente-card-titre .tvtp-badge--bleu {
	background: #9e9e9e;
	color: #fff;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	font-size: 0.85em;
}
.tvtp-vente-card-infos {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	font-size: 0.9em;
	color: var(--tvtp-color-text-light);
}
/* Bouton indisponibilités producteurs (alerte ou ok) */
.tvtp-btn-indispo {
	border: none;
	border-radius: 12px;
	padding: 4px 10px;
	font-size: 11px;
	cursor: pointer;
}
.tvtp-btn-indispo--alerte {
	background: #fdecea;
	color: #c0392b;
	font-weight: bold;
}
.tvtp-btn-indispo--ok {
	background: #eaf3de;
	color: #2d7a2d;
}
/* Panneau détail commandes : contour 2px discret, cohérent avec la carte vente parente. */
.tvtp-vente-card-commandes {
	padding: 1rem 1.25rem 1.25rem;
	border: 2px solid #c8e6c9;
	border-width: 2px;
	box-shadow: none;
	margin: 0.75rem 0 0;
	background: #f8fcf8;
}
/* Idem pour les conteneurs imbriqués du détail (évite toute bordure résiduelle). */
.tvtp-vente-card-commandes .tvtp-vente-detail,
.tvtp-vente-card-commandes .tvtp-commandes-container,
.tvtp-vente-card-commandes .tvtp-commandes-onglets,
.tvtp-vente-card-commandes .tvtp-accordeon-container {
	border: none !important;
	box-shadow: none !important;
}
/* Onglets Par client / Par producteur — basculement JS pur */
.tvtp-commandes-onglets {
	margin-top: 0.75rem;
}
.tvtp-commandes-onglets-tabs {
	display: flex;
	gap: 0;
	margin-bottom: 0;
	border-bottom: 2px solid #ddd;
}
.tvtp-onglet-btn {
	padding: 0.5rem 1rem;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-bottom: none;
	border-radius: var(--tvtp-radius) var(--tvtp-radius) 0 0;
	cursor: pointer;
	font-size: 0.9em;
	color: var(--tvtp-color-text);
	margin-bottom: -2px;
}
.tvtp-onglet-btn:hover {
	background: #eee;
}
.tvtp-onglet-btn.tvtp-active {
	background: #2d7a2d;
	color: #fff;
	border-color: #2d7a2d;
}
.tvtp-onglet-panel {
	background: var(--tvtp-color-white);
	border: 1px solid #ddd;
	border-top: none;
	padding: 1rem;
	border-radius: 0 0 var(--tvtp-radius) var(--tvtp-radius);
}
.tvtp-onglet-panel .tvtp-btn-imprimer-onglet {
	margin-bottom: 0.75rem;
	background: #2d7a2d;
	color: #fff;
	border-color: #2d7a2d;
}
.tvtp-onglet-panel .tvtp-btn-imprimer-onglet:hover {
	background: #236619;
	border-color: #236619;
	color: #fff;
}
/* Indentation hiérarchique 3 niveaux (client → producteur → produit) — contours de vente très marqués */
.tvtp-niveau-0 { }
.tvtp-niveau-1 {
	padding: 0.75rem 1rem 0.75rem 1.5rem;
	margin-bottom: 0.75rem;
	border-left: 4px solid #2d7a2d;
	border: 1px solid #2d7a2d;
	border-left-width: 4px;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 1px 4px rgba(45, 122, 45, 0.15);
}
.tvtp-niveau-2 {
	padding-left: 2rem;
	margin: 0.5rem 0 0 1rem;
	border-left: 3px solid rgba(45, 122, 45, 0.6);
	background: #fafafa;
	border-radius: 4px;
	border: 1px solid rgba(45, 122, 45, 0.25);
}
.tvtp-groupe-producteur,
.tvtp-groupe-client {
	margin-bottom: 1rem;
}
.tvtp-groupe-producteur:last-child,
.tvtp-groupe-client:last-child {
	margin-bottom: 0;
}
.tvtp-groupe-producteur-titre,
.tvtp-groupe-client-titre {
	margin: 0 0 0.5rem;
	font-size: 0.95em;
	color: #2d7a2d;
}
@media print {
	.tvtp-vente-card-commandes.tvtp-print-onglet .tvtp-print-hide {
		display: none !important;
	}
}
.tvtp-vente-card-commandes .tvtp-table-commandes {
	margin-top: 1rem;
	background: var(--tvtp-color-white);
	border: 1px solid #ddd;
}
.tvtp-vente-card-commandes .tvtp-table-commandes th,
.tvtp-vente-card-commandes .tvtp-table-commandes td {
	border: 1px solid #ddd;
	padding: 0.5rem 0.75rem;
}
.tvtp-vente-card-commandes .tvtp-table-commandes th {
	background: #f5f5f5;
}
.tvtp-vente-card-commandes .tvtp-total-general td {
	border-top: 2px solid #ddd;
	padding-top: 0.75rem;
	font-size: 1em;
}
.tvtp-commande-details-row td {
	background: #fff;
	vertical-align: top;
}
.tvtp-commande-produits {
	padding: 0.75rem;
}
.tvtp-table-produits {
	width: 100%;
	margin: 0.5rem 0 0;
	font-size: 0.9em;
	border: 1px solid #ddd;
}
.tvtp-table-produits th,
.tvtp-table-produits td {
	border: 1px solid #ddd;
	padding: 0.4rem 0.6rem;
}
.tvtp-table-produits .tvtp-cell-img {
	width: 50px;
}
/* Interface distribution : cases 3 niveaux, dropdown statut, champs incident */
.tvtp-cell-checkbox {
	width: 2rem;
}
.tvtp-cell-checkbox input[type="checkbox"] {
	margin: 0;
}
.tvtp-cell-distribution {
	min-width: 180px;
}
.tvtp-cell-distribution select.tvtp-dist-motif {
	margin-right: 0.5rem;
}
.tvtp-dist-champs-incident {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}
.tvtp-dist-champs-incident label {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
	font-size: 0.85em;
}
/* Bloc erreur de distribution : dropdown client + message d'avertissement */
.tvtp-dist-erreur-client-wrapper {
	display: block;
	width: 100%;
	margin-top: 0.5rem;
	padding: 0.5rem;
	background: #fff8e6;
	border: 1px solid #e6d9a0;
	border-radius: 4px;
}
.tvtp-dist-erreur-client-wrapper .tvtp-dist-remis-client-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 500;
}
.tvtp-dist-erreur-avertissement {
	margin: 0;
	font-size: 0.85em;
	color: #8a6d3b;
}
.tvtp-commandes-distribution-actions {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #ddd;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}
.tvtp-dist-compteur {
	font-size: 0.9em;
	color: var(--tvtp-color-text);
}
.tvtp-groupe-producteur-titre input[type="checkbox"],
.tvtp-groupe-client-titre input[type="checkbox"] {
	margin-right: 0.5rem;
	vertical-align: middle;
}
.tvtp-groupe-producteur-titre .tvtp-dist-producteur-motif {
	margin-left: 0.5rem;
	font-size: 0.9em;
	border-color: #2d7a2d;
}
.tvtp-motif-global-wrapper {
	margin-bottom: 1rem;
	padding: 0.75rem;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
}
.tvtp-motif-global-wrapper label {
	display: block;
	margin: 0;
	font-weight: 500;
	color: #2d7a2d;
}
.tvtp-motif-global-wrapper input.tvtp-motif-global {
	width: 100%;
	max-width: 400px;
	margin-top: 0.25rem;
	padding: 0.4rem 0.6rem;
	border: 1px solid #ddd;
	border-radius: 4px;
}
/* Onglet Distribution : sélecteur vente et vue complète */
.tvtp-distribution-selecteur-ventes {
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.tvtp-distribution-selecteur-ventes select {
	padding: 0.4rem 0.6rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	min-width: 280px;
}
.tvtp-distribution-vente-card .tvtp-vente-card-header {
	margin-bottom: 1rem;
}
.tvtp-distribution-commandes-expanded {
	display: block !important;
}
.tvtp-distribution-actions-header {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}
.tvtp-produit-img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #ddd;
}
.tvtp-dashboard-ventes-links {
	margin: 1rem 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.tvtp-dashboard-ventes-links .tvtp-btn--primary {
	background: #2d7a2d;
	border-color: #2d7a2d;
	color: #fff;
}
.tvtp-dashboard-ventes-links .tvtp-btn--primary:hover {
	background: #236619;
	border-color: #236619;
}

/* Nouvelle interface validation distribution pleine page */
.tvtp-distribution-validation.tvtp-distribution-pleine-page {
	margin: 1rem 0;
}
.tvtp-distribution-validation-header h3 {
	margin: 0 0 1rem;
	font-size: 1.25rem;
}
.tvtp-distribution-bandeau-sauvegarde {
	background: #fff3e0;
	border: 1px solid #ffcc80;
	border-radius: 4px;
	padding: 0.5rem 1rem;
	margin-bottom: 1rem;
	font-size: 0.9rem;
}
.tvtp-distribution-progression {
	margin-bottom: 1.5rem;
}
.tvtp-distribution-progression-text {
	margin: 0 0 0.5rem;
	font-weight: 600;
}
.tvtp-distribution-barre {
	display: flex;
	height: 12px;
	border-radius: 6px;
	overflow: hidden;
	background: #eee;
}
.tvtp-barre-validé { background: #4caf50; }
.tvtp-barre-attente { background: #ff9800; }
.tvtp-barre-manquant { background: #f44336; }
.tvtp-distribution-onglets {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1rem;
}
.tvtp-distribution-onglets .tvtp-onglet-btn {
	padding: 0.5rem 1rem;
	border: 1px solid #ccc;
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
}
.tvtp-distribution-onglets .tvtp-onglet-btn.tvtp-onglet-actif {
	background: var(--tvtp-color-primary);
	color: #fff;
	border-color: var(--tvtp-color-primary);
}
.tvtp-accordeon-dist-item { margin-bottom: 0.5rem; }
.tvtp-accordeon-dist-item summary {
	cursor: pointer;
	padding: 0.6rem 1rem;
	background: #f5f5f5;
	border-radius: 4px;
}
.tvtp-accordeon-dist-body { padding: 0.75rem 1rem; }
/* Structure accordéon : producteur > produit > client / client > producteur > produit */
.tvtp-accordeon-bloc { margin-bottom: 0.5rem; }
.tvtp-producteur-body > .tvtp-accordeon-bloc { margin-left: 0.75rem; }
.tvtp-producteur-bloc { margin-bottom: 0.5rem; }
.tvtp-producteur-header {
	cursor: pointer;
	padding: 0.6rem 1rem;
	background: #f5f5f5;
	border-radius: 4px;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.tvtp-producteur-header:hover { background: #eee; }
.tvtp-producteur-header .tvtp-toggle {
	display: inline-block;
	width: 1.2em;
	text-align: center;
	font-weight: bold;
}
.tvtp-producteur-body {
	padding: 0.75rem 1rem;
	border: 1px solid #eee;
	border-top: none;
	border-radius: 0 0 4px 4px;
	background: #fff;
}
.tvtp-produit-ligne {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.4rem 0;
	border-bottom: 1px solid #eee;
}
.tvtp-produit-ligne:last-child { border-bottom: none; }
.tvtp-accordeon-vide { padding: 1rem; color: #666; }
.tvtp-dist-ligne {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.4rem 0;
	border-bottom: 1px solid #eee;
}
.tvtp-dist-statut-select {
	padding: 0.3rem 0.5rem;
	border-radius: 4px;
	min-width: 120px;
}
.tvtp-distribution-actions {
	display: flex;
	gap: 1rem;
	margin-top: 1.5rem;
}
/* Commandes/lignes annulées en bas d'accordéon — point 7 */
.tvtp-accordeon-annulees {
	margin-top: 1rem;
	padding-top: 0.75rem;
	border-top: 1px dashed #ccc;
}
.tvtp-accordeon-annulees h4 { margin: 0 0 0.5rem; font-size: 0.95rem; color: #666; }
.tvtp-ligne-annulee {
	color: #888;
	font-size: 0.9rem;
	padding: 0.25rem 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.tvtp-badge-annule {
	display: inline-block;
	padding: 0.15rem 0.4rem;
	background: #c0392b;
	color: #fff;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 600;
}
/* Onglet Par client / Par producteur : récapitulatif et accordéon 3 niveaux */
.tvtp-recap-par-client {
	background: #eaf3de;
	padding: 8px;
	border-radius: 6px;
	font-size: 13px;
	margin-bottom: 0.75rem;
}
/* Niveau 1 — Client (Par client) ou Producteur (Par producteur) : contour de vente marqué */
.tvtp-client-niveau1,
.tvtp-producteur-niveau1 {
	background: #fff;
	border: 2px solid #2d7a2d;
	border-left: 5px solid #2d7a2d;
	border-radius: 6px;
	margin-bottom: 0.5rem;
	box-shadow: 0 1px 3px rgba(45, 122, 45, 0.2);
}
.tvtp-niveau1-header,
.tvtp-prod-niveau1-header {
	cursor: pointer;
	padding: 6px 12px;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: nowrap;
	white-space: nowrap;
}
.tvtp-niveau1-header:hover,
.tvtp-prod-niveau1-header:hover { background: #f0f9f0; }
.tvtp-niveau1-body,
.tvtp-prod-niveau1-body { padding: 0 0 0.25rem 0; }
.tvtp-niveau1-body > .tvtp-accordeon-bloc,
.tvtp-prod-niveau1-body > .tvtp-accordeon-bloc { margin-left: 16px; margin-bottom: 0.25rem; }
/* Niveau 2 — Producteur (Par client) ou Client (Par producteur) : contour marqué */
.tvtp-producteur-niveau2,
.tvtp-client-niveau2-prod {
	background: #f0f7f0;
	border: 1px solid #6b9b6b;
	border-left: 4px solid #6b9b6b;
	border-radius: 4px;
	margin-bottom: 0.35rem;
	box-shadow: 0 1px 2px rgba(107, 155, 107, 0.15);
}
.tvtp-niveau2-header {
	cursor: pointer;
	padding: 6px 12px;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: nowrap;
	white-space: nowrap;
}
.tvtp-niveau2-header:hover { background: #e5f0e5; }
.tvtp-niveau2-body { padding: 0 0 0.25rem 0; }
.tvtp-niveau2-body > .tvtp-produit-niveau3 { margin-left: 32px; margin-bottom: 0.25rem; }
/* Niveau 3 — Produit : fond gris très clair, contour léger */
.tvtp-produit-niveau3 {
	padding: 6px 12px;
	font-size: 13px;
	background: #fafafa;
	border: 1px solid #c5dcc5;
	border-left: 3px solid #9ec99e;
	border-radius: 3px;
	margin-bottom: 0.2rem;
}
.tvtp-produit-niveau3.tvtp-produit-annule {
	color: #888;
	text-decoration: line-through;
}
.tvtp-annule-rouge { color: #c0392b; }
.tvtp-annule-qui { font-style: italic; color: #888; font-weight: normal; }
.tvtp-cell-toggle { width: 2.5rem; text-align: center; }
.tvtp-table-distribution-liste {
	margin-top: 1rem;
}

/* Tableaux */
.tvtp-table {
	width: 100%;
	border-collapse: collapse;
}

.tvtp-table th,
.tvtp-table td {
	padding: 0.65rem 0.85rem;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.tvtp-table th {
	background: #f5f5f5;
	font-weight: 600;
}

.tvtp-table tbody tr:hover {
	background: #fafafa;
}

/* Lien relais (colonnes Relais) — texte simple sans encadré, style identique aux autres colonnes
   S'applique au tableau "Relais où vous êtes référencé" et aux invitations */
.tvtp-lien-relais-modale {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-align: left;
}

.tvtp-lien-relais-modale:hover {
	text-decoration: underline;
}

.tvtp-lien-relais-modale--bold {
	font-weight: 600;
}

/* Badges de statut */
.tvtp-badge {
	display: inline-block;
	padding: 0.2rem 0.55rem;
	font-size: 0.78em;
	font-weight: 600;
	border-radius: 20px;
}

.tvtp-badge--actif {
	background: #e8f5e9;
	color: #2e7d32;
}

.tvtp-badge--en_attente {
	background: #fff8e1;
	color: #e65100;
}

/* Badge invitation (Invité) — orange, cohérent avec en_attente */
.tvtp-badge--invite {
	background: #fff8e1;
	color: #e65100;
}

.tvtp-badge--acceptee {
	background: #e8f5e9;
	color: #2e7d32;
}

.tvtp-badge--refusee {
	background: #ffebee;
	color: #c62828;
}

/* Badges statut demandes producteur (wp_tvtp_demandes_producteur) — cohérents avec wp-admin */
.tvtp-badge--attente {
	background: #fff8e1;
	color: #f57f17;
}

.tvtp-badge--complement {
	background: #e3f2fd;
	color: #1565c0;
}

.tvtp-badge--valide {
	background: #e8f5e9;
	color: #2e7d32;
}

.tvtp-badge--refuse {
	background: #ffebee;
	color: #c62828;
}

/* Badges statuts commande TVTP : Remis au client (vert), Litige (rouge) */
.tvtp-badge--tvtp-remis {
	background: #e8f5e9;
	color: #2e7d32;
}

.tvtp-badge--tvtp-litige {
	background: #ffebee;
	color: #c62828;
}

/* Badge indisponibilité producteur — orange (sélections, catalogue relais) */
.tvtp-badge-indispo {
	background: #fff3e0;
	color: #e65100;
}

/* Badge "Complément demandé" — rouge (fiche producteur) */
.tvtp-badge--complement_demande {
	background: #ffebee;
	color: #c62828;
}

/* Badge discret gris pour producteurs non validés (En attente / Complément) en mode dev — vue B2 Invitations */
.tvtp-badge--demande-dev {
	background: #e0e0e0;
	color: #616161;
	font-size: 0.8em;
}

/* Badge "Candidature envoyée" : grisé, non cliquable (cohérent avec en_attente) */
.tvtp-badge-candidature {
	opacity: 0.85;
	cursor: default;
}

/* Badge discret gris pour producteurs non validés (En attente / Complément) en mode dev */
.tvtp-badge--demande-dev {
	background: #e0e0e0;
	color: #616161;
	font-size: 0.8em;
}

/* Boutons */
.tvtp-btn {
	display: inline-block;
	padding: 0.4rem 0.9rem;
	font-size: 0.9em;
	border-radius: 4px;
	border: 1px solid #ddd;
	background: #f5f5f5;
	cursor: pointer;
	transition: background-color var(--tvtp-transition);
}

.tvtp-btn:hover {
	background: #eee;
}

.tvtp-btn--primary {
	background: var(--tvtp-color-primary);
	color: var(--tvtp-color-white);
	border-color: var(--tvtp-color-primary);
}

.tvtp-btn--primary:hover {
	background: #1b5e20;
}

.tvtp-btn-retirer-producteur {
	font-size: 0.85em;
}

/* B4 Mes producteurs : bouton Retirer rouge */
.tvtp-btn-retirer-producteur--danger,
.tvtp-btn--danger {
	color: #fff !important;
	background-color: #c0392b !important;
	border-color: #c0392b !important;
}
.tvtp-btn-retirer-producteur--danger:hover,
.tvtp-btn-retirer-producteur--danger:focus,
.tvtp-btn--danger:hover,
.tvtp-btn--danger:focus {
	background-color: #a93226 !important;
	border-color: #a93226 !important;
	color: #fff !important;
}

/* Onglet vide */
.tvtp-onglet-vide {
	padding: 2rem;
	text-align: center;
	color: var(--tvtp-color-text-light);
	font-style: italic;
}

/* ─── Ma fiche producteur : interface à onglets ─── */
.tvtp-fiche-onglets {
	margin-top: 1rem;
}

.tvtp-fiche-statut {
	margin-bottom: 1rem;
}

.tvtp-fiche-onglets-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid #ddd;
}

.tvtp-fiche-onglet-btn {
	padding: 0.5rem 1rem;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-bottom: none;
	border-radius: 4px 4px 0 0;
	cursor: pointer;
	font-size: 0.9em;
	margin-bottom: -1px;
}

.tvtp-fiche-onglet-btn:hover {
	background: #eee;
}

.tvtp-fiche-onglet-btn.tvtp-active {
	background: #fff;
	border-color: #ddd;
	font-weight: 600;
}

.tvtp-fiche-panel {
	display: none;
	padding: 1.5rem 0;
}

.tvtp-fiche-panel.tvtp-active {
	display: block;
}

.tvtp-fiche-form .tvtp-form-row {
	margin-bottom: 1rem;
}

.tvtp-fiche-form .tvtp-form-row label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.tvtp-fiche-form .tvtp-form-row input[type="text"],
.tvtp-fiche-form .tvtp-form-row input[type="email"],
.tvtp-fiche-form .tvtp-form-row input[type="tel"],
.tvtp-fiche-form .tvtp-form-row input[type="password"],
.tvtp-fiche-form .tvtp-form-row textarea {
	width: 100%;
	max-width: 400px;
	padding: 0.4rem 0.6rem;
}

.tvtp-form-row--inline {
	display: flex;
	gap: 1rem;
}

.tvtp-form-row--inline > div {
	flex: 1;
	max-width: 150px;
}

.tvtp-input-readonly {
	background: #e9ecef !important;
	color: #495057;
	cursor: not-allowed;
}

.tvtp-fiche-info-encadre {
	background: #e3f2fd;
	border: 1px solid #90caf9;
	border-radius: 4px;
	padding: 1rem;
	margin-bottom: 1.5rem;
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
}

.tvtp-fiche-info-encadre p {
	margin: 0;
	color: #1565c0;
}

/* Liste de définitions Mon entreprise : libellé gras à gauche, valeur à droite, sans bordure ni fond */
.tvtp-fiche-entreprise-liste {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.25rem 1.5rem;
	align-items: baseline;
	margin: 0 0 1.5rem 0;
	padding: 0;
	border: none;
	background: none;
}
.tvtp-fiche-entreprise-liste dt {
	font-weight: bold;
	margin: 0;
	padding: 0.5rem 0 0 0;
	border: none;
	background: none;
}
.tvtp-fiche-entreprise-liste dd {
	margin: 0;
	padding: 0.5rem 0 0 0;
	border: none;
	background: none;
	font-weight: normal;
}

.tvtp-fiche-form-actions {
	margin-top: 1.5rem;
}

.tvtp-fiche-message {
	margin-top: 0.75rem;
	padding: 0.5rem 0.75rem;
	border-radius: 4px;
	font-size: 0.9em;
}

.tvtp-fiche-message.tvtp-success {
	background: #e8f5e9;
	color: #2e7d32;
}

.tvtp-fiche-message.tvtp-error {
	background: #ffebee;
	color: #c62828;
}

.tvtp-fiche-photo-current {
	margin-bottom: 1rem;
}

.tvtp-fiche-photo-empty {
	color: #888;
	font-style: italic;
	margin: 0;
}

.tvtp-fiche-photo-hint {
	font-size: 0.85em;
	color: #666;
	margin-top: 0.25rem;
}

.tvtp-optional {
	font-weight: normal;
	color: #666;
}

/* ─── Ma fiche producteur : interface à onglets ─── */
.tvtp-fiche-onglets {
	margin-top: 1rem;
}

.tvtp-fiche-statut {
	margin-bottom: 1rem;
}

.tvtp-fiche-onglets-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin-bottom: 1.25rem;
	border-bottom: 1px solid #e0e0e0;
}

.tvtp-fiche-onglet-btn {
	padding: 0.5rem 1rem;
	font-size: 0.9em;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	cursor: pointer;
	color: #666;
	transition: color 0.2s, border-color 0.2s;
}

.tvtp-fiche-onglet-btn:hover {
	color: var(--tvtp-color-primary, #2e7d32);
}

.tvtp-fiche-onglet-btn.tvtp-active {
	color: var(--tvtp-color-primary, #2e7d32);
	border-bottom-color: var(--tvtp-color-primary, #2e7d32);
	font-weight: 600;
}

.tvtp-fiche-panel {
	display: none;
	padding: 0;
}

.tvtp-fiche-panel.tvtp-active {
	display: block;
}

.tvtp-fiche-form .tvtp-form-row {
	margin-bottom: 1rem;
}

.tvtp-fiche-form .tvtp-form-row label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 500;
}

.tvtp-fiche-form .tvtp-form-row input[type="text"],
.tvtp-fiche-form .tvtp-form-row input[type="email"],
.tvtp-fiche-form .tvtp-form-row input[type="tel"],
.tvtp-fiche-form .tvtp-form-row input[type="password"],
.tvtp-fiche-form .tvtp-form-row textarea {
	width: 100%;
	max-width: 400px;
	padding: 0.4rem 0.6rem;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.tvtp-fiche-form .tvtp-form-row--inline {
	display: flex;
	gap: 1rem;
}

.tvtp-fiche-form .tvtp-form-row--inline > div {
	flex: 1;
	max-width: 150px;
}

.tvtp-input-readonly {
	background: #f5f5f5 !important;
	color: #666 !important;
	cursor: not-allowed;
}

.tvtp-fiche-info-encadre {
	background: #e3f2fd;
	border-left: 4px solid #1976d2;
	padding: 0.75rem 1rem;
	margin-bottom: 1.25rem;
	border-radius: 0 4px 4px 0;
}

.tvtp-fiche-info-encadre .tvtp-fiche-info-icon {
	margin-right: 0.25rem;
}

.tvtp-fiche-info-encadre p {
	margin: 0;
	font-size: 0.9em;
	color: #1565c0;
}

.tvtp-fiche-form-actions {
	margin-top: 1.5rem;
}

.tvtp-fiche-message {
	margin-top: 0.75rem;
	padding: 0.5rem 0.75rem;
	border-radius: 4px;
	font-size: 0.9em;
}

.tvtp-fiche-message.tvtp-success {
	background: #e8f5e9;
	color: #2e7d32;
}

.tvtp-fiche-message.tvtp-error {
	background: #ffebee;
	color: #c62828;
}

.tvtp-fiche-photo-current {
	margin-bottom: 1rem;
}

.tvtp-fiche-photo-empty {
	color: #999;
	font-style: italic;
}

.tvtp-fiche-photo-hint {
	margin-top: 0.25rem;
	font-size: 0.85em;
	color: #666;
}

.tvtp-optional {
	font-weight: normal;
	color: #888;
}

/* Invitations */
.tvtp-invitations-form {
	margin-bottom: 2rem;
}

/* Vue B2 : producteurs déjà invités/associés — ligne grisée */
.tvtp-row-producteur-disabled {
	opacity: 0.6;
	background-color: #f9f9f9;
}

.tvtp-row-producteur-disabled td {
	color: #888;
}

/* Boutons Annuler / Envoyer les invitations */
.tvtp-invitations-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 1rem;
	margin-bottom: 2rem;
}

/* Badge "En attente candidature" (producteur a postulé, en attente de réponse) */
.tvtp-badge--en_attente_candidature {
	background: #e3f2fd;
	color: #1565c0;
}

/* Badge "En attente candidature" (producteur a postulé, en attente de réponse) */
.tvtp-badge--en_attente_candidature {
	background: #e3f2fd;
	color: #1565c0;
}

.tvtp-form-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.tvtp-form-inline input[type="text"] {
	padding: 0.5rem 0.75rem;
	min-width: 200px;
}

.tvtp-liste-invitation {
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0;
}

.tvtp-liste-invitation li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0;
	border-bottom: 1px solid #eee;
}

/* Vue B2 Invitations : producteurs grisés (déjà invités/associés) */
.tvtp-row-producteur-disabled {
	opacity: 0.6;
	background: #f9f9f9;
}

/* Boutons Annuler / Envoyer les invitations */
.tvtp-invitations-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: 1rem;
	margin-bottom: 2rem;
}

/* Badge "En attente candidature" */
.tvtp-badge--en_attente_candidature {
	background: #e3f2fd;
	color: #1565c0;
}

/* Candidatures */
.tvtp-candidature-fiche {
	padding: 1.25rem;
	margin-bottom: 1rem;
	border: 1px solid #e0e0e0;
	border-radius: var(--tvtp-radius);
	background: #fafafa;
}

.tvtp-candidature-header {
	margin-bottom: 0.75rem;
	font-size: 1.05em;
}

.tvtp-candidature-infos p {
	margin: 0.25rem 0;
	font-size: 0.95em;
}

.tvtp-candidature-actions {
	margin-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: flex-start;
}

.tvtp-candidature-actions textarea {
	width: 100%;
	min-width: 200px;
	padding: 0.5rem;
	font-size: 0.9em;
}

/* Boutons Accepter (vert) / Refuser (rouge) dans le tableau candidatures */
.tvtp-candidature-actions-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.tvtp-btn-accepter.tvtp-btn-accepter-candidature,
.tvtp-btn-accepter-candidature {
	background: #2e7d32;
	color: #fff;
	border-color: #2e7d32;
}

.tvtp-btn-accepter.tvtp-btn-accepter-candidature:hover,
.tvtp-btn-accepter-candidature:hover {
	background: #1b5e20;
	border-color: #1b5e20;
	color: #fff;
}

.tvtp-btn-refuser.tvtp-btn-refuser-candidature,
.tvtp-btn-refuser-candidature {
	background: #c62828;
	color: #fff;
	border-color: #c62828;
}

.tvtp-btn-refuser.tvtp-btn-refuser-candidature:hover,
.tvtp-btn-refuser-candidature:hover {
	background: #b71c1c;
	border-color: #b71c1c;
	color: #fff;
}

/* Templates cachés pour messages modales (remplacement variables) */
.tvtp-template-hidden {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

/* Modale fiche producteur — 4 onglets lecture seule */
.tvtp-modale-fiche-lecture .tvtp-fiche-onglets-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin-bottom: 1rem;
	border-bottom: 1px solid #e0e0e0;
}

.tvtp-modale-fiche-lecture .tvtp-fiche-onglet-btn {
	background: none;
	border: none;
	padding: 0.5rem 1rem;
	cursor: pointer;
	font-size: 0.95rem;
	color: #666;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.tvtp-modale-fiche-lecture .tvtp-fiche-onglet-btn:hover {
	color: var(--tvtp-color-text);
}

.tvtp-modale-fiche-lecture .tvtp-fiche-onglet-btn.tvtp-active {
	color: var(--tvtp-color-primary);
	font-weight: 600;
	border-bottom-color: var(--tvtp-color-primary);
}

.tvtp-modale-fiche-lecture .tvtp-fiche-panel-lecture {
	padding: 1rem 0;
}

.tvtp-modale-fiche-lecture .tvtp-fiche-ligne {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 0.5rem 1.5rem;
	margin-bottom: 0.75rem;
	align-items: baseline;
}

.tvtp-modale-fiche-lecture .tvtp-fiche-ligne .tvtp-fiche-label {
	font-weight: 600;
	margin: 0;
}

.tvtp-modale-fiche-lecture .tvtp-fiche-ligne .tvtp-fiche-value {
	margin: 0;
}

.tvtp-modale-fiche-lecture .tvtp-fiche-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-top: 0.25rem;
}

.tvtp-modale-fiche-lecture .tvtp-fiche-badge-item {
	display: inline-block;
	padding: 0.25rem 0.6rem;
	font-size: 0.85rem;
	border-radius: 4px;
	background: #e3f2fd;
	color: #1565c0;
}

.tvtp-modale-fiche-lecture .tvtp-fiche-badge-item.tvtp-badge-cert {
	background: #e8f5e9;
	color: #2e7d32;
}

/* Filtres */
.tvtp-filtres {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.tvtp-filtre {
	padding: 0.5rem 0.75rem;
	min-width: 160px;
}

/* Toggle produit */
.tvtp-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
}

.tvtp-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.tvtp-toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	border-radius: 24px;
	transition: 0.3s;
}

.tvtp-toggle input:checked + .tvtp-toggle-slider {
	background-color: var(--tvtp-color-primary);
}

.tvtp-toggle-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	border-radius: 50%;
	transition: 0.3s;
}

.tvtp-toggle input:checked + .tvtp-toggle-slider:before {
	transform: translateX(20px);
}

/* Messages */
.tvtp-messages-actions {
	margin-bottom: 1rem;
}

.tvtp-form-nouveau-message {
	margin-bottom: 1.5rem;
	padding: 1rem;
	background: #f9f9f9;
	border-radius: var(--tvtp-radius);
}

.tvtp-form-nouveau-message p {
	margin-bottom: 0.75rem;
}

.tvtp-form-nouveau-message label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}

.tvtp-form-nouveau-message select,
.tvtp-form-nouveau-message input,
.tvtp-form-nouveau-message textarea {
	width: 100%;
	max-width: 400px;
	padding: 0.5rem;
}

/* Stock tampon — formulaire ajouter (en dessous du tableau, style TVTP) */
.tvtp-stock-tampon-relais .tvtp-section-titre {
	margin: 0 0 1rem;
	font-size: 1.2rem;
	font-weight: 600;
	color: #1a1a1a;
	border-bottom: 2px solid #2d7a2d;
	padding-bottom: 0.5rem;
}

/* Section formulaire : affichée en dessous du tableau */
.tvtp-stock-tampon-ajouter-section {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid #ddd;
}

.tvtp-stock-tampon-ajouter-section .tvtp-btn-ajouter-produit-stock {
	margin-bottom: 0.5rem;
}

.tvtp-form-ajouter-stock-wrap {
	margin-top: 1rem;
}

/* Bloc formulaire : harmonisé avec les autres formulaires espace relais */
.tvtp-form-ajouter-stock-block {
	padding: 1.25rem;
	background: #fff;
	border-radius: var(--tvtp-radius, 6px);
	border: 1px solid #ddd;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tvtp-form-ajouter-stock-titre {
	margin: 0 0 1rem;
	font-size: 1rem;
	font-weight: 600;
	color: #333;
	border-bottom: 1px solid #eee;
	padding-bottom: 0.5rem;
}

.tvtp-form-ajouter-stock-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 0;
}

.tvtp-form-ajouter-stock .tvtp-form-row {
	margin: 0;
}

.tvtp-form-ajouter-stock .tvtp-form-row label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: #333;
}

/* Champs : largeur cohérente */
.tvtp-form-ajouter-stock select,
.tvtp-form-ajouter-stock input[type="text"],
.tvtp-form-ajouter-stock input[type="number"],
.tvtp-form-ajouter-stock input[type="date"] {
	width: 100%;
	max-width: 100%;
	padding: 0.5rem 0.6rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.95rem;
}

.tvtp-form-ajouter-stock select:focus,
.tvtp-form-ajouter-stock input:focus {
	border-color: #2d7a2d;
	outline: none;
}

/* Boutons verts #2d7a2d comme partout ailleurs */
.tvtp-form-ajouter-stock .tvtp-btn--primary {
	background: #2d7a2d;
	border-color: #2d7a2d;
}

.tvtp-form-ajouter-stock .tvtp-btn--primary:hover {
	background: #257225;
	border-color: #257225;
}

.tvtp-stock-tampon-ajouter-section .tvtp-btn-ajouter-produit-stock {
	background: #2d7a2d;
	border-color: #2d7a2d;
}

.tvtp-stock-tampon-ajouter-section .tvtp-btn-ajouter-produit-stock:hover {
	background: #257225;
	border-color: #257225;
}

.tvtp-form-ajouter-stock .tvtp-form-actions {
	margin: 1rem 0 0;
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.tvtp-table-stock-tampon .tvtp-stock-thumb {
	vertical-align: middle;
	border-radius: 4px;
	object-fit: cover;
	margin-right: 0.5rem;
}

/* Stock tampon — filtres producteur / produit */
.tvtp-stock-tampon-filtres {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin-bottom: 1rem;
}

.tvtp-stock-tampon-filtres label {
	margin: 0;
	font-weight: 600;
	font-size: 0.9rem;
}

.tvtp-stock-tampon-filtres select {
	min-width: 160px;
}

/* Modale détail stock — grande taille */
.tvtp-modale-inner--large {
	max-width: 90vw;
	max-height: 85vh;
	overflow-y: auto;
}

.tvtp-modale-close--top {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	font-size: 1.5rem;
	line-height: 1;
}

.tvtp-detail-actions-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.tvtp-detail-action-block {
	display: inline-block;
}

.tvtp-action-form-inline {
	margin-top: 0.5rem;
	padding: 1rem;
	background: #f9f9f9;
	border-radius: 4px;
	border: 1px solid #ddd;
}

.tvtp-action-form-inline p {
	margin: 0.5rem 0;
}

.tvtp-action-form-inline label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.25rem;
}

.tvtp-btn-danger {
	background: #c62828;
	color: #fff;
	border-color: #c62828;
}

/* Panneau détail accordion sous la ligne produit */
.tvtp-stock-row-detail td {
	vertical-align: top;
	padding: 1rem;
	background: #fafafa;
	border-top: 1px solid #e0e0e0;
}

.tvtp-stock-detail-content {
	padding: 0.5rem 0;
}

.tvtp-stock-detail-titre-inline {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	font-weight: 600;
}

/* Stock tampon producteur — vue lecture seule */
/* Stock tampon producteur — filtre relais */
.tvtp-stock-tampon-producteur-filtres {
	display: flex;
	align-items: center;
	gap: 0.5rem 1rem;
	margin-bottom: 1rem;
}

.tvtp-stock-tampon-producteur-filtres label {
	margin: 0;
	font-weight: 600;
	font-size: 0.9rem;
}

.tvtp-stock-tampon-producteur-filtres select {
	min-width: 180px;
}

.tvtp-stock-tampon-producteur .tvtp-stock-tampon-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.tvtp-stock-tampon-producteur .tvtp-section-titre {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 600;
	color: #1a1a1a;
	border-bottom: 2px solid #2d7a2d;
	padding-bottom: 0.5rem;
}

.tvtp-badge-lecture-seule {
	font-size: 0.75rem;
	padding: 0.25rem 0.5rem;
	background: #f5f5f5;
	color: #666;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-weight: 500;
}

.tvtp-stock-detail-info-lecture-seule {
	margin: 0 0 1rem;
}

.tvtp-notice--info {
	padding: 0.75rem 1rem;
	background: #e3f2fd;
	border-left: 4px solid #1976d2;
	color: #1565c0;
	border-radius: 4px;
	font-size: 0.9rem;
	margin: 0;
}

.tvtp-message-non-lu {
	font-weight: 600;
}

.tvtp-message-non-lu td {
	background: #e3f2fd;
}

/* Statistiques — indicateur producteurs actifs (point 2) */
.tvtp-stats-indicateur-producteurs {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
	padding: 0.5rem 1rem;
	background: #f5f5f5;
	border-radius: 4px;
}
.tvtp-stats-indicateur-valeur { font-weight: 700; font-size: 1.25rem; }
.tvtp-stats-indicateur-label { color: #666; }
.tvtp-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 1.5rem;
}

.tvtp-stats-chart {
	padding: 1rem;
	background: #fafafa;
	border-radius: var(--tvtp-radius);
}

.tvtp-stats-chart h4 {
	margin: 0 0 1rem;
	font-size: 1em;
}

/* Responsive mobile — layout 2 ou 3 colonnes avec hamburger */
@media (max-width: 768px) {
	.tvtp-espace-relais--2colonnes .tvtp-espace-relais-hamburger,
	.tvtp-espace-relais--3colonnes .tvtp-espace-relais-hamburger {
		display: flex;
	}

	.tvtp-espace-relais--2colonnes .tvtp-espace-relais-menu-principal {
		display: none;
		width: 100%;
	}

	.tvtp-espace-relais--2colonnes.tvtp-espace-relais--menu-ouvert .tvtp-espace-relais-menu-principal {
		display: flex;
	}

	.tvtp-espace-relais--2colonnes .tvtp-espace-relais-layout,
	.tvtp-espace-relais--3colonnes .tvtp-espace-relais-layout {
		flex-direction: column;
		min-height: 400px;
	}

	/* Sidebar : annuler sticky sur mobile (layout vertical) */
	.tvtp-espace-relais-sidebar {
		position: relative;
		width: 100%;
		min-width: 0;
		height: auto;
		overflow-y: visible;
	}

	.tvtp-espace-relais--3colonnes .tvtp-espace-relais-menu-principal,
	.tvtp-espace-relais--3colonnes .tvtp-espace-relais-menu-secondaire {
		display: none;
		width: 100%;
	}

	.tvtp-espace-relais--3colonnes.tvtp-espace-relais--menu-ouvert .tvtp-espace-relais-menu-principal,
	.tvtp-espace-relais--3colonnes.tvtp-espace-relais--menu-ouvert .tvtp-espace-relais-menu-secondaire {
		display: flex;
	}

	.tvtp-espace-relais--3colonnes .tvtp-espace-relais-menu-secondaire {
		border-right: none;
		border-bottom: 3px solid #2e7d32;
	}

	.tvtp-espace-relais-contenu {
		padding: 1rem;
	}

	.tvtp-table {
		font-size: 0.9em;
	}

	.tvtp-table th,
	.tvtp-table td {
		padding: 0.5rem;
	}

	.tvtp-dashboard-compteurs {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ─────────────────────────────────────────────
   Espace Producteur — modale distribution relais
   ───────────────────────────────────────────── */
#tvtp-modal-distribution.tvtp-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
#tvtp-modal-distribution .tvtp-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}
#tvtp-modal-distribution .tvtp-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	width: 90%;
	max-width: 500px;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	padding: 20px;
}
#tvtp-modal-distribution .tvtp-modal-titre {
	margin: 0 0 0.5em;
	font-size: 1.2em;
}
#tvtp-modal-distribution .tvtp-modal-produit-nom {
	margin: 0 0 1em;
	font-weight: 600;
	color: #333;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options {
	margin-bottom: 1em;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options label {
	display: block;
	margin: 0.3em 0;
	cursor: pointer;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais {
	margin: 1em 0;
	max-height: 200px;
	overflow-y: auto;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais label {
	display: block;
	margin: 0.25em 0;
	cursor: pointer;
}
#tvtp-modal-distribution .tvtp-modal-actions {
	margin-top: 1.5em;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}
.tvtp-lien-distribution {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: #2e7d32;
	text-decoration: underline;
	cursor: pointer;
}
.tvtp-lien-distribution:hover {
	color: #1b5e20;
}

/* Fiches produits : colonnes Commandes en cours et Stock */
.tvtp-table-produits .tvtp-cell-commandes-encours {
	text-align: center;
	font-weight: 600;
}
.tvtp-table-produits .tvtp-cell-stock .tvtp-input-stock {
	width: 70px;
	max-width: 100%;
}
.tvtp-table-produits .tvtp-cell-stock .tvtp-stock-valeur {
	display: none;
}

/* ─────────────────────────────────────────────
   Espace Producteur — modale distribution relais
   ───────────────────────────────────────────── */
#tvtp-modal-distribution {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
#tvtp-modal-distribution[hidden] {
	display: none !important;
}
#tvtp-modal-distribution .tvtp-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	cursor: pointer;
}
#tvtp-modal-distribution .tvtp-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	width: 90%;
	max-width: 480px;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	padding: 20px;
}
#tvtp-modal-distribution .tvtp-modal-titre {
	margin: 0 0 0.5em;
	font-size: 1.2em;
}
#tvtp-modal-distribution .tvtp-modal-produit-nom {
	margin: 0 0 1em;
	font-weight: 600;
	color: #333;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options {
	margin-bottom: 1em;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options label {
	display: block;
	margin: 0.4em 0;
	cursor: pointer;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais {
	margin: 1em 0;
	max-height: 200px;
	overflow-y: auto;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais label {
	display: block;
	margin: 0.3em 0;
	cursor: pointer;
}
#tvtp-modal-distribution .tvtp-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 1.5em;
	padding-top: 1em;
	border-top: 1px solid #eee;
}
.tvtp-lien-distribution {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: #2e7d32;
	text-decoration: underline;
	cursor: pointer;
}
.tvtp-lien-distribution:hover {
	color: #1b5e20;
}

/* ─────────────────────────────────────────────
   Espace Producteur — Distribution (modale + lien cliquable)
   ───────────────────────────────────────────── */
.tvtp-lien-distribution {
	background: none;
	border: none;
	color: var(--tvtp-color-primary, #2e7d32);
	cursor: pointer;
	font: inherit;
	text-decoration: underline;
	padding: 0;
}
.tvtp-lien-distribution:hover {
	text-decoration: none;
}

#tvtp-modal-distribution.tvtp-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
#tvtp-modal-distribution .tvtp-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}
#tvtp-modal-distribution .tvtp-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	width: 90%;
	max-width: 500px;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	padding: 20px;
}
#tvtp-modal-distribution .tvtp-modal-titre {
	margin: 0 0 0.5em;
	font-size: 1.2em;
}
#tvtp-modal-distribution .tvtp-modal-produit-nom {
	margin: 0 0 1em;
	font-weight: 600;
	color: #333;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options {
	margin-bottom: 1em;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options label {
	display: block;
	margin: 0.3em 0;
	cursor: pointer;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais {
	margin: 1em 0;
	max-height: 200px;
	overflow-y: auto;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais label {
	display: block;
	margin: 0.4em 0;
	cursor: pointer;
}
#tvtp-modal-distribution .tvtp-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 1.5em;
	padding-top: 1em;
	border-top: 1px solid #eee;
}

/* ─────────────────────────────────────────────
   Modale distribution (A1 Fiches produits)
   ───────────────────────────────────────────── */
#tvtp-modal-distribution.tvtp-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
#tvtp-modal-distribution .tvtp-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}
#tvtp-modal-distribution .tvtp-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	width: 90%;
	max-width: 480px;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	padding: 20px;
}
#tvtp-modal-distribution .tvtp-modal-titre {
	margin: 0 0 0.5em;
	font-size: 1.2em;
}
#tvtp-modal-distribution .tvtp-modal-produit-nom {
	margin: 0 0 1em;
	font-weight: 600;
	color: #333;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options {
	margin-bottom: 1em;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options label {
	display: block;
	margin: 0.3em 0;
	cursor: pointer;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais {
	margin: 1em 0;
	max-height: 200px;
	overflow-y: auto;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais label {
	display: block;
	margin: 0.25em 0;
	cursor: pointer;
}
#tvtp-modal-distribution .tvtp-modal-actions {
	margin-top: 1.5em;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}
.tvtp-lien-distribution {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: #2e7d32;
	text-decoration: underline;
	cursor: pointer;
}
.tvtp-lien-distribution:hover {
	color: #1b5e20;
}

/* ─────────────────────────────────────────────
   Espace Producteur — Distribution (modale + lien cliquable)
   ───────────────────────────────────────────── */
.tvtp-lien-distribution {
	background: none;
	border: none;
	color: var(--tvtp-color-primary, #2e7d32);
	cursor: pointer;
	font: inherit;
	text-decoration: underline;
	padding: 0;
}
.tvtp-lien-distribution:hover {
	text-decoration: none;
}

#tvtp-modal-distribution.tvtp-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
#tvtp-modal-distribution .tvtp-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}
#tvtp-modal-distribution .tvtp-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	width: 90%;
	max-width: 480px;
	padding: 20px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
#tvtp-modal-distribution .tvtp-modal-titre {
	margin: 0 0 8px;
	font-size: 1.2em;
}
#tvtp-modal-distribution .tvtp-modal-produit-nom {
	margin: 0 0 16px;
	color: #666;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options {
	margin-bottom: 12px;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options label {
	display: block;
	margin: 4px 0;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais {
	margin: 12px 0;
	max-height: 200px;
	overflow-y: auto;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais label {
	display: block;
	margin: 4px 0;
}
#tvtp-modal-distribution .tvtp-modal-actions {
	display: flex;
	gap: 10px;
	margin-top: 20px;
	justify-content: flex-end;
}

/* ─────────────────────────────────────────────
   Modale distribution (A1 Fiches produits)
   ───────────────────────────────────────────── */
#tvtp-modal-distribution.tvtp-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
#tvtp-modal-distribution .tvtp-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}
#tvtp-modal-distribution .tvtp-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	padding: 20px;
	max-width: 480px;
	width: 90%;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
#tvtp-modal-distribution .tvtp-modal-titre {
	margin: 0 0 0.5em;
	font-size: 1.2em;
}
#tvtp-modal-distribution .tvtp-modal-produit-nom {
	margin: 0 0 1em;
	color: #555;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options {
	margin-bottom: 1em;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options label {
	display: block;
	margin: 0.4em 0;
	cursor: pointer;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais {
	margin-bottom: 1em;
	max-height: 200px;
	overflow-y: auto;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais label {
	display: block;
	margin: 0.3em 0;
	cursor: pointer;
}
#tvtp-modal-distribution .tvtp-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 1em;
}
.tvtp-lien-distribution {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: #2e7d32;
	text-decoration: underline;
	cursor: pointer;
}
.tvtp-lien-distribution:hover {
	color: #1b5e20;
}

/* ─────────────────────────────────────────────
   Modale distribution (Fiches produits A1)
   ───────────────────────────────────────────── */
#tvtp-modal-distribution.tvtp-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
#tvtp-modal-distribution .tvtp-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}
#tvtp-modal-distribution .tvtp-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	width: 90%;
	max-width: 480px;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	padding: 20px;
}
#tvtp-modal-distribution .tvtp-modal-titre {
	margin: 0 0 0.5em;
	font-size: 1.2em;
}
#tvtp-modal-distribution .tvtp-modal-produit-nom {
	margin: 0 0 1em;
	color: #555;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options {
	margin-bottom: 1em;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options label {
	display: block;
	margin: 0.4em 0;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais {
	margin-bottom: 1em;
	max-height: 200px;
	overflow-y: auto;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais label {
	display: block;
	margin: 0.3em 0;
}
#tvtp-modal-distribution .tvtp-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 1em;
}
.tvtp-lien-distribution {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: #2e7d32;
	text-decoration: underline;
	cursor: pointer;
}
.tvtp-lien-distribution:hover {
	color: #1b5e20;
}

/* ─────────────────────────────────────────────
   Espace Producteur — utilitaires
   ───────────────────────────────────────────── */
/* Modale distribution (Fiches produits A1) */
#tvtp-modal-distribution.tvtp-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
#tvtp-modal-distribution .tvtp-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}
#tvtp-modal-distribution .tvtp-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	width: 90%;
	max-width: 500px;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	padding: 20px;
}
#tvtp-modal-distribution .tvtp-modal-titre {
	margin: 0 0 0.5em;
	font-size: 1.2em;
}
#tvtp-modal-distribution .tvtp-modal-produit-nom {
	margin: 0 0 1em;
	font-weight: 600;
	color: #333;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options {
	margin-bottom: 1em;
}
#tvtp-modal-distribution .tvtp-modal-affectation-options label {
	display: block;
	margin: 0.3em 0;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais {
	margin-bottom: 1em;
	max-height: 200px;
	overflow-y: auto;
}
#tvtp-modal-distribution .tvtp-modal-affectation-relais label {
	display: block;
	margin: 0.3em 0;
}
#tvtp-modal-distribution .tvtp-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 1em;
}
.tvtp-lien-distribution {
	background: none;
	border: none;
	color: #2e7d32;
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
	padding: 0;
}
.tvtp-lien-distribution:hover {
	color: #1b5e20;
}

.tvtp-hidden {
	display: none !important;
}

/* ─────────────────────────────────────────────
   Espace Producteur — Formulaire produit
   (création / modification fiches produits)
   ───────────────────────────────────────────── */
.tvtp-formulaire-produit-container {
	margin-top: 1.5rem;
	padding: 1.5rem;
	background: var(--tvtp-color-bg);
	border-radius: var(--tvtp-radius);
	border: 1px solid #e0e0e0;
}
.tvtp-formulaire-produit-container .tvtp-btn-retour-catalogue {
	margin-bottom: 1.5rem;
	background: #f5f5f5;
	border-color: #ddd;
	color: var(--tvtp-color-text);
}
.tvtp-formulaire-produit-container .tvtp-btn-retour-catalogue:hover {
	background: #eee;
}
.tvtp-formulaire-produit {
	max-width: 900px;
}
.tvtp-formulaire-produit-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}
@media (max-width: 768px) {
	.tvtp-formulaire-produit-grid {
		grid-template-columns: 1fr;
	}
}
.tvtp-formulaire-produit-col p {
	margin-bottom: 1rem;
}
.tvtp-formulaire-produit-col label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	color: var(--tvtp-color-text);
}
.tvtp-formulaire-produit-col input[type="text"],
.tvtp-formulaire-produit-col input[type="number"],
.tvtp-formulaire-produit-col select,
.tvtp-formulaire-produit-col textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.5rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
}
.tvtp-formulaire-produit-col .tvtp-produit-description-editor {
	width: 100%;
}
.tvtp-upload-photos {
	border: 2px dashed #ccc;
	border-radius: var(--tvtp-radius);
	padding: 1.5rem;
	background: #fafafa;
	text-align: center;
	transition: border-color var(--tvtp-transition), background var(--tvtp-transition);
}
.tvtp-upload-photos:hover,
.tvtp-upload-photos.drag-over {
	border-color: var(--tvtp-color-primary);
	background: #f1f8f1;
}
.tvtp-upload-photos input[type="file"] {
	display: block;
	margin: 0 auto 0.75rem;
}
.tvtp-upload-photos-preview,
.tvtp-upload-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}
.tvtp-upload-photos-preview img,
.tvtp-upload-photos-preview .tvtp-preview-thumb-wrap,
.tvtp-upload-preview img {
	max-width: 80px;
	max-height: 80px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #ddd;
}
.tvtp-preview-thumb-wrap {
	position: relative;
	display: inline-block;
}
.tvtp-preview-thumb-wrap img {
	max-width: 80px;
	max-height: 80px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #ddd;
}
.tvtp-preview-thumb-wrap .tvtp-preview-remove {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 22px;
	height: 22px;
	padding: 0;
	border: none;
	background: #c62828;
	color: #fff;
	border-radius: 50%;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}
.tvtp-preview-thumb-wrap .tvtp-preview-remove:hover {
	background: #b71c1c;
}
.tvtp-produit-certifications {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}
.tvtp-produit-certifications .tvtp-checkbox-inline {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: normal;
	margin: 0;
}
.tvtp-formulaire-produit .tvtp-btn--primary {
	margin-top: 1rem;
}
.tvtp-lien-edit-produit {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: var(--tvtp-color-primary);
	text-decoration: underline;
	cursor: pointer;
}
.tvtp-lien-edit-produit:hover {
	color: #1b5e20;
}
/* En-tête : bouton Créer à gauche, filtre indisponibles à droite */
.tvtp-fiches-produits-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 1rem;
}
.tvtp-btn-filtre-indisponibles {
	background: #f5f5f5;
	border: 1px solid #ddd;
	color: var(--tvtp-color-text);
}
.tvtp-btn-filtre-indisponibles:hover {
	background: #eee;
	border-color: #ccc;
}
/* Lignes produits indisponibles (toggle OFF) : affichage grisé */
.tvtp-produit-indisponible {
	opacity: 0.6;
	background-color: #f5f5f5;
}
.tvtp-produit-indisponible td {
	color: #757575;
}
/* Toggle ON/OFF (bouton radio visuel) */
.tvtp-cell-disponible {
	text-align: center;
}
.tvtp-toggle-disponible {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 52px;
	padding: 0.35rem 0.75rem;
	border: 2px solid #ccc;
	border-radius: 20px;
	font-size: 0.85em;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.tvtp-toggle-disponible:disabled {
	opacity: 0.7;
	cursor: wait;
}
.tvtp-toggle-on {
	background-color: var(--tvtp-color-primary) !important;
	border-color: var(--tvtp-color-primary) !important;
	color: #fff !important;
}
.tvtp-toggle-on:hover:not(:disabled) {
	background-color: #1b5e20;
	border-color: #1b5e20;
}
.tvtp-toggle-off {
	background-color: #fff;
	border-color: #9e9e9e;
	color: #757575;
}
.tvtp-toggle-off:hover:not(:disabled) {
	background-color: #f5f5f5;
	border-color: #757575;
}

/* ─────────────────────────────────────────────
   Dashboard préparation — Vue ventes par jour
   Design TVTP : vert #2d7a2d, fond blanc, texte #333, bordures #ddd
   ───────────────────────────────────────────── */
.tvtp-dashboard-preparation .tvtp-preparation-vide,
.tvtp-dashboard-preparation .tvtp-preparation-vide-message {
	padding: 2rem;
	text-align: center;
	color: var(--tvtp-color-text-light);
	font-style: italic;
}
.tvtp-preparation-jour-header-beige {
	background: #f5f0e6 !important;
	border-bottom: 2px solid #e0d5c0;
}
.tvtp-preparation-jour-header-beige .tvtp-preparation-jour-jour {
	font-size: 1.2em;
	font-weight: 600;
}

/* Panneau détail inline — accordéon tableau de bord producteur */
.tvtp-preparation-detail-panel {
	margin-left: 1rem;
	margin-bottom: 1rem;
	padding: 0 1rem 1rem;
	background: #fafafa;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
}
.tvtp-preparation-detail-panel[hidden] {
	display: none !important;
}
.tvtp-detail-panel-tab.tvtp-active {
	background: #fff !important;
	border-color: #8b1a1a !important;
}
.tvtp-detail-panel-tab:not(.tvtp-active) {
	background: #fdf6f0 !important;
	border-color: #ccc !important;
}
.tvtp-preparation-detail-toggle {
	background: none;
	border: none;
	padding: 0;
	color: var(--tvtp-color-primary);
	text-decoration: underline;
	cursor: pointer;
	font-size: inherit;
}
.tvtp-preparation-detail-toggle:hover {
	color: #1b5e20;
}

.tvtp-preparation-relais-ligne {
	display: grid;
	grid-template-columns: 1fr auto auto auto;
	align-items: center;
	gap: 1rem;
}
@media (max-width: 768px) {
	.tvtp-preparation-relais-ligne {
		grid-template-columns: 1fr;
	}
}
.tvtp-badge-ouverte { background: #2d7a2d; color: #fff; }
.tvtp-badge-cloturee { background: #e68a00; color: #fff; }
.tvtp-badge-attente-validation { background: #c0392b; color: #fff; }
.tvtp-preparation-jour {
	margin-bottom: 2rem;
}
/* En-tête par date : checkbox + jour/mois deux lignes + stats + bouton */
.tvtp-preparation-jour-header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	margin-bottom: 1rem;
	padding: 1rem;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: var(--tvtp-radius);
}
.tvtp-preparation-jour-gauche {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.tvtp-preparation-jour-cb {
	width: 1.1em;
	height: 1.1em;
	flex-shrink: 0;
}
.tvtp-preparation-jour-date {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	cursor: pointer;
}
.tvtp-preparation-jour-jour {
	font-size: 1.05em;
	color: #333;
}
.tvtp-preparation-jour-mois {
	font-size: 0.9em;
	color: var(--tvtp-color-text-light);
}
.tvtp-preparation-jour-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	font-size: 0.95em;
	color: #333;
}
.tvtp-preparation-jour-stats .tvtp-preparation-stat {
	white-space: nowrap;
}
.tvtp-preparation-jour-header .tvtp-preparation-documents {
	margin-left: auto;
}
/* Ligne par relais : checkbox + nom gras + adresse + statut coloré + CA + actions + Voir le détail */
.tvtp-preparation-relais,
.tvtp-preparation-relais-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
	margin-bottom: 1rem;
	padding: 1rem;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: var(--tvtp-radius);
	page-break-after: always;
}
.tvtp-preparation-relais:last-child,
.tvtp-preparation-relais-card:last-child {
	margin-bottom: 0;
	page-break-after: auto;
}
.tvtp-preparation-relais-gauche {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	min-width: 0;
}
.tvtp-preparation-relais-cb {
	width: 1.1em;
	height: 1.1em;
	margin-top: 0.2em;
	flex-shrink: 0;
}
.tvtp-preparation-relais-infos {
	flex: 1;
	min-width: 120px;
}
.tvtp-preparation-relais-nom {
	display: block;
	margin: 0 0 0.15rem;
	font-size: 1em;
	color: #333;
}
.tvtp-preparation-relais-adresse {
	margin: 0;
	font-size: 0.85em;
	color: var(--tvtp-color-text-light);
}
/* Statut : vert si en cours, gris si terminée */
.tvtp-preparation-relais-statut {
	font-size: 0.9em;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
}
.tvtp-preparation-statut-vert {
	background: #e8f5e9;
	color: #2d7a2d;
}
.tvtp-preparation-statut-gris {
	background: #f5f5f5;
	color: #757575;
}
.tvtp-preparation-relais-chiffres {
	display: flex;
	gap: 1rem;
	font-size: 0.95em;
	color: #333;
}
.tvtp-preparation-relais-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}
.tvtp-preparation-action {
	font-size: 0.9em;
	color: #2d7a2d;
}
.tvtp-preparation-voir-detail {
	margin-left: auto;
}

/* Modale Imprimer bon de distribution — bouton fermer en haut à droite, descriptions grises */
.tvtp-modale-impression .tvtp-modale-content {
	position: relative;
}
.tvtp-modale-impression .tvtp-modale-fermer {
	position: absolute;
	top: 12px;
	right: 12px;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #666;
	padding: 0;
	line-height: 1;
}
.tvtp-modale-impression .tvtp-modale-fermer:hover {
	color: #333;
}
.tvtp-modale-impression-boutons {
	display: flex;
	gap: 12px;
	margin-top: 16px;
	flex-wrap: wrap;
}
.tvtp-modale-impression-bloc {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
.tvtp-modale-impression-desc {
	margin: 0.35em 0 0;
	font-size: 12px;
	color: #666;
}

/* Modale Télécharger les documents — design TVTP #2d7a2d, #333, #ddd */
#tvtp-modale-documents .tvtp-modale-content {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: var(--tvtp-radius);
	color: #333;
	padding: 1.5rem;
}
#tvtp-modale-documents .tvtp-modale-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 0;
}
#tvtp-modale-documents .tvtp-modale-close:hover {
	color: #333;
}
#tvtp-modale-documents .tvtp-modale-titre {
	margin: 0 0 1rem;
	font-size: 1.25em;
	color: #333;
}
#tvtp-modale-documents .tvtp-modale-documents-info {
	margin: 0 0 1.5rem;
	font-size: 0.95em;
	color: #333;
}
#tvtp-modale-documents .tvtp-modale-documents-relais {
	margin-bottom: 1.5rem;
}
#tvtp-modale-documents .tvtp-modale-documents-relais label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}
#tvtp-modale-documents .tvtp-modale-documents-relais select {
	min-width: 200px;
	padding: 0.35rem 0.5rem;
}
#tvtp-modale-documents .tvtp-modale-documents-section {
	margin-bottom: 1.5rem;
	padding: 1rem;
	border: 1px solid #ddd;
	border-radius: var(--tvtp-radius);
	background: #fafafa;
}
#tvtp-modale-documents .tvtp-modale-documents-section h3 {
	margin: 0 0 0.75rem;
	font-size: 1em;
	color: #333;
}
#tvtp-modale-documents .tvtp-modale-documents-formats {
	display: flex;
	gap: 1rem;
	margin-bottom: 0.75rem;
}
#tvtp-modale-documents .tvtp-modale-documents-formats label {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	cursor: pointer;
}
#tvtp-modale-documents .tvtp-btn--primary {
	background: #2d7a2d;
	border-color: #2d7a2d;
	color: #fff;
}
#tvtp-modale-documents .tvtp-btn--primary:hover {
	background: #236619;
	border-color: #236619;
}
#tvtp-modale-documents .tvtp-modale-fermer {
	background: #fff;
	border: 1px solid #ddd;
	color: #333;
	margin-top: 0.5rem;
}
#tvtp-modale-documents .tvtp-modale-fermer:hover {
	background: #f5f5f5;
	border-color: #2d7a2d;
	color: #2d7a2d;
}

/* Modale Modifier la vente — style TVTP vert #2d7a2d */
#tvtp-modale-modifier-vente .tvtp-modale-modifier-vente-content .tvtp-btn--primary,
#tvtp-modale-modifier-vente .tvtp-btn-enregistrer-modifier-vente {
	background: #2d7a2d;
	border-color: #2d7a2d;
	color: #fff;
}
#tvtp-modale-modifier-vente .tvtp-btn-enregistrer-modifier-vente:hover {
	background: #236619;
	border-color: #236619;
}
#tvtp-modale-modifier-vente .tvtp-form-modifier-vente label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}
#tvtp-modale-modifier-vente .tvtp-form-modifier-vente p {
	margin-bottom: 1rem;
}
#tvtp-modale-modifier-vente .tvtp-form-modifier-vente input,
#tvtp-modale-modifier-vente .tvtp-form-modifier-vente textarea {
	width: 100%;
	max-width: 100%;
}
#tvtp-modale-modifier-vente .tvtp-modale-modifier-vente-loading {
	padding: 2rem;
	text-align: center;
	color: #666;
}

.tvtp-preparation-relais-detail {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #eee;
}
.tvtp-preparation-relais-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}
.tvtp-preparation-relais-header h4 {
	margin: 0;
	font-size: 1.1em;
}
.tvtp-preparation-relais h5 {
	margin: 1rem 0 0.5rem;
	font-size: 0.95em;
}
.tvtp-preparation-relais .tvtp-table {
	margin-bottom: 0.5rem;
}
.tvtp-notice-preparation-email {
	margin-bottom: 1.5rem;
}
.tvtp-btn-link {
	background: none;
	border: none;
	padding: 0;
	color: var(--tvtp-color-primary);
	text-decoration: underline;
	cursor: pointer;
	font-size: inherit;
}
.tvtp-btn-link:hover {
	color: #1b5e20;
}
.tvtp-print-hide {
	display: none !important;
}

/* ─────────────────────────────────────────────
   Impression bons de préparation — @media print
   Masquer menu, header, footer, boutons ; afficher tableaux en A4 ; saut de page entre relais
   ───────────────────────────────────────────── */
@media print {
	/* Masquer menu gauche, header, footer, boutons non liés à l'impression */
	.tvtp-espace-relais-sidebar,
	.tvtp-espace-relais-hamburger,
	.tvtp-notice-preparation-email,
	.tvtp-preparation-imprimer-tout,
	.tvtp-preparation-imprimer-relais,
	.tvtp-preparation-detail-panel,
	.tvtp-preparation-detail-toggle,
	.tvtp-preparation-documents,
	.tvtp-preparation-voir-detail,
	.tvtp-preparation-jour-cb,
	.tvtp-preparation-relais-cb,
	.tvtp-btn,
	header.site-header,
	header.entry-header,
	footer.site-footer,
	.tvtp-preparation-jour-header .tvtp-btn,
	.tvtp-preparation-relais-header .tvtp-btn,
	.tvtp-preparation-relais-actions .tvtp-btn {
		display: none !important;
	}
	/* Éléments masqués manuellement avant impression (Imprimer ce relais) */
	.tvtp-print-hide {
		display: none !important;
	}
	/* Layout : contenu pleine largeur pour A4 */
	.tvtp-espace-relais-layout {
		display: block !important;
	}
	.tvtp-espace-relais-contenu {
		width: 100% !important;
		max-width: none !important;
		padding: 0 !important;
	}
	/* Afficher proprement les tableaux en A4 */
	.tvtp-dashboard-preparation {
		width: 100%;
		max-width: 210mm;
		margin: 0;
		padding: 0;
	}
	/* Saut de page entre chaque relais */
	.tvtp-preparation-relais {
		page-break-after: always;
		break-after: page;
		padding: 0.5rem 0;
		background: none;
		border: none;
	}
	.tvtp-preparation-relais:last-child {
		page-break-after: auto;
		break-after: auto;
	}
	.tvtp-table-preparation-produits,
	.tvtp-table-preparation-commandes {
		width: 100%;
		font-size: 10pt;
	}
	.tvtp-table-preparation-produits th,
	.tvtp-table-preparation-produits td,
	.tvtp-table-preparation-commandes th,
	.tvtp-table-preparation-commandes td {
		padding: 0.25rem 0.4rem;
		border: 1px solid #333;
	}
	.tvtp-preparation-relais-header {
		margin-bottom: 0.75rem;
	}
}

/* ─────────────────────────────────────────────
   Vue détail distribution — espace producteur
   ───────────────────────────────────────────── */
.tvtp-detail-distribution {
	margin-bottom: 2rem;
}
.tvtp-detail-distribution-onglets {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1rem 0;
	border-bottom: 2px solid #eee;
	padding-bottom: 0.5rem;
}
.tvtp-detail-onglet-btn {
	background: none;
	border: none;
	padding: 0.5rem 1rem;
	cursor: pointer;
	font-size: 0.95em;
	color: var(--tvtp-color-text-light);
}
.tvtp-detail-onglet-btn:hover,
.tvtp-detail-onglet-btn.tvtp-active {
	color: var(--tvtp-color-primary);
	font-weight: 600;
}
.tvtp-detail-compteurs {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin: 1rem 0;
}
.tvtp-detail-compteur {
	text-align: center;
	min-width: 100px;
}
.tvtp-detail-compteur-valeur {
	display: block;
	font-size: 1.5em;
	font-weight: 700;
	color: var(--tvtp-color-primary);
}
.tvtp-detail-compteur-label {
	font-size: 0.85em;
	color: var(--tvtp-color-text-light);
}
.tvtp-detail-bloc-relais {
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: var(--tvtp-radius);
	padding: 1rem;
	margin: 1rem 0;
}
.tvtp-detail-bloc-relais h3 {
	margin: 0 0 0.75rem;
	font-size: 1.1em;
}
.tvtp-detail-bloc-relais p {
	margin: 0.25rem 0;
}
.tvtp-detail-tableau-produits {
	margin: 1.5rem 0;
}
.tvtp-detail-tableau-produits h3 {
	margin: 0 0 0.75rem;
	font-size: 1.1em;
}
.tvtp-table-detail-produits tfoot td {
	border-top: 2px solid #333;
	padding-top: 0.5rem;
}

/* Onglets Produits / Membres dans la vue détail distribution */
.tvtp-detail-contenu-onglets {
	margin: 1.5rem 0;
}
.tvtp-detail-contenu-tabs {
	display: flex;
	gap: 0.25rem;
	margin-bottom: 1rem;
	border-bottom: 1px solid #e0e0e0;
}
.tvtp-detail-contenu-tab {
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 0.5rem 1rem;
	cursor: pointer;
	font-size: 0.95em;
	color: var(--tvtp-color-text-light);
	margin-bottom: -1px;
	transition: color 0.2s, border-color 0.2s;
}
.tvtp-detail-contenu-tab:hover {
	color: var(--tvtp-color-primary);
}
.tvtp-detail-contenu-tab.tvtp-active {
	color: var(--tvtp-color-primary);
	font-weight: 600;
	border-bottom-color: var(--tvtp-color-primary);
}
.tvtp-detail-tab-panel {
	padding-top: 0.5rem;
}
.tvtp-detail-tab-panel[hidden] {
	display: none !important;
}
.tvtp-detail-panel-desc {
	margin: 0 0 0.75rem;
	font-size: 0.9em;
	color: var(--tvtp-color-text-light);
}

/* Tableau Membres : avatars et lignes dépliables */
.tvtp-table-detail-membres {
	width: 100%;
	margin-top: 0.5rem;
	border-collapse: collapse;
}
.tvtp-table-detail-membres th,
.tvtp-table-detail-membres td {
	padding: 0.6rem;
	border-bottom: 1px solid #eee;
	text-align: left;
	vertical-align: middle;
}
.tvtp-detail-membre-client {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.tvtp-detail-membre-client .avatar,
.tvtp-avatar-client {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.tvtp-detail-membre-lignes td {
	background: #f8f9fa;
	padding: 1rem;
}
.tvtp-table-lignes-commande {
	width: 100%;
	margin: 0;
	font-size: 0.9em;
}
.tvtp-table-lignes-commande th,
.tvtp-table-lignes-commande td {
	padding: 0.4rem;
	border: none;
	border-bottom: 1px solid #eee;
}
.tvtp-ligne-produit-photo {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 4px;
}
.tvtp-ligne-produit-placeholder {
	display: inline-block;
	width: 40px;
	text-align: center;
	color: var(--tvtp-color-text-light);
}
.tvtp-detail-vide {
	margin: 1rem 0;
	color: var(--tvtp-color-text-light);
	font-style: italic;
}

/* ─────────────────────────────────────────────
   Espace admin frontend [tvtp_espace_admin]
   ───────────────────────────────────────────── */
.tvtp-espace-admin .tvtp-nav-tabs {
	display: flex;
	gap: 0.5rem;
	margin: 1rem 0;
	border-bottom: 1px solid #ccc;
}
.tvtp-espace-admin .tvtp-nav-tab {
	padding: 0.5rem 1rem;
	text-decoration: none;
	color: var(--tvtp-color-text);
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}
.tvtp-espace-admin .tvtp-nav-tab:hover {
	color: var(--tvtp-color-primary);
}
.tvtp-espace-admin .tvtp-nav-tab--active {
	font-weight: 600;
	color: var(--tvtp-color-primary);
	border-bottom-color: var(--tvtp-color-primary);
}
.tvtp-espace-admin .tvtp-tableau-filtres,
.tvtp-espace-admin .tvtp-admin-ventes-filtres,
.tvtp-espace-admin .tvtp-admin-litiges-filtres,
.tvtp-espace-admin .tvtp-admin-stock-filtres {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin: 1rem 0;
}
.tvtp-espace-admin .tvtp-filtre,
.tvtp-espace-admin .tvtp-filtres-form select {
	padding: 0.35rem 0.75rem;
	border-radius: var(--tvtp-radius);
	border: 1px solid #ccc;
	background: var(--tvtp-color-white);
}
.tvtp-espace-admin .tvtp-filtre {
	text-decoration: none;
	color: var(--tvtp-color-text);
}
.tvtp-espace-admin .tvtp-filtre:hover,
.tvtp-espace-admin .tvtp-filtre--actif {
	color: var(--tvtp-color-primary);
	font-weight: 600;
}
.tvtp-espace-admin .tvtp-tableau {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}
.tvtp-espace-admin .tvtp-tableau th,
.tvtp-espace-admin .tvtp-tableau td {
	padding: 0.5rem 0.75rem;
	border: 1px solid #ddd;
	text-align: left;
}
.tvtp-espace-admin .tvtp-tableau thead th {
	background: #f5f5f5;
	font-weight: 600;
}
.tvtp-espace-admin .tvtp-menu-badge-rouge {
	background: #d63638;
	color: #fff;
	border-radius: 50%;
	font-size: 11px;
	font-weight: bold;
	min-width: 18px;
	height: 18px;
	line-height: 18px;
	text-align: center;
	display: inline-block;
	margin-left: 6px;
	padding: 0 4px;
}

/* ─────────────────────────────────────────────
   Indicateurs KPI — blocs, grille, courbe (3 espaces)
   ───────────────────────────────────────────── */
.tvtp-indicateurs-wrap {
	padding: 1rem 0;
}
.tvtp-indicateurs-loading {
	color: #666;
	font-style: italic;
}
.tvtp-indicateurs-periode {
	margin-bottom: 1.5rem;
}
.tvtp-indicateurs-periode select {
	padding: 0.35rem 0.75rem;
	border-radius: var(--tvtp-radius);
	border: 1px solid #ccc;
	background: var(--tvtp-color-white);
	margin-left: 0.5rem;
}
.tvtp-kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
}
.tvtp-kpi-bloc {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: var(--tvtp-radius);
	padding: 1rem;
	box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.tvtp-kpi-value {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 0.25rem;
	color: #2d7a2d;
}
.tvtp-kpi-value--vert { color: #2d7a2d; }
.tvtp-kpi-value--orange { color: #dba617; }
.tvtp-kpi-value--rouge { color: #d63638; }
.tvtp-kpi-label {
	font-size: 0.85rem;
	color: #666;
	margin: 0;
}
.tvtp-kpi-variation {
	font-size: 0.8rem;
	margin: 0.35rem 0 0;
}
.tvtp-kpi-variation--positif { color: #00a32a; }
.tvtp-kpi-variation--negatif { color: #d63638; }
.tvtp-kpi-section {
	margin-top: 2rem;
}
.tvtp-kpi-section h4 {
	margin: 0 0 1rem;
	font-size: 1rem;
}
.tvtp-indicateurs-chart {
	min-height: 200px;
	background: #f9f9f9;
	border-radius: var(--tvtp-radius);
	padding: 1rem;
}
.tvtp-indicateurs-chart svg {
	max-width: 100%;
	height: auto;
}
.tvtp-tableau-top5 {
	margin-top: 0.5rem;
	width: 100%;
	border-collapse: collapse;
}
.tvtp-tableau-top5 th,
.tvtp-tableau-top5 td {
	padding: 0.4rem 0.6rem;
	text-align: left;
	border: 1px solid #eee;
}
.tvtp-tableau-top5 th {
	background: #f5f5f5;
	font-weight: 600;
}

/* ─────────────────────────────────────────────
   Indisponibilités — calendrier, formulaire
   ───────────────────────────────────────────── */
.tvtp-onglet-indisponibilites .tvtp-indispo-description {
	margin-bottom: 1.5rem;
	color: #666;
}
.tvtp-indispo-calendrier-wrapper {
	margin-bottom: 2rem;
}
.tvtp-indispo-calendrier-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}
.tvtp-indispo-calendrier-header h4 {
	margin: 0;
}
.tvtp-grille-calendrier {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
}
@media (max-width: 900px) {
	.tvtp-grille-calendrier { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
	.tvtp-grille-calendrier { grid-template-columns: 1fr; }
}
.tvtp-cal-mois {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: var(--tvtp-radius);
	padding: 0.75rem;
}
.tvtp-cal-mois-titre {
	font-weight: 600;
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
}
.tvtp-cal-mois-jours {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
}
.tvtp-cal-jour {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	font-size: 0.75rem;
	border-radius: 3px;
	background: #f5f5f5;
}
.tvtp-cal-jour-ferie {
	background: #fff3e0;
	color: #e65100;
}
.tvtp-cal-jour-conge {
	background: #ffebee;
	color: #c62828;
}
.tvtp-cal-jour-ferie.tvtp-cal-jour-conge {
	background: linear-gradient(135deg, #fff3e0 50%, #ffebee 50%);
}
.tvtp-indispo-form-section {
	margin-bottom: 2rem;
}
.tvtp-form-indispo {
	margin-top: 1rem;
	padding: 1rem;
	background: #f9f9f9;
	border-radius: var(--tvtp-radius);
}
.tvtp-form-indispo p {
	margin: 0.5rem 0;
}
.tvtp-form-indispo input[type="date"],
.tvtp-form-indispo input[type="text"] {
	padding: 0.4rem 0.6rem;
	width: 100%;
	max-width: 250px;
}
.tvtp-table-indispos {
	margin-top: 0.5rem;
}
.tvtp-btn-sm {
	padding: 0.3rem 0.6rem;
	font-size: 0.85rem;
}
.tvtp-btn-cal-nav {
	text-decoration: none;
}

/* Modale modifier vente : producteurs indisponibles */
.tvtp-modale-producteurs-alertes {
	margin-bottom: 1rem;
	padding: 0.75rem;
	background: #f9f9f9;
	border-radius: var(--tvtp-radius);
}
.tvtp-modale-producteurs-titre {
	margin: 0 0 0.5rem;
}
.tvtp-modale-producteurs-liste {
	margin: 0;
	padding-left: 1.25rem;
}
.tvtp-producteur-indisponible .tvtp-producteur-nom {
	color: #e65100;
}
.tvtp-producteur-indispo-msg {
	font-size: 0.9em;
	color: #e65100;
}
.tvtp-alerte-vente {
	margin-left: 0.25rem;
}
.tvtp-badge--rouge {
	background: #ffebee;
	color: #c62828;
}

/* ─────────────────────────────────────────────
   Sélections : formulaire création/modification
   Champ Descriptif stylisé cohérent avec l'interface TVTP
   ───────────────────────────────────────────── */
.tvtp-form-selection .tvtp-selection-etape p {
	margin-bottom: 1rem;
}
.tvtp-form-selection .tvtp-selection-etape label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}
.tvtp-selection-descriptif {
	display: block;
	width: 100%;
	height: 80px;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-family: inherit;
	font-size: 0.95rem;
	line-height: 1.5;
	resize: vertical;
}
.tvtp-selection-descriptif:focus {
	border-color: var(--tvtp-color-primary, #2e7d32);
	outline: none;
	box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.15);
}

/* ─────────────────────────────────────────────
   Placeholder modules futurs
   (ex. .tvtp-collecte, .tvtp-vendeur, etc.)
   ───────────────────────────────────────────── */
