/* style.css */
/* --- Taldanse cart UI --- */

/* Bouton flottant */
#mini-panier {
  position: fixed !important;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  border-radius: 0 !important;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  padding: 16px;
  background: #000 !important;
  color: #fff !important;
  z-index: 2147483647 !important;
}

@media (max-width:768px){
  #mini-panier {
    display: block !important;
  }
}

/* Bouton lightbox */
#lb-choose {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 80vh;
  z-index: 2147483647;
  padding: 8px 14px;
  background: rgba(0,0,0,.75);
  color: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  font-size: 18px;
  pointer-events: auto;
}
#lb-choose[style*="display: none"] {
  pointer-events: none;
}

/* Bouton "Choisir" sur les vignettes */
.ngg-choose-btn {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 3;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: rgba(0,0,0,.8);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}
.ngg-gallery-thumbnail, .ngg-gallery-thumbnail-box {
  position: relative;
}


/* === Table Panier Desktop === */
#panier-table td {
  vertical-align: middle;
}
#panier-table td[data-label="Vignette"] {
  text-align: left;
}
.cart-image {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 6px;
  border: 1px solid #e3e3e3;
  background: #f3f3f3;
  object-fit: contain;
}

/* === Table Panier Mobile === */
@media (max-width: 768px) {

  /* Réinitialisation */
  #panier-table {
    border: 0;
  }
  #panier-table thead {
    display: none;
  }
  #panier-table, #panier-table tbody, #panier-table tr {
    display: block;
    width: 100%;
  }
  #panier-table tr {
    margin-bottom: 16px;
    background: #f7fbf9;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 12px;
  }

  /* Chaque cellule devient une "carte" : grid = propre, responsive */
  #panier-table td {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 8px !important;
    border: none !important;
    border-bottom: 1px dashed #e9e9e9 !important;
  }
  #panier-table td:last-child {
    border-bottom: 0 !important;
  }

  #panier-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #555;
    font-size: 14px;
  }

  #panier-table td[data-label="Vignette"] {
    text-align: center;
    padding-bottom: 12px;
  }

  #panier-table td[data-label="Vignette"] .cart-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 400px;
    object-fit: contain;
    aspect-ratio: auto;
  }

  /* Confort champs */
  #panier-table select,
  #panier-table input[type="number"],
  #panier-table button {
    max-width: 100%;
  }
}


/* === Boutons / Actions === */
.btn-danger {
  background: #b22;
  color: #fff;
  border: 0;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-danger:hover {
  filter: brightness(0.95);
}
.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width:768px) {
  .row-actions {
    flex-direction: column;
  }
}



/* ----- Modal choix format/quantité sur vignettes ----- */
.tal-thumb-modal-overlay{
  position:absolute; inset:0; background:rgba(0,0,0,.35);
  display:flex; align-items:center; justify-content:center; z-index:5;
}
.tal-thumb-modal{
  background:#fff; border-radius:12px; box-shadow:0 12px 28px rgba(0,0,0,.2);
  width:min(92vw, 360px); padding:16px; border:1px solid #e9e9e9;
}
.tal-thumb-modal h4{ margin:0 0 10px; font-size:16px; }
.tal-thumb-modal .row{ display:flex; gap:8px; margin:8px 0; align-items:center; }
.tal-thumb-modal select, .tal-thumb-modal input{
  width:100%; padding:8px; border:1px solid #ddd; border-radius:8px;
}
.tal-thumb-modal .actions{ display:flex; gap:8px; margin-top:12px; }
.tal-btn{ appearance:none; border:0; padding:10px 12px; border-radius:8px; cursor:pointer; }
.tal-btn.primary{ background:#2f855a; color:#fff; }
.tal-btn.secondary{ background:#eee; color:#111; }
.tal-thumb-modal small.muted{ color:#666; display:block; margin-top:6px; }



/* === Overlay recap formats sur vignettes === */
.ngg-selected-overlay {
  position: absolute;
  left: 6px;
  bottom: 44px;
  background: transparent; /* transparence car chaque badge a son fond */
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 5;
}


/* === Overlay lightbox (id injecté) === */
#lb-selected-overlay{
  /* styles principaux en inline JS pour compat universelle */
}

/* === Tables responsive “cartes” (pattern .widefat) === */
@media (max-width: 768px){
  table.widefat thead { display:none; }
  table.widefat, table.widefat tbody, table.widefat tr, table.widefat td {
    display:block; width:100%;
  }
  table.widefat tr{
    margin:0 0 12px;
    background:#f7fbf9;
    border:1px solid #e6e6e6;
    border-radius:10px;
    padding:8px;
  }
  table.widefat td{
    border:0 !important;
    border-bottom:1px dashed #e9e9e9 !important;
    padding:10px 8px !important;
    display:flex; align-items:center; justify-content:space-between; gap:12px;
  }
  table.widefat td:last-child{ border-bottom:0 !important; }
  table.widefat td::before{
    content: attr(data-label);
    font-weight:600;
    flex:0 0 auto;
    margin-right:8px;
  }

  /* Boutons d’action en pleine largeur (Mes commandes + Admin bureau) */
  table.widefat .row-actions .btn-open,
  table.widefat .row-actions .btn-danger{
    width: 100%;
    margin-left: 0 !important;
  }
  table.widefat .row-actions .btn-open + .btn-danger{
    margin-top: 8px;
  }

  /* Dates longues = retour à la ligne propre */
  table.widefat td[data-label="Date"]{
    white-space: normal;
    word-break: break-word;
  }
}

/* === Mini menu mobile TAL (Gallerie / Ma sélection) === */
#tal-mobile-quicknav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 2147483646;
  display: none;
  gap: 10px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid #e9e9e9;
  padding: 10px 12px;
}
#tal-mobile-quicknav .tal-qn-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  color: #111;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e1e1e1;
  background: #fff;
}
#tal-mobile-quicknav .tal-qn-link:active{ filter: brightness(.96); }
#tal-mobile-quicknav .tal-qn-badge{
  display: inline-block;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}
@media (max-width: 768px){
  #tal-mobile-quicknav{ display: flex; justify-content: space-between; }
  .has-tal-quicknav body{ padding-top: 56px; }
}
@media (max-width: 768px){
  .admin-bar #tal-mobile-quicknav{ top: 46px; }
  .admin-bar.has-tal-quicknav body{ padding-top: 102px; }
}

/* === Table des tarifs sur /tarifs-photos/ (shortcode) === */
@media (max-width:768px){
  .tal-prices-table thead{ display:none; }
  .tal-prices-table, .tal-prices-table tbody, .tal-prices-table tr, .tal-prices-table td{
    display:block; width:100%;
  }
  .tal-prices-table tr{
    margin:0 0 12px;
    background:#f7fbf9;
    border:1px solid #e6e6e6;
    border-radius:10px;
    padding:8px;
  }
  .tal-prices-table td{
    border:0 !important;
    border-bottom:1px dashed #e9e9e9 !important;
    padding:10px 8px !important;
    display:flex; align-items:center; justify-content:space-between; gap:12px;
  }
  .tal-prices-table td:last-child{ border-bottom:0 !important; }
  .tal-prices-table td::before{
    content: attr(data-label);
    font-weight:600;
    flex:0 0 auto;
    margin-right:8px;
  }
}


.num-right {
  text-align: right;
  white-space: nowrap;
}
.grand-total-row td {
  font-weight: 700;
  border-top: 1px solid #e5e5e5;
}
.formats-wrap .btn-danger {
  background: #e45;
  color: #fff;
  border: 0;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.tal-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: #000;
  color: #fff;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 10;
  pointer-events: none;
}

.tal-overlay .qty-badge {
  display: inline-block;
  margin-left: 4px;
  background: #fff;
  color: #000;
  border-radius: 999px;
  font-weight: bold;
  font-size: 12px;
  padding: 2px 6px;
  vertical-align: middle;
}


@media (max-width: 600px) {
  .tal-prices-wrapper form > div {
    grid-template-columns: 1fr !important;
  }
  .tal-prices-wrapper form label {
    flex-direction: column;
    align-items: flex-start;
  }
}

body.registration-confirmation .wp-block-image.size-full {
  display: none !important;
}

@media (max-width: 768px) {
  .ngg-gallery-thumbnail a {
    pointer-events: none;
    cursor: default;
  }
}



.tal-user-identity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  background: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px 16px;
  margin: 14px auto;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tal-user-identity::before {
  content: '👤';
  font-size: 20px;
  line-height: 1;
}

.menu-item-logout.show-only-member a{
  color:#FFF;
}


#tal-cart-total {
  background: #fff;
  border-top: 1px solid #ddd;
  margin-bottom: 20px;
}

.tal-pricing-message {
  font-size: 22px;
  color: #2b5e2a;
  font-weight: 500;
  margin-top: 6px;
  padding: 6px 30px;
  background: #dcfbd4;
  border-radius: 5px;
  display: inline-block;
}

.tal-pricing-message::before {
  content: "🎁 ";
  font-size: 17px;
  margin-right: 4px;
}


@media (max-width: 768px) {
  body.has-cart-bar {
    padding-bottom: 120px !important;
  }
}

/* Page Mes commandes*/
body.page-id-1104 #tal-cart-total-val { display:none; } /* remplace XXX par l’ID de la page Mes commandes */
body.page-id-1104 #tal-cart-message { display:none; } /* remplace XXX par l’ID de la page Mes commandes */

/* Page galerie */
/* La barre ne masque jamais les CTA galerie */
body.page-id-1014 #tal-cart-total { pointer-events:none; }
body.page-id-1014 #tal-cart-message { pointer-events:auto; }
/* et/ou s’assurer que tes CTA passent au-dessus */

/* Page Total des commandes */
body.page-id-1119 #tal-cart-total { display:none; }
body.page-id-1119 #tal-cart-message { display:none; }







/* Zebra striping pour les tableaux en front */
table.striped tbody tr:nth-child(odd) {
  background-color: #f9f9f9; /* gris clair */
}
table.striped tbody tr:nth-child(even) {
  background-color: #ffffff; /* blanc */
}

/* Option : conserver l’effet aussi en mode mobile (display: block) */
@media (max-width: 768px) {
  table.striped tbody tr {
    background-color: #fff;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
  }
  table.striped tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
  }
  table.wp-list-table tr:first-child td[data-label="Prénom"],
  table.wp-list-table tr:first-child td[data-label="Email"],
  table.wp-list-table tr:first-child td[data-label="Promotion"],
  table.wp-list-table tr:first-child td[data-label="Code de retrait"],
  table.wp-list-table tr:first-child td[data-label="Groupe"],
  table.wp-list-table tr:first-child td[data-label="Nom"]
  {
      display: none;
  }
}


/* Header avec fond noir - DESKTOP SEULEMENT */
/*
@media (min-width: 769px) {

  .site-primary-header-wrap.ast-container div.ast-builder-grid-row {
    background-color: #dbb585 !important;
  
  .ast-container{
    margin-bottom:0px;
  }

}


*/

/* Header avec fond doré - DESKTOP SEULEMENT */
@media (min-width: 769px) {
  
  /* 1. FOND 100% LARGEUR - Container parent */
  .ast-main-header-wrap.main-header-bar-wrap {
    background-color: #dbb585 !important;
    width: 100% !important;
  }
  
  /* 2. FOND INTÉRIEUR - Votre sélecteur existant */
  .site-primary-header-wrap.ast-container div.ast-builder-grid-row {
    background-color: brown !important;
  }
  
  /* 3. TEXTE BLANC ET PLUS GRAND - Liens menu */
  .ast-builder-menu-1 .main-header-menu .menu-item .menu-link {
    color: white !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
  }
  
  /* 4. HOVER - Effet au survol */
  .ast-builder-menu-1 .main-header-menu .menu-item .menu-link:hover {
    color: #f4f4f4 !important;
    text-decoration: underline !important;
  }
  
  /* 5. ITEM ACTUEL - Page courante */
  .ast-builder-menu-1 .main-header-menu .current-menu-item .menu-link {
    color: white !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
  }
  
  /* 6. BOUTON DÉCONNEXION - Style spécial */
  .ast-builder-menu-1 .main-header-menu .menu-item-logout .menu-link {
    color: white !important;
    font-size: 16px !important;
  }
  
  .ast-builder-menu-1 .main-header-menu .menu-item-logout .dashicons {
    color: white !important;
    vertical-align: middle;
  }
  
  /* 7. CORRECTION CONTAINER */
  .ast-container {
    margin-bottom: 0px;
  }
  
  /* 8. BOUTON CALL TO ACTION - Si besoin */
  .ast-header-button-1 .ast-custom-button-link,
  .ast-header-button-1 .menu-link {
    color: white !important;
    font-size: 16px !important;
  }
  
  /* 9. ESPACEMENT VERTICAL - Padding header */
  .site-primary-header-wrap .ast-builder-grid-row {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
  }
}



/* FORCER BLOC PROMO STICKY BAS MOBILE */
@media (max-width: 768px) {
    #tal-cart-total {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 2147483649 !important;
        margin: 0 !important;
        box-shadow: 0 -3px 15px rgba(0,0,0,0.3) !important;
    }
    
    /* Padding body pour éviter masquage contenu */
    body {
        padding-bottom: 90px !important;
    }
}
@media (min-width: 769px) {
  #tal-cart-total {
        text-align: center;
    }
}



/* Animation clignotement pour le bloc promo */
/* Animation desktop - effet pulse */
/* Animation desktop - effet pulse avec changement de fond */
@media (min-width: 769px) {
    @keyframes tal-cart-pulse {
        0% { 
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            background-color: #ffffff;
        }
        50% { 
            box-shadow: 0 4px 20px rgba(46, 125, 50, 0.6);
            background-color: #f0f9f0;
        }
        100% { 
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            background-color: #ffffff;
        }
    }
    
    .tal-cart-highlight {
        animation: tal-cart-pulse 0.6s ease-in-out 3;
    }
}

/* Animation mobile - effet blink + scale avec changement de fond */
@media (max-width: 768px) {
    @keyframes tal-cart-blink {
        0% { 
            background-color: #fffbe9;
            transform: scale(1);
        }
        50% { 
            background-color: #e8f7e8;
            transform: scale(1.02);
        }
        100% { 
            background-color: #fffbe9;
            transform: scale(1);
        }
    }
    
    .tal-cart-highlight {
        animation: tal-cart-blink 0.8s ease-in-out 2;
    }
    
    /* S'assurer que l'animation s'applique au conteneur interne aussi */
    .tal-cart-highlight > div {
        transition: background-color 0.3s ease;
    }
}