.debut {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#bouton {
    background-color: #2eb82e;
    color: white;
    font-weight: bold;
	font-size: 20px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#bouton:hover {
    background-color: #26a026;
}

/* Tableau principal */
table.tarif {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.tarif thead th {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

table.tarif tbody td,
table.tarif tbody th {
    border: 1px solid #ddd;
    padding: 6px 8px;
}

table.tarif tbody tr:nth-child(even) {
    background-color: #fafafa;
}

table.tarif tfoot th {
    border: 1px solid #ddd;
    padding: 8px;
}

/* Alignement des colonnes numériques */
.num {
    text-align: right;
    white-space: nowrap;
}

/* Titres existants (si déjà stylés dans ta CSS globale) */
.titreBleu {
    color: #005b96;
    font-weight: bold;
}

.titreMarron {
    color: #6b4b3e;
    font-weight: bold;
}

.titreVert,
.titreVertR {
    background-color: #e8f5e9;
    font-weight: bold;
}

.titreVertR {
    text-align: right;
}

/* Titre du bloc résultat */
.titrePage {
    font-size: 16px;
    padding: 10px 0;
}

.titrePage b {
    color: #404040;
}

/* Conteneur général */
.box {
    max-width: 900px;
    margin: 30px auto 15px auto;
    padding: 0 15px;
}

.box2 {
    background-color: #ffffff;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border: 1px solid #e5e5e5;
}

/* Tableau du formulaire année / agence */
.table-filter {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table-filter thead th {
    background: none;
    border: none;
    padding-bottom: 15px;
}

.titreFiltre {
    font-size: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Libellés à gauche */
.labelFiltre {
    width: 130px;
    text-align: right;
    padding: 10px 15px 10px 0;
    font-weight: 600;
    color: #555;
    border: none !important;
    background: none !important;
    white-space: nowrap;
}

/* Cellules des champs */
.table-filter td {
    padding: 8px 0 8px 5px;
    border: none !important;
}

/* Cellule du bouton */
.cellBoutonFiltre {
    padding-top: 15px;
}

/* Champs select */
select.nom,
.selectFiltre {
    display: block;
    width: 100%;
    max-width: 450px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #fafafa;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

select.nom:focus,
.selectFiltre:focus {
    outline: none;
    border-color: #2eb82e;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(46,184,46,0.15);
}

/* Bouton "Continuer" déjà défini via #bouton ; on le centre sur mobile */
.cellBoutonFiltre #bouton {
    min-width: 160px;
}

/* Responsive : labels au-dessus des champs sur petit écran */
@media (max-width: 768px) {
  /* Mobile: la carte du tableau ne doit pas être en flex (sinon les totaux se mettent à côté) */
  .box2-table{
    display:block !important;
  }

    .labelFiltre {
        text-align: left;
        display: block;
        padding: 8px 0 3px 0;
    }

    .table-filter tr {
        display: block;
        margin-bottom: 10px;
    }

    .table-filter td {
        display: block;
        padding: 0 0 8px 0;
    }

    .cellBoutonFiltre {
        text-align: left;
    }
}

/* --- Carte pour le tableau --- */
.box-table {
    max-width: 900px;      /* même largeur que le bloc du dessus */
    margin: 40px auto;
}

/* Contenu de la carte : centrer le tableau */
.box2-table {
    background: white;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border: 1px solid #e5e5e5;

    display: flex;
    justify-content: center;   /* centre le tableau */
}

/* Tableau lui-même : largeur auto pour qu'il puisse se centrer */
.tableau-offres {
    width: 100%;
    margin: 0 auto;
}

/* --- Titre/caption du tableau --- */
table.tableau-offres caption {
    caption-side: top;
    padding: 20px 10px;
    font-size: 18px;
    font-weight: bold;
    color: #005b96;
    text-align: center;
}

/* --- Style général du tableau --- */
table.tableau-offres {
    border-collapse: collapse;
    font-size: 20px;
}

/* en-têtes */
table.tableau-offres thead th {
    background-color: #f0f6ff;
    border: 1px solid #d0d7e2;
    padding: 8px;
    text-align: center;
    font-weight: bold;
}

/* cellules */
table.tableau-offres td {
    border: 1px solid #e0e0e0;
    padding: 6px 8px;
}

/* alternance couleur */
table.tableau-offres tbody tr:nth-child(odd) {
    background-color: #fafafa;
}

/* colonnes alignées */
table.tableau-offres td.d {
    text-align: right;
    white-space: nowrap;
}

table.tableau-offres td.g {
    text-align: left;
}

table.tableau-offres td.c {
    text-align: center;
}

/* Totaux */
table.tableau-offres tfoot th,
table.tableau-offres tfoot td {
    background-color: #e8f5e9;
    font-weight: bold;
    border: 1px solid #c0d9c0;
}

/* Arrondis en bas si besoin */
.tableau-offres {
    border-radius: 8px;
    overflow: hidden;
}

/* Boutons "Modifier" */
.btn-modifier {
    background-color: #1976d2;
    color: white !important;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-modifier:hover {
    background-color: #0f5cad;
    box-shadow: 0 3px 6px rgba(0,0,0,0.25);
    transform: translateY(-1px);
}

.btn-modifier:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Bouton en attente (Non) = bleu */
.btn-attente {
    background-color: #1976d2;
    color: white !important;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: 0.2s ease-in-out;
    white-space: nowrap;
}

.btn-attente:hover {
    background-color: #0f5cad;
    transform: translateY(-1px);
}

/* Bouton accepté (Oui) = vert */
.btn-accepte {
    background-color: #2e7d32;
    color: white !important;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: 0.2s ease-in-out;
    white-space: nowrap;
}

.btn-accepte:hover {
    background-color: #1b5e20;
    transform: translateY(-1px);
}

/* Ancienne zone pdf à droite (non utilisée ici)
.zone-pdf {
    text-align: right;
    margin-bottom: 10px;
}
*/

/* Nouvelle zone PDF centrée sous le tableau */
.zone-pdf-centre {
    max-width: 900px;
    margin: 15px auto 40px auto;
    text-align: center;
}

.btn-pdf {
    background-color: #f57c00;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: 0.2s ease-in-out;
    white-space: nowrap;
}

.btn-pdf:hover {
    background-color: #ef6c00;
    transform: translateY(-1px);
}


/* =========================
   RESPONSIVE MOBILE (cartes) - identique esprit 0-bav
   ========================= */
.tot-mobile{ display:none; } /* caché par défaut (desktop) */

@media (max-width: 768px){

  /* Le tableau des offres passe en cartes */
  table.tableau-offres thead{ display:none !important; }
  table.tableau-offres tfoot{ display:none !important; }

  table.tableau-offres,
  table.tableau-offres tbody,
  table.tableau-offres tr{
    display:block !important;
    width:100% !important;
  }

  table.tableau-offres tbody tr{
    margin:0 0 12px 0 !important;
    padding:12px !important;
    border:1px solid #e5e5e5 !important;
    border-radius:12px !important;
    background:#fff !important;
  }

  table.tableau-offres td{
    display:flex !important;
    justify-content:space-between !important;
    gap:12px !important;
    width:100% !important;
    border:none !important;
    padding:6px 0 !important;
    white-space:normal !important;
    word-break:break-word !important;
    box-sizing:border-box !important;
    font-size:14px !important;
    text-align:right !important;
  }

  table.tableau-offres td::before{
    content:attr(data-label) !important;
    font-weight:700 !important;
    color:#2f2f2f !important;
    text-align:left !important;
    flex:0 0 52% !important;
  }

  /* Bouton modifier plus agréable */
  .btn-modifier{
    width:100% !important;
    max-width:220px;
  }

  .tot-mobile{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:12px;

    width:100%;
    max-width:100%;
    box-sizing:border-box;

    background:#e8f5e9;
    border:1px solid #cfe8d3;
    border-radius:12px;
    padding:14px;
    margin-top:12px;

    font-weight:bold;
  }

  /* ⭐ empêche le débordement des colonnes */
  .tot-mobile > div{
    min-width:0;
  }

  /* LABELS */
  .tot-mobile .label{
    text-align:center;
    line-height:1.25;
    word-break:break-word;
  }

  /* VALEURS */
  .tot-mobile .value{
    text-align:right;
    white-space:nowrap;
    justify-self:end;
    font-variant-numeric: tabular-nums;
  }
  
  table.tableau-offres caption{
    text-align: center !important;
    width: 100% !important;
    padding: 12px 10px !important;
    line-height: 1.3 !important;
  }

  table.tableau-offres caption b{
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* Important : tes spans inline ne centrent pas “text-align:center” s’ils n’occupent pas la largeur */
  table.tableau-offres caption span{
    display: inline-block;
    text-align: center !important;
  }

  .nb-offres{
    color:blue;
    font-size:28px;
    font-weight:bold;
    display:block;
  }

  .annee-offre{
    color:blue;
    font-size:20px;
    font-weight:bold;
  } 
}
@media (max-width: 768px){

  /* Force le caption à prendre toute la largeur et centre le texte */
  table.tableau-offres caption.titre-mobile{
    display: block !important;        /* au lieu de table-caption */
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    padding: 12px 10px !important;
    line-height: 1.3 !important;
    caption-side: top !important;     /* au cas où une CSS externe le met ailleurs */
    box-sizing: border-box !important;
  }

  table.tableau-offres caption.titre-mobile b{
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* optionnel : rend les spans plus “centrables” */
  table.tableau-offres caption.titre-mobile .nb-offres,
  table.tableau-offres caption.titre-mobile .annee-offre{
    display: inline-block;
  }
}

/* =========================================================
   TABLE "tarif" : affichage MOBILE en "cartes" (comme 0-bav)
   Cible uniquement le tableau résultat (PAS le tableau du formulaire)
   ========================================================= */

/* Totaux "mobile" : cachés par défaut (desktop) */
.tot-mobile{ display:none; }

@media (max-width: 768px){

  /* --- TABLE RESULTAT (table.tarif SANS .table-filter) --- */
  table.tarif:not(.table-filter):not(.menu-resultats){
    width: 100% !important;
  }

  /* On masque l'entête (les libellés viennent de data-label) */
  table.tarif:not(.table-filter):not(.menu-resultats) thead{ display:none !important; }

  table.tarif:not(.table-filter):not(.menu-resultats),
  table.tarif:not(.table-filter):not(.menu-resultats) tbody,
  table.tarif:not(.table-filter):not(.menu-resultats) tr{
    display:block !important;
    width:100% !important;
  }

  /* 1 ligne = 1 carte */
  table.tarif:not(.table-filter):not(.menu-resultats) tbody tr{
    margin: 0 0 12px 0 !important;
    padding: 12px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 12px !important;
    background: #fff !important;
  }

  /* Cellules en mode "label / valeur" */
  table.tarif:not(.table-filter):not(.menu-resultats) td{
    display:flex !important;
    justify-content:space-between !important;
    gap:12px !important;
    width:100% !important;
    border:none !important;
    padding:6px 0 !important;
    white-space:normal !important;
    box-sizing:border-box !important;
    text-align:right !important;
  }

  table.tarif:not(.table-filter):not(.menu-resultats) td::before{
    content: attr(data-label) !important;
    font-weight:700 !important;
    color:#2f2f2f !important;
    text-align:left !important;
    flex: 0 0 52% !important;
    min-width:0 !important;
    word-break: break-word !important;
  }

  /* Numériques : restent bien alignées */
  table.tarif:not(.table-filter):not(.menu-resultats) td.num{
    font-variant-numeric: tabular-nums;
  }

  /* On masque le tfoot illisible en mode cartes */
  table.tarif:not(.table-filter):not(.menu-resultats) tfoot{ display:none !important; }

  /* --- TOTAUX MOBILE (2 lignes / 2 colonnes) --- */
  .tot-mobile{
    display:grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px 12px !important;

    width:100% !important;
    max-width:100% !important;
    box-sizing:border-box !important;

    background:#e8f5e9;
    border:1px solid #cfe8d3;
    border-radius:12px;
    padding:12px;
    margin-top:12px;
    font-weight:700;
  }

  .tot-mobile > div{ min-width:0; }

  .tot-mobile .label{
    text-align:center;
    line-height:1.2;
    word-break:break-word;
  }

  .tot-mobile .value{
    text-align:right;
    white-space:nowrap;
    justify-self:end;
    font-variant-numeric: tabular-nums;
  }
}

/* ===== PATCH 0-bav : titre mobile + totaux mobile (propre, sans casser le desktop) ===== */

/* Par défaut (desktop) : on cache le caption mobile pour éviter un doublon */
table.tarif .caption-tarif{ display:none; }

/* Totaux "mobile" : cachés par défaut (desktop) */
.tot-mobile{ display:none; }

@media (max-width: 768px){

  /* Affiche le caption uniquement sur mobile (le thead est masqué pour le tableau résultat) */
  table.tarif .caption-tarif{
    display: table-caption !important;
    caption-side: top;
    text-align: center !important;
    padding: 10px 8px 6px;
    font-weight: 700;
    color: #222;
    width: 100%;
    box-sizing: border-box;
  }

  /* Totaux mobile : 2 colonnes / 2 lignes */
  .tot-mobile{
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px 12px !important;

    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;

    background: #e8f5e9;
    border: 1px solid #cfe8d3;
    border-radius: 12px;
    padding: 12px;
    margin-top: 12px;

    font-weight: 700;
  }

  .tot-mobile > div{ min-width:0; }

  /* Labels en 3 lignes: Total / commissions / TTC(ou HT) */
  .tot-mobile .label{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    line-height:1.15;
    text-align:center;
    word-break:break-word;
  }
  .tot-mobile .label span{ display:block; }

  /* Valeurs: alignées à droite */
  .tot-mobile .value{
    text-align:right;
    white-space:nowrap;
    justify-self:end;
    font-variant-numeric: tabular-nums;
  }
}


/* ====== MENU RESULTATS : TYPO ====== */

/* 1) Labels (Biens à vendre / En attente / Acceptées / etc.)
   -> même style partout (desktop + mobile) */
table.tarif.menu-resultats label{
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.25;
}

/* 2) Desktop : titres de sections plus gros */
@media (min-width: 769px){
  table.tarif.menu-resultats h2{
    font-size: 34px !important;
    margin: 10px 0 18px !important;
  }

  table.tarif.menu-resultats h3{
    font-size: 26px !important;
    padding: 12px 14px !important;
    border-radius: 10px;
    margin: 18px 0 10px !important;
  }
}

/* 3) Mobile : garder les titres comme ils sont (tu dis parfait)
   -> on ne touche pas h3/h2 ici, seulement un peu d’aération */
@media (max-width: 768px){
  table.tarif.menu-resultats label{
    font-size: 15px !important;
  }
}

/* ===== MENU RESULTATS : rendu compact & aligné sur mobile ===== */

/* Supprime les marges par défaut qui créent des espaces */
table.tarif.menu-resultats h4{
  margin: 6px 0 !important;
  padding: 0 !important;
}

/* Aligne proprement radio + texte sur une seule ligne */
table.tarif.menu-resultats input.demo5{
  vertical-align: middle;
  margin: 0 6px 0 0;
}

table.tarif.menu-resultats label{
  display: inline-block;
  vertical-align: middle;
  margin: 0 !important;
  line-height: 1.15;
}

/* Les <br> après les labels créent des “trous” visuels → on les neutralise */
table.tarif.menu-resultats br{
  display: none;
}

/* On remet un espace “propre” entre les lignes */
table.tarif.menu-resultats input.demo5{
  margin-bottom: 8px;
}

/* MOBILE : police légèrement plus petite + pas d’espace inutile */
@media (max-width: 768px){
  table.tarif.menu-resultats label{
    font-size: 16px !important;   /* au lieu de 18 */
    font-weight: 700 !important;
    white-space: nowrap;          /* garde tout sur une ligne */
  }

  /* réduit aussi un peu le titre principal si besoin */
  table.tarif.menu-resultats h2{
    font-size: 24px !important;
    margin: 10px 0 12px !important;
  }
}

/* ===== MENU RESULTATS : amélioration desktop ===== */

@media (min-width: 769px){

  /* titre principal */
  table.tarif.menu-resultats h2{
    font-size: 32px;
    margin-bottom: 20px;
  }

  /* titres sections vertes */
  table.tarif.menu-resultats h3{
    font-size: 22px;
    padding: 12px;
    margin-top: 18px;
    border-radius: 10px;
  }

  /* texte options */
  table.tarif.menu-resultats label{
    font-size: 18px;
    font-weight: 700;
  }

  /* espacement des lignes */
  table.tarif.menu-resultats input.demo5{
    margin-right: 8px;
    margin-bottom: 10px;
  }

}

/* =========================
   MENU RESULTATS (debut-resultats.php)
   Amélioration desktop + cohérence textes
   ========================= */

/* Base */
table.tarif.menu-resultats{
  width: 100%;
  border-collapse: collapse;
}

table.tarif.menu-resultats th.normalL{
  padding: 16px 18px;
}

/* Nettoyage des marges des titres (sinon ça crée du “vide”) */
table.tarif.menu-resultats h2,
table.tarif.menu-resultats h3,
table.tarif.menu-resultats h4{
  margin: 10px 0;
}

/* h4 sert de “conteneur” chez toi -> on supprime l'effet de gros interlignes */
table.tarif.menu-resultats h4{
  line-height: 1.15;
  font-size: 18px;
  font-weight: 700;
}

/* Labels radio : même rendu que “Biens à vendre” */
table.tarif.menu-resultats input.demo5 + label{
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  margin: 2px 0;
  vertical-align: middle;
}

/* Le petit espace ajouté par $esp : on évite qu’il “pousse” trop */
table.tarif.menu-resultats label.nowrap{
  white-space: nowrap;
}

/* Radios : on aligne bien avec le texte */
table.tarif.menu-resultats input.demo5{
  vertical-align: middle;
  margin-right: 6px;
}

/* ===== DESKTOP : titres verts plus gros ===== */
@media (min-width: 781px){

  /* Le titre principal */
  table.tarif.menu-resultats h2{
    font-size: 28px;
    line-height: 1.1;
    margin: 10px 0 18px 0;
  }

  /* Titres verts (Mandats de vente, Offres d'achat, etc.) */
  table.tarif.menu-resultats h3{
    font-size: 20px;
    padding: 10px 12px;
    border-radius: 10px;
    line-height: 1.1;
    margin: 14px 0 10px 0;
  }

  /* Les lignes radio : mêmes tailles que “Biens à vendre” */
  table.tarif.menu-resultats input.demo5 + label{
    font-size: 18px;
    font-weight: 700;
  }

  /* Un peu d’air entre les groupes */
  table.tarif.menu-resultats br{
    line-height: 0.9;
  }
}



/* =========================
   MENU RESULTATS (debut-resultats.php)
   Amélioration desktop + cohérence textes
   ========================= */

/* Base */
table.tarif.menu-resultats{
  width: 100%;
  border-collapse: collapse;
}

table.tarif.menu-resultats th.normalL{
  padding: 16px 18px;
}

/* Nettoyage des marges des titres (sinon ça crée du “vide”) */
table.tarif.menu-resultats h2,
table.tarif.menu-resultats h3,
table.tarif.menu-resultats h4{
  margin: 10px 0;
}

/* h4 sert de “conteneur” chez toi -> on supprime l'effet de gros interlignes */
table.tarif.menu-resultats h4{
  line-height: 1.15;
  font-size: 18px;
  font-weight: 700;
}

/* Labels radio : même rendu que “Biens à vendre” */
table.tarif.menu-resultats input.demo5 + label{
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  margin: 2px 0;
  vertical-align: middle;
}

/* Le petit espace ajouté par $esp : on évite qu’il “pousse” trop */
table.tarif.menu-resultats label.nowrap{
  white-space: nowrap;
}

/* Radios : on aligne bien avec le texte */
table.tarif.menu-resultats input.demo5{
  vertical-align: middle;
  margin-right: 6px;
}

/* ===== DESKTOP : titres verts plus gros ===== */
@media (min-width: 781px){

  /* Le titre principal */
  table.tarif.menu-resultats h2{
    font-size: 34px;
    line-height: 1.1;
    margin: 10px 0 18px 0;
  }

  /* Titres verts (Mandats de vente, Offres d'achat, etc.) */
  table.tarif.menu-resultats h3{
    font-size: 26px;
    padding: 10px 12px;
    border-radius: 10px;
    line-height: 1.1;
    margin: 14px 0 10px 0;
  }

  /* Les lignes radio : mêmes tailles que “Biens à vendre” */
  table.tarif.menu-resultats input.demo5 + label{
    font-size: 18px;
    font-weight: 700;
  }

  /* Un peu d’air entre les groupes */
  table.tarif.menu-resultats br{
    line-height: 0.9;
  }
}

