/* Styles custom pour De Anciola */

/* ==========================================
   1. BOUTONS DEANCIOLA
   ========================================== */

/* Style du bouton */
.custom-button-1 {
  position: relative;
  display: inline-block;
  padding: 15px 40px; /* Ajuste la taille du bouton */
  font-size: 1em;
  font-weight: 100;
  font-family: Sarabun;
  color: #000; /* Couleur du texte */
  background-color: transparent; /* Fond initial */
  border: 1px solid #000; /* Bordure du bouton */
  border-radius: 0px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: color 0.3s ease;
}

/* Création de l'effet de remplissage */
.custom-button-1::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: #00222E; /* Couleur de remplissage au hover */
  z-index: 0;
  transition: height 0.3s ease;
}

/* Texte toujours au-dessus */
.custom-button-1 span {
  position: relative;
  z-index: 1;
  display: inline-block;
}

/* Effet au hover */
.custom-button-1:hover::before {
  height: 100%;
}

.custom-button-1:hover span {
  color: #fff; /* Change la couleur du texte au hover */
}

/* ==========================================
   2. BOUTONS CIRCULAIRES "+" DEANCIOLA
   ========================================== */

/* Bouton plus circulaire */
.big-btn-plus{
  /* Faciles à personnaliser */
  --size: 60px;            /* diamètre du bouton */
  --stroke: 1px;           /* épaisseur anneau + plus */
  --ring:   #1a1a1a;       /* couleur anneau (repos) */
  --plus:   #1a1a1a;       /* couleur plus (repos) */
  --fill-hover: #00222c;   /* remplissage au hover */
  --ring-hover: #00222c;   /* couleur du contour au hover (contraste) */
  --plus-hover: #ffffff;   /* couleur du plus au hover */
  --rotate: 90deg;         /* angle de rotation au hover */

  display:inline-grid;
  place-items:center;
  width:var(--size);
  aspect-ratio:1;
  padding:0;
  background:transparent;
  border:0;
  cursor:pointer;
}

.big-btn-plus svg{
  width:100%;
  height:100%;
  transform-origin:50% 50%;
  transition: transform .35s ease;
}

/* Anneau : même épaisseur que le plus */
.big-btn-plus .ring{
  fill: transparent;
  stroke: var(--ring);
  stroke-width: var(--stroke);
  vector-effect: non-scaling-stroke;
  transition: fill .35s ease, stroke .35s ease;
}

/* Plus : même épaisseur que l’anneau */
.big-btn-plus .plus{
  stroke: var(--plus);
  stroke-width: var(--stroke);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: stroke .35s ease;
}

/* Hover / focus */
.big-btn-plus:hover svg,
.big-btn-plus:focus-visible svg{
  transform: rotate(var(--rotate));
}
.big-btn-plus:hover .ring,
.big-btn-plus:focus-visible .ring{
  fill: var(--fill-hover);         /* se remplit */
  stroke: var(--ring-hover);       /* garde un contour lisible */
}
.big-btn-plus:hover .plus,
.big-btn-plus:focus-visible .plus{
  stroke: var(--plus-hover);       /* le + reste visible */
}

/* Accessibilité focus clavier */
.big-btn-plus:focus-visible{
  outline: 2px solid color-mix(in oklab, var(--fill-hover), white 40%);
  outline-offset: 3px;
}

/* Préfère moins d’animations */
@media (prefers-reduced-motion: reduce){
  .big-btn-plus, .big-btn-plus svg, .big-btn-plus .ring, .big-btn-plus .plus{
    transition: none !important;
  }
}

/* ==========================================
   3. BOUTON ADD TO CART
   ========================================== */

/* Bouton plus circulaire */
.de-anciola-add-to-cart-btn {
    /* Faciles à personnaliser */
    --size: 60px;            /* diamètre du bouton */
    --stroke: 1px;           /* épaisseur anneau + plus */
    --ring: #1a1a1a;         /* couleur anneau (repos) */
    --plus: #1a1a1a;         /* couleur plus (repos) */
    --fill-hover: #00222c;   /* remplissage au hover */
    --ring-hover: #00222c;   /* couleur du contour au hover (contraste) */
    --plus-hover: #ffffff;   /* couleur du plus au hover */
    --rotate: 90deg;         /* angle de rotation au hover */
    
    display: inline-grid;
    place-items: center;
    width: var(--size);
    aspect-ratio: 1;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    box-shadow: none !important; /* Supprimer toute ombre */
}

.de-anciola-add-to-cart-btn:hover,
.de-anciola-add-to-cart-btn:focus-visible {
    box-shadow: none !important; /* Pas d'ombre au hover */
}

.de-anciola-add-to-cart-btn svg {
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
    transition: transform .35s ease;
}

/* Anneau : même épaisseur que le plus */
.de-anciola-add-to-cart-btn .ring {
    fill: transparent;
    stroke: var(--ring);
    stroke-width: var(--stroke);
    vector-effect: non-scaling-stroke;
    transition: fill .35s ease, stroke .35s ease;
}

/* Plus : même épaisseur que l'anneau */
.de-anciola-add-to-cart-btn .plus {
    stroke: var(--plus);
    stroke-width: var(--stroke);
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    transition: stroke .35s ease;
}

/* Hover / focus */
.de-anciola-add-to-cart-btn:hover svg,
.de-anciola-add-to-cart-btn:focus-visible svg {
    transform: rotate(var(--rotate));
}

.de-anciola-add-to-cart-btn:hover .ring,
.de-anciola-add-to-cart-btn:focus-visible .ring {
    fill: var(--fill-hover);         /* se remplit */
    stroke: var(--ring-hover);       /* garde un contour lisible */
}

.de-anciola-add-to-cart-btn:hover .plus,
.de-anciola-add-to-cart-btn:focus-visible .plus {
    stroke: var(--plus-hover);       /* le + reste visible */
}

/* Accessibilité focus clavier */
.de-anciola-add-to-cart-btn:focus-visible {
    outline: 2px solid color-mix(in oklab, var(--fill-hover), white 40%);
    outline-offset: 3px;
}

/* État loading */
.de-anciola-add-to-cart-btn.loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

.de-anciola-add-to-cart-btn.loading svg {
    animation: rotate-loading 1s linear infinite;
}

/* État ajouté avec succès */
.de-anciola-add-to-cart-btn.added .ring {
    fill: #4CAF50;
    stroke: #4CAF50;
}

.de-anciola-add-to-cart-btn.added .plus {
    stroke: #ffffff;
}

/* Animations */
@keyframes rotate-loading {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes checkmark {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* Préfère moins d'animations */
@media (prefers-reduced-motion: reduce) {
    .de-anciola-add-to-cart-btn,
    .de-anciola-add-to-cart-btn svg,
    .de-anciola-add-to-cart-btn .ring,
    .de-anciola-add-to-cart-btn .plus {
        transition: none !important;
    }
    
    .de-anciola-add-to-cart-btn.loading svg {
        animation: none !important;
    }
}

/* ==========================================
   4. BARRE DE RECHERCHE
   ========================================== */

.de-anciola-search {
    display: flex;
    align-items: center;
    gap: 0px;
}

.de-search-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #FBC273;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
    flex-shrink: 0;
}

.de-search-btn:hover {
    background: rgba(251, 194, 115, 0.1);
    transform: scale(1.05);
}

.de-search-btn.active {
    border: none;
    width: auto;
    background: transparent;
}

.de-search-btn.active:hover {
    background: transparent;
    transform: none;
}

.de-search-btn svg {
    width: 18px;
    height: 18px;
    stroke: #FBC273;
    fill: none;
    stroke-width: 2;
}

.de-search-btn svg circle,
.de-search-btn svg path {
    stroke: #FBC273;
}

.de-search-wrapper {
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s;
}

.de-search-wrapper.active {
    width: 250px;
    opacity: 1;
}

.de-search-field {
    width: 100%;
    height: 40px;
    padding: 0 20px;
    border: 1px solid #FBC273;
    border-radius: 20px;
    background: transparent;
    color: #FBC273;
    font-size: 14px;
    outline: none;
}

.de-search-field::placeholder {
    color: rgba(251, 194, 115, 0.6);
}

.de-search-field:focus {
    background: rgba(251, 194, 115, 0.05);
}

/* Suggestions de recherche */
.de-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #FBC273;
    border-top: none;
    border-radius: 0 0 20px 20px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
}

.de-search-suggestions.active {
    max-height: 300px;
    opacity: 1;
    overflow-y: auto;
}

.de-search-suggestion {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(251, 194, 115, 0.2);
}

.de-search-suggestion:last-child {
    border-bottom: none;
}

.de-search-suggestion:hover {
    background: rgba(251, 194, 115, 0.1);
}

.de-suggestion-type {
    font-size: 0.75em;
    font-family: 'Sarabun', sans-serif;
    font-weight: 300;
    color: #00222c;
    background: rgba(253, 189, 116, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
}

.de-suggestion-name {
    font-size: 0.9em;
    font-family: 'Sarabun', sans-serif;
    font-weight: 300;
    color: #333;
}

.de-search-wrapper {
    position: relative;
}

/* Responsive pour la recherche */
@media (max-width: 768px) {
    .de-search-wrapper.active {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .de-search-wrapper.active {
        width: 150px;
    }
    
    .de-search-field {
        font-size: 13px;
        padding: 0 15px;
    }
}

/* ==========================================
   3. POSITIONNEMENT SUR LES CARTES PRODUITS
   ========================================== */

/* Positionner le bouton en bas à droite de la carte */
.woocommerce ul.products li.product .de-anciola-add-to-cart-btn {
    position: absolute !important;
    bottom: 15px !important;
    right: 15px !important;
    z-index: 10;
    margin: 0 !important;
    transform: none !important; /* Empêcher tout déplacement */
}

/* Si le parent n'est pas en position relative, le forcer */
.woocommerce ul.products li.product {
    position: relative !important;
}

/* Conteneur du bouton pour stabiliser la position */
.woocommerce ul.products li.product .button {
    position: relative;
}

/* S'assurer que le bouton ne chevauche pas le contenu */
.woocommerce ul.products li.product .price {
    margin-bottom: 70px !important;
    padding-right: 10px;
}

/* Empêcher le bouton de bouger pendant les animations */
.de-anciola-add-to-cart-btn.loading,
.de-anciola-add-to-cart-btn.added {
    position: absolute !important;
    bottom: 15px !important;
    right: 15px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .woocommerce ul.products li.product .de-anciola-add-to-cart-btn {
        width: 50px !important;
        height: 50px !important;
        bottom: 10px !important;
        right: 10px !important;
    }
    
    .woocommerce ul.products li.product .price {
        margin-bottom: 60px !important;
    }
}

/* ==========================================
   4. HEADER DE ANCIOLA
   ========================================== */

.de-anciola-header {
    background-color: #00222c;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.de-header-container {
    max-width: 90vw;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 30px;
    gap: 30px;
}

/* ==========================================
   4.1. SECTION LOGO
   ========================================== */

.de-header-logo {
    flex-shrink: 0;
}

.de-header-logo a {
    display: block;
    line-height: 0;
}

.de-header-logo img {
    height: 25px!important;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.de-header-logo a:hover img {
    transform: scale(1.05);
}

/* ==========================================
   4.2. SECTION NAVIGATION
   ========================================== */

.de-header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.de-header-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
}

.de-header-nav li {
    margin: 0;
}

.de-header-nav a {
    display: block;
    padding: 10px 18px;
    color: #FBC273;
    text-decoration: none;
    font-size: 1em;
    font-weight: 300;
    font-family: 'Sarabun', sans-serif;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 4px;
    position: relative;
    border: none;
}

/* Boutique en ligne - Bouton avec contour */
.de-header-nav li:first-child a {
    border: 1px solid #FDBD74;
    border-radius: 0px;
    padding: 9px 17px;
    overflow: hidden;
}

.de-header-nav li:first-child a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: #FDBD74;
    transition: height 0.3s ease;
    z-index: -1;
}

.de-header-nav li:first-child a:hover::before,
.de-header-nav li:first-child a.active::before {
    height: 100%;
}

.de-header-nav li:first-child a:hover,
.de-header-nav li:first-child a.active {
    color: #00222E;
}

/* Autres liens - Trait en dessous uniquement */
.de-header-nav li:not(:first-child) a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #FBC273;
    transition: width 0.3s ease;
}

.de-header-nav li:not(:first-child) a:hover::after,
.de-header-nav li:not(:first-child) a.active::after {
    width: calc(100% - 36px);
}

/* ==========================================
   4.3. SECTION ACTIONS (Recherche, Compte, Panier)
   ========================================== */

.de-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Bouton Mon Compte */
.de-account-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #FBC273;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
    text-decoration: none;
    position: relative;
}

.de-account-btn:hover {
    background: rgba(251, 194, 115, 0.1);
    transform: scale(1.05);
}

.de-account-btn svg {
    width: 20px;
    height: 20px;
    stroke: #FBC273;
    fill: none;
    stroke-width: 2;
}

/* Bouton Panier */
.de-cart-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #FBC273;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
    text-decoration: none;
    position: relative;
}

.de-cart-btn:hover {
    background: rgba(251, 194, 115, 0.1);
    transform: scale(1.05);
}

.de-cart-btn svg {
    width: 20px;
    height: 20px;
    stroke: #FBC273;
    fill: none;
    stroke-width: 2;
}

/* Badge compteur panier */
.de-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FBC273;
    color: #00222c;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.de-cart-count.empty {
    display: none;
}

/* ==========================================
   4.4. APERÇU DU PANIER (LIGHTBOX)
   ========================================== */

.de-cart-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.de-cart-lightbox.active {
    display: flex;
    opacity: 1;
}

.de-cart-lightbox__main {
    background: #ffffff;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    border-radius: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.de-cart-lightbox.active .de-cart-lightbox__main {
    transform: scale(1);
}

.de-cart-lightbox__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.de-cart-lightbox__close::before,
.de-cart-lightbox__close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #333;
    transition: background 0.3s ease;
}

.de-cart-lightbox__close::before {
    transform: rotate(45deg);
}

.de-cart-lightbox__close::after {
    transform: rotate(-45deg);
}

.de-cart-lightbox__close:hover::before,
.de-cart-lightbox__close:hover::after {
    background: #00222c;
}

.de-cart-lightbox__content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.de-cart-lightbox__products {
    margin-bottom: 20px;
}

.de-cart-lightbox__product {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
}

.de-cart-lightbox__product:first-child {
    padding-top: 0;
}

.de-cart-lightbox__product:last-child {
    border-bottom: none;
}

.de-cart-lightbox__product-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.de-cart-lightbox__product-name {
    font-family: 'Sarabun', sans-serif;
    font-weight: 300;
    font-size: 1em;
    color: #333;
}

.de-cart-lightbox__product-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.de-cart-lightbox__product-name a:hover {
    color: #00222c;
}

.de-cart-lightbox__product-price {
    font-family: 'Sarabun', sans-serif;
    font-weight: 300;
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.de-cart-lightbox__product-remove {
    display: flex;
    align-items: center;
    justify-content: center;
}

.de-cart-lightbox__product-remove a {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    text-decoration: none;
    font-size: 20px;
    transition: color 0.3s ease;
}

.de-cart-lightbox__product-remove a:hover {
    color: #d32f2f;
}

.de-cart-lightbox__subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 2px solid #e0e0e0;
    font-family: 'Sarabun', sans-serif;
    font-weight: 300;
    font-size: 1.1em;
}

.de-cart-lightbox__subtotal strong {
    font-weight: 400;
}

.de-cart-lightbox__footer-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.de-cart-lightbox__footer-buttons a {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    font-family: 'Sarabun', sans-serif;
    font-weight: 300;
    font-size: 1em;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.de-cart-lightbox__footer-buttons .de-btn-view-cart {
    background: transparent;
    border: 1px solid #00222c;
    color: #00222c;
}

.de-cart-lightbox__footer-buttons .de-btn-view-cart:hover {
    background: #00222c;
    color: #ffffff;
}

.de-cart-lightbox__footer-buttons .de-btn-checkout {
    background: #FDBD74;
    border: 1px solid #FDBD74;
    color: #00222c;
}

.de-cart-lightbox__footer-buttons .de-btn-checkout:hover {
    background: #00222c;
    border-color: #00222c;
    color: #ffffff;
}

.de-cart-lightbox__empty {
    text-align: center;
    padding: 40px 20px;
    font-family: 'Sarabun', sans-serif;
    font-weight: 300;
    font-size: 1em;
    color: #666;
}

/* ==========================================
   4.5. MENU MOBILE (HAMBURGER)
   ========================================== */

.de-mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid #FBC273;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    transition: all 0.3s;
}

.de-mobile-menu-btn:hover {
    background: rgba(251, 194, 115, 0.1);
    transform: scale(1.05);
}

.de-mobile-menu-btn span {
    width: 18px;
    height: 2px;
    background: #FBC273;
    border-radius: 2px;
    transition: all 0.3s;
}

.de-mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.de-mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.de-mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================
   4.6. RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
    .de-header-nav a {
        padding: 8px 14px;
        font-size: 0.95em;
    }
    
    .de-header-nav li:first-child a {
        padding: 7px 13px;
    }
    
    .de-header-container {
        gap: 20px;
        padding: 10px 20px;
    }
}

@media (max-width: 768px) {
    .de-mobile-menu-btn {
        display: flex;
    }
    
    .de-header-container {
        flex-wrap: wrap;
        padding: 10px 15px;
    }
    
    .de-header-nav {
        display: none;
        width: 100%;
        order: 4;
        margin-top: 15px;
    }
    
    .de-header-nav.active {
        display: block;
    }
    
    .de-header-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .de-header-nav a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(251, 194, 115, 0.1);
    }
    
    .de-header-nav li:first-child a {
        padding: 15px 20px;
    }
    
    .de-header-nav li:not(:first-child) a::after {
        display: none;
    }
    
    .de-header-logo img {
        height: 30px;
    }
    
    .de-header-actions {
        gap: 10px;
    }
    
    .de-account-btn,
    .de-cart-btn,
    .de-search-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .de-header-logo img {
        height: 28px;
    }
    
    .de-header-actions {
        gap: 8px;
    }
    
    .de-account-btn,
    .de-cart-btn,
    .de-search-btn,
    .de-mobile-menu-btn {
        width: 34px;
        height: 34px;
    }
    
    .de-account-btn svg,
    .de-cart-btn svg {
        width: 18px;
        height: 18px;
    }
}