  *{
  margin:0;
  padding:0;
 font-family: Verdana, Arial, sans-serif;
}

html, body, .last-mails-box {
    color-scheme: light;
    background-color: #ffffff !important;
  }

html,body{
  overflow-x: hidden;
  max-width: 100%;
}

h1{

       
       padding-bottom:0px;
}

#titre_vente{
  padding-left: 50px;
  padding-top: 50px;

}
.txtgris{color: #CCD1D1 ;}
.txtcenter{text-align: center;}
.margesup{margin-top:20px;}

#menu{
  width:200px;


}
.menu, .sousmenu{
  text-align:center;
}
.menu{
  height:18px;
  width:200px;
  padding:2px 0;
  background:#005fa3;
  color:#fff;

}
.sousmenu{
  height:18px;
  width:200px;
  padding:1px 0;
  background:#0077cc;
  color:#fff;
}
.menu a{
  display:block;
  width:100%;
  height:100%;
  color:#fff;
  font-family:arial,sans-serif;
  font-size:12px;
  font-weight:bold;
  text-decoration:none;
  background:#005fa3;
}
.sousmenu a{
  display:block;
  width:100%;
  height:100%;
  color:#fff;
  font-family:arial,sans-serif;
  font-size:12px;
  font-weight:bold;
  text-decoration:none;
  background:#0077cc;
}
.menu a:hover, .sousmenu a:hover, .menu a:active, .sousmenu a:active, .menu a:focus, .sousmenu a:focus{
  background:rgb(5, 61, 135);
}

header{
                  background-color: #FAFAFA;
                  display: block;
                  width:100%;
                  height:10%;
                  text-align: left;
                  border: 1px solid silver;
                  
                
}

.connect{
             font-style: italic;
             float:left;
             position: absolute;
             left: 15px;
             top: 30px;
             font-size:10px;
}

@media screen and (max-width: 768px) {
  .connect {
    position: absolute;
    top: 30px;
    left: 15px;
    font-size: 10px;
    max-width: 60%;
  }
}
.paddingleft50{
  padding-left: 30px;
}
.petititalique{
 font-size:10px;
 font-style: italic; 
}
nav{
                  display: inline-block;
                  width:200px;
                  height:100%;
                  vertical-align: top;
                  margin-top:20px;
                                    
}



section{
                  display: inline-block;
                  position:absolute;
                  width: 90%;
                  height: 90%;

}

article{
                                 
                  /*display: inline-block;*/
                  display: flex;
                  width:95%;
                  height:85%;
                  overflow: auto;
                  vertical-align: top;
                  padding-left:50px;
                  padding-top:50px;
                  font-size: 13px;
}

#listemembres{
  overflow: auto;
  width: 50%;
  height: 95%;
background-color: #FAFAFA;
}
#choixlistemembres{
  width: 50%;
  height: 85%;
  margin-top: 100px;
  padding-left:50px;

}
#txtbienvenue{
  width: 50%;
  height: 85%;
  margin-top: 100px;
 
}

caption
{
    padding-top:40px;
    padding-bottom:10px;
    font-weight: bold;
    text-align:left;

}

.btn_suppr{
  background-color:#FBA6A5;
}

table
{
    border-collapse: collapse;

}

tr{
  border-bottom:  1px solid silver;
}
td
{
    
    padding-right:  50px;
    padding-top:   10px;
    width: 200px;
}
.tabpanier{
 text-align:center; 
 padding-right:  10px;
 padding-top:   7px;
 
}
.tdpanier{
  text-align:center; 
  padding-right:  10px;
  width: 50px;
  padding-bottom: none;
  border-bottom:  none; 
  }
  .tdtaille{
 text-align:left; 
  padding-right:  10px;
  width: 150px;
  padding-bottom: none;
  border-bottom:  none; 
  }
  .tabarticle{
  text-align:left; 
  width: auto;
  padding-bottom: none;
  border-bottom:  none;
  }
  .tdarticle{
  text-align:left; 
  width: 150px;
  padding-bottom: none;
  border-bottom:  none; 
  }
  .img_panier{
  padding-left: 30px;
  width: auto;
}
.trpanier{
  text-align: left;
 border-bottom:  none; 
}
#tdarticle{
  width: auto;
  border-bottom: none;
}
#poubelle{
font-style: italic;

}
.tabmembres
{
 text-align: left; 
}
  
.tabbouton
{
 width: 80px;
 border-bottom: none;
  
}                 

.tabboutontr
{
  border-bottom:  none;
}

.number{width: 50px;}

.inlineblock{display: inline-block;}

.gris{color:grey;}

.cont_panier{
display:flex;
justify-content: flex-start;
height:auto;
width: auto;
overflow: auto;
}

.art_panier{
  padding-left: 20px;
  width: auto;
  height:1000%;
  background-color: #FAFAFA;
}

.tot_panier{
  padding-right: 30px;
  padding-left: 30px;
  width: auto;
  height:auto;
}

.btn_panier{
   width: auto;
  height:auto;

}
footer{
                  
                  position:absolute;
                  left: 0px;
                  bottom: 0px;
                  padding-top:60px;
                  text-align:center;
                  color:blue;
                  display:block;
                  width:99%;
                  height:5%;

}

.groupes-container {
  display: grid;
  gap: 2rem;
  margin: 2rem;
}

.groupe-card {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 1.0rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.groupe-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #333;
}

.membres {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.membre {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: .8rem 1rem;
  flex: 1 1 200px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.group-actions {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

.btn {
  background: #0077cc;
  color: white;
  border: none;
  padding: .5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn:hover {
  background: #005fa3;
}

/* Menu burger pour mobile */
.burger-menu {
  display: none;
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1000;
  background: #005fa3;
  color: white;
  border: none;
  font-size: 24px;
  width: 45px;
  height: 45px;
  border-radius: 5px;
  cursor: pointer;
  padding: 0;
  line-height: 45px;
}

.burger-menu:hover {
  background: #0077cc;
}

/* Bouton panier fixe */
.cart-button {
  display: none;
  position: fixed;
  top: 75px;
  right: 15px;
  z-index: 1000;
  background: #005fa3;
  color: white;
  border: none;
  font-size: 24px;
  width: 45px;
  height: 45px;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  line-height: 45px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.cart-button:hover {
  background: #0077cc;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  color: white;
  font-size: 11px;
  font-weight: bold;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
}

/* Media queries pour le responsive */
@media screen and (max-width: 768px) {
  
  /* Afficher le bouton burger */
  .burger-menu {
    display: block;
  }
  
  /* Afficher le bouton panier */
  .cart-button {
    display: block;
  }
  
  /* Header responsive */
  header {
    padding: 10px;
    height: auto;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  header h1 {
    font-size: 1.5rem;
    margin-top: 50px;
  }
  
  header h2 {
    font-size: 1rem;
  }
  
  /* Navigation mobile */
  nav {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    background: white;
    transition: left 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    margin-top: 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    padding-top: 130px;
  }
  
  nav.mobile-menu-open {
    left: 0;
  }
  
  .menu-container {
    width: 100%;
  }
  
  #menu {
    width: 100%;
  }
  
  .menu, .sousmenu {
    width: 100%;
  }
  
  /* Section et article responsive */
  section {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 10px;
    display: block;
    box-sizing: border-box;
  }
  
  article {
    width: 100%;
    max-width: 100%;
    padding: 20px 10px;
    padding-bottom: 80px;
    display: block;
    height: auto;
    box-sizing: border-box;
  }
  
  #txtbienvenue {
    width: 100%;
    margin-top: 20px;
  }
  
  #choixlistemembres {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    margin-top: 0;
    padding: 4px;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 998;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3px;
    row-gap: 3px;
    max-height: 18vh;
    overflow-y: auto;
    align-items: flex-start;
  }
  
  #choixlistemembres form {
    margin: 0;
    flex: 0 1 auto;
  }
  
  #choixlistemembres .btn {
    width: auto;
    padding: 5px 10px;
    font-size: 11px;
    white-space: nowrap;
    line-height: 1.1;
  }
  
  #choixlistemembres br {
    display: none;
  }
  
  #listemembres {
    width: 100%;
    padding-bottom: 20px;
  }
  
  /* Améliorer l'apparence des boutons sur mobile */
  .btn {
    display: inline-block;
    width: auto;
    min-width: 70px;
    margin: 2px;
    padding: 5px 10px;
    font-size: 11px;
    text-align: center;
    line-height: 1.1;
  }
  
  /* Tables responsive */
  table {
    width: 100%;
    max-width: 100%;
    font-size: 12px;
    box-sizing: border-box;
  }
  
  td {
    padding-right: 15px;
    width: auto;
  }
  
  /* Footer responsive */
  footer {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 20px 10px;
    height: auto;
    box-sizing: border-box;
  }
  
  /* Panier responsive */
  .cont_panier {
    flex-direction: column;
  }
  
  .art_panier, .tot_panier {
    width: 100%;
    padding: 10px;
  }
  
  /* Groupes responsive */
  .groupes-container {
    margin: 1rem;
  }
  
  .membre {
    flex: 1 1 100%;
  }
}

/* Media queries pour les très petits écrans */
@media screen and (max-width: 480px) {
  header h1 {
    font-size: 1.2rem;
  }
  
  header h2 {
    font-size: 0.9rem;
  }
  
  nav {
    width: 200px;
    left: -200px;
  }
  
  table {
    font-size: 11px;
  }
  
  .menu a, .sousmenu a {
    font-size: 11px;
  }
}

/* --- Mise en page principale des blocs email --- */
.email-form-container {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 600px;
}

.last-mails-box {
    flex: 0 0 250px;
    margin-left: 30px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- Conteneur global des deux blocs --- */
.email-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: nowrap;
    margin: 20px auto;
    width: 90%;
}

/* --- Styles des boutons --- */
.btn-row {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* --- Responsive : version smartphone --- */
@media screen and (max-width: 768px) {
    .email-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .email-form-container,
    .last-mails-box {
        max-width: 90%;
        margin-left: 0;
    }

    .textarea-text {
        height: 250px; /* réduit un peu la hauteur */
        width: 90%    }
}
/* === Mise en page email === */

.email-layout {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 40px;
  padding: 20px 40px;
  flex-wrap: nowrap;
  max-width: 1200px;
  margin: 0 auto;
}

.email-form-container {
  flex: 2;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  max-width: 700px;
}

.last-mails-box {
  flex: 1;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- Responsive pour smartphone --- */
@media screen and (max-width: 768px) {
  .email-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 10px;
  }

  .email-form-container,
  .last-mails-box {
    max-width: 100%;
    margin-left: 0;
    box-shadow: none;
  }

  .textarea-text {
    min-height: 250px;
  }

  .btn-row {
    justify-content: center;
  }

  .last-mails-box h4 {
    text-align: center;
  }

  .mail-item button {
    text-align: left;
    width: 100%;
  }
}
.membre-item {
        padding: 6px 4px;
        border-bottom: 1px solid #eee;
    }
    .membre-item:last-child { border-bottom: none; }
    .membre-item label {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .membre-item.no-email {
        background: #f9f9f9;
        color: #aaa;
    }
    .membre-item.no-email input[type="checkbox"] {
        cursor: not-allowed;
    }
    .counter-box {
        background: #f4f4f4;
        padding: 10px;
        border-radius: 8px;
        margin: 10px 0;
        font-size: 0.95em;
    }
    .counter-box span {
        font-weight: bold;
    }
    /* === Fenêtre de confirmation d'envoi === */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.confirm-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.25);
  max-width: 400px;
  width: 90%;
  padding: 25px;
  text-align: center;
  font-family: system-ui, sans-serif;
}

.confirm-box h3 {
  margin-bottom: 10px;
}

.confirm-box p {
  font-size: 15px;
  color: #333;
}

.confirm-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.confirm-buttons button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.confirm-buttons .ok {
  background-color: #0074D9;
  color: white;
}

.confirm-buttons .cancel {
  background-color: #ccc;
}
/* Conteneur global côte à côte */
.email-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-top: 20px;
  flex-wrap: wrap; /* Empile sur mobile */
}

/* Colonne gauche : le formulaire */
.email-form-container {
  flex: 1;
  min-width: 300px;
}

/* Colonne droite : les anciens mails */
.last-mails-box {
  flex: 0 0 280px; /* largeur fixe raisonnable */
  background-color: #f9fafb;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Sur petits écrans : empile tout */
@media (max-width: 800px) {
  .email-layout {
    flex-direction: column;
  }
  .last-mails-box {
    width: 100%;
    margin-top: 20px;
  }
}
/* --- Overlay popup (fond semi-transparent) --- */
.overlay-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* --- Boîte de confirmation --- */
.popup-box {
  background: #fff;
  border-radius: 16px;
  padding: 25px 30px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: popupFadeIn 0.3s ease;
}

/* --- Animation d’apparition --- */
@keyframes popupFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* --- Titre et texte --- */
.popup-box h3 {
  color: #4F1F91;
  margin-bottom: 10px;
}

.popup-box p {
  color: #444;
  font-size: 15px;
  margin-bottom: 20px;
}

/* --- Boutons --- */
.popup-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-confirm {
  background-color: #4F1F91;
  color: white;
}

.btn-confirm:hover {
  background-color: #3c1771;
}

.btn-cancel {
  background-color: #ccc;
  color: #333;
}

.btn-cancel:hover {
  background-color: #bbb;
}

 /* ================================
   ✅ TABLEAU STATISTIQUES EMAILS
   ================================ */
.email-stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.9em;
  border: 1px solid #ccc;
}

.email-stats-table th,
.email-stats-table td {
  border: 1px solid #ccc;
  padding: 4px 8px !important;
  text-align: center;
  line-height: 1.2;
  height: auto !important;
  vertical-align: middle;
  max-width: 80px;;
}

.email-stats-table th {
  background-color: #f3f3f3;
  font-weight: 600;
}

.email-stats-table tr:hover {
  background-color: #fafafa;
}

/* On neutralise les paddings globaux qui faisaient tout exploser */
.email-stats-table td,
.email-stats-table th {
  width: auto ;
  max-width: 80px;
}
/* Responsive mobile */
@media (max-width: 768px) {
    .email-stats-table, 
    .email-stats-table th, 
    .email-stats-table td {
        font-size: 0.85em;
        padding: 4px 6px;
    }
}


    .btn-retour {
      margin-top: 30px;
      display: inline-block;
      padding: 10px 20px;
      background: #007bff;
      color: #fff;
      border-radius: 6px;
      text-decoration: none;
    }

    .btn-retour:hover {
      background: #0056b3;
    }

    h3 { 
      margin-top: 10px;
    }
    .email-stats-table td,
.email-stats-table th {
  padding: 3px 6px !important;
  margin: 0 !important;
  height: auto !important;
  line-height: 1.1 !important;
  vertical-align: middle !important;
  width: auto;
  max-width: 80px;
}
.email-stats-table tr {
  height: auto !important;
}
/* === Ajustement de largeur du tableau des statistiques === */
.email-stats-table {
  width: 80%;               /* largeur réduite sur grand écran */
  max-width: 900px;         /* ne dépasse jamais 900px */
  margin: 20px auto;        /* centré horizontalement */
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;       /* s’adapte au contenu */
}
@media (min-width: 768px) {
/* Cells compactes */
.email-stats-table th,
.email-stats-table td {
  padding: 6px 8px !important;
  text-align: left;
  width: auto;
  min-width: 100px;
}
}

/* === Version smartphone (moins de 768px) === */
@media (max-width: 768px) {
  .email-stats-table {
    width: 95%;             /* un peu plus large sur mobile */
    font-size: 12px;        /* texte légèrement plus petit */
    display: block;         /* permet le scroll horizontal */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
.email-stats-table th,
.email-stats-table td {
  padding: 6px 8px !important;
  text-align: left;
  width: auto;
  max-width: 50px;
}
  
}
/* === Correction visibilité du texte sur smartphone (thème sombre inclus) === */
@media (max-width: 768px) {
  .last-mails-box,
  .last-mails-box *,
  .last-mails-box button,
  .last-mails-box small {
    color: #000 !important; /* tout le texte devient noir */
    background-color: #f8f9fa !important;
  }

  /* Empêche le navigateur mobile d’inverser les couleurs (mode sombre auto) */
  html, body, .last-mails-box {
    color-scheme: light;
    background-color: #ffffff !important;
  }
}
.centertxt{
  text-align: center;
}
.input-text,
    .textarea-text {
        width: 90%;
        padding: 10px;
        border: 1px solid #bbb;
        border-radius: 4px;
        font-size: 15px;
        resize: vertical;
        font-family: inherit;
    }

    .textarea-text {
        min-height: 250px;
        height: 350px;
    }
    .email-form-container h3 {
        margin-top: 0;
        text-align: center;
    }
   .form-label {
        font-weight: bold;
        margin-bottom: 6px;
        display: block;
    }
    .stat_mail_container{
      padding: 20px;
      background-color: #f9fafb;
      border-radius: 12px;
      max-width: fit-content;
    }
.stat_mail_container h2{
  text-align: center;
  display: flex;
  flex-direction: column;
}
.email-history-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;

  }
  @media screen and (max-width: 768px) {
    .email-history-layout{
        flex-direction: column;
        align-items: stretch;

    }
     }
     .email-history-container {
      background: #f8f9fa;
      height: calc(100vh - 200px);
  overflow: scroll;
 
  }
  @media (max-width: 768px) {
  .email-history-container,
  .email-history-container * {
      color: #000 !important;
  }
}
