/* ========================================
 * PAGE-RECETTE-CONTENU.CSS
 * Contient les styles pour les sections principales du contenu : 
 * ingrédients, ustensiles, temps de préparation, étapes, conseils et actions
 * ======================================== */

/* ======================================
 * STYLES GÉNÉRAUX DES SECTIONS
 * ====================================== */
.recette-content > section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

/* Exclure la section résumé des styles généraux */
.recette-content > section.recette-resume-section {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recette-content > section:last-child {
    border-bottom: none;
}

.recette-content h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 10px;
}

.recette-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* ======================================
 * SECTION TEMPS DE PRÉPARATION
 * ====================================== */
.recette-temps-container {
    margin-bottom: 25px;
    margin-top: 20px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.recette-temps-summary {
    background-color: white;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.recette-temps-summary::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 100%;
    background-color: var(--primary-color);
}

.temps-total {
    display: flex;
    align-items: baseline;
    justify-content: center;
    position: relative;
}

.temps-total .temps-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-right: 10px;
}

.temps-total .temps-value {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-color);
}

.recette-temps-details {
    display: flex;
    justify-content: center;
    gap: 0px;
    padding: 12px 15px;
    background-color: white;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.temps-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 4rem;
}

.temps-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    height: 70%;
    width: 1px;
    top: 15%;
    background-color: rgba(0, 0, 0, 0.1);
}

.temps-label {
    font-size: 0.9rem;
    color: var(--text-color-secondary);
    margin-bottom: 8px;
}

.temps-value {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

/* ======================================
 * SECTION INGRÉDIENTS ET USTENSILES
 * ====================================== */

/* Styles pour la grille d'ingrédients */
.ingredients-header {
    display: flex;
    align-items: center;
    justify-content: start;
    margin-bottom: 30px;
    margin-top: 20px;
}

.ingredients-price-wrapper {
    margin-left: 30px; 
}

.ingredients-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
}

.ingredients-servings {
    display: flex;
    align-items: center;
    gap: 15px;
}

.servings-control {
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0px 20px rgba(0, 0, 0, 0.1);
}

.servings-btn {
    width: 42px;
    height: 42px;
    border: none;
    background-color: #ff6b6b;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation; /* Empêche le zoom au double-tap */
}

.servings-btn.minus {
    border-radius: 8px 0 0 8px;
}

.servings-btn.plus {
    border-radius: 0 8px 8px 0;
}

.servings-btn:hover {
    background-color: var(--primary-color);
}

.servings-btn:active {
    transform: scale(0.95);
}

#servings {
    width: 40px;
    border: none;
    text-align: center;
    font-weight: bold;
    font-size: 1.4rem;
    color: var(--primary-color);
    background-color: #FFF;
    -moz-appearance: textfield;
    margin: 0 0 0 10px;
    touch-action: manipulation; /* Empêche le zoom au double-tap */
}

#servings + label {
    min-width: 85px;
    font-size: 0.9rem;
    padding-right: 12px;
    color: #666;
}

#servings::-webkit-outer-spin-button,
#servings::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Grille d'ingrédients */
.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.ingredient-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    padding: 15px 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.ingredient-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
}

.ingredient-quantity {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.ingredient-name {
    font-size: 1rem;
    color: #555;
}

/* Ustensiles */
.ustensiles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ustensile-item {
    padding: 8px 15px;
    background-color: var(--bg-color-secondary);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
}

/* ======================================
 * SECTION ÉTAPES DE PRÉPARATION
 * ====================================== */


/* Style pour chaque grande étape */
.grande-etape {
    background-color: var(--bg-color-secondary);
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1.5rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Titre de la grande étape */
.grande-etape h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Liste des sous-étapes */
.sous-etapes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: sous-etape-counter;
}

/* Chaque sous-étape */
.sous-etape-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
    position: relative;
    counter-increment: sous-etape-counter;
}

.sous-etape-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sous-etape-item::before {
    content: counter(sous-etape-counter);
    width: 1.8rem;
    height: 1.8rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Conteneur pour l'image */
.sous-etape-image {
    flex: 0 0 150px;
}

.sous-etape-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Contenu texte de la sous-étape */
.sous-etape-content {
    flex: 1;
}

.sous-etape-content p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
}

/* Étapes (ancienne structure) */
.etapes-list {
    padding-left: 30px;
}

.etape-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.etape-item:last-child {
    border-bottom: none;
}

.etape-item h3 {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
}

.etape-item p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text-color);
}

.etape-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin-top: 15px;
}

/* ======================================
 * SECTION CONSEILS DU CHEF
 * ====================================== */
.conseils-list {
    background-color: var(--bg-color-secondary);
    padding: 20px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.conseil-item {
    position: relative;
    padding-left: 25px;
}

.conseil-item:last-child {
    margin-bottom: 0;
}

.conseil-item::before {
    font-family: "Font Awesome 7 Pro";
    font-weight: 900;
    content: "\f0eb"; /* fa-lightbulb */
    position: absolute;
    left: 0;
    top: 0;
}

.conseil-item p {
    line-height: 1.6;
    color: var(--text-color);
}

/* ======================================
 * SECTION ACTIONS (supprimée)
 * ====================================== */

/* ======================================
 * MODE SOMBRE
 * ====================================== */

/* Mode sombre pour les temps */
.dark-mode .recette-temps-summary {
    background-color: var(--card-bg);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .temps-item:not(:last-child)::after {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .recette-temps-details {
    background-color: var(--card-bg);
}

/* Mode sombre pour les ingrédients */
.dark-mode .ingredient-card {
    display: flex;
    flex-direction: column;
    padding: 0; /* Suppression du padding global */
    overflow: hidden; /* Pour éviter les débordements */
    background-color: transparent; /* Fond transparent */
    border-radius: 8px;
    position: relative; /* Pour le positionnement des pseudo-éléments */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Partie supérieure (fond blanc pour l'image) */
.dark-mode .ingredient-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 140px; /* Hauteur fixe pour la zone blanche supérieure */
    background-color: white;
    border-radius: 8px 8px 0 0;
    z-index: 0;
}

/* Partie inférieure (fond sombre pour le texte) */
.dark-mode .ingredient-card::after {
    content: '';
    position: absolute;
    top: 140px; /* Même valeur que la hauteur du ::before */
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-bg);
    border-radius: 0 0 8px 8px;
    z-index: 0;
}

/* Style de l'image avec une position relative pour s'afficher au-dessus du fond */
.dark-mode .ingredient-image {
    position: relative;
    z-index: 1;
    margin: 15px auto 25px; /* Marge supérieure et inférieure augmentée pour plus d'espace */
    display: block;
    width: auto;
}

/* Zone du texte - s'assurer qu'elle est au-dessus du fond */
.dark-mode .ingredient-info {
    position: relative;
    z-index: 1; /* Au-dessus des pseudo-éléments */
    width: 100%; /* S'étendre sur toute la largeur */
    padding: 10px;
    background-color: transparent; /* Fond transparent car déjà géré par ::after */
}

/* Couleur du texte */
.dark-mode .ingredient-quantity,
.dark-mode .ingredient-name {
    color: white; /* Texte en blanc */
}

.dark-mode .servings-control {
    background-color: #222;
}

.dark-mode #servings {
    background-color: #222;
    color: #f5f5f5;
}

.dark-mode #servings + label {
    color: #f5f5f5;
}

.dark-mode .ingredients-price {
    color: #ff8a8a;
}


.ingredient-card {
        padding: 0;
    }

    .dark-mode .ingredient-card {
        padding: 0;
    }

    .ingredient-card::before {
        height: 180px; 
    }

    .dark-mode .ingredient-card::before {
        height: 180px; 
    }

    .ingredient-card::after {
        top: 180px;
    }

    .dark-mode .ingredient-card::after {
        top: 180px;
    }

    .ingredient-image {
        margin: 20px auto 0px;
        width: 130px;
        height: 130px;
    }

    .dark-mode .ingredient-image {
        margin: 20px auto 0px;
        width: 130px;
        height: 130px;
    }

    .ingredient-quantity {
        font-size: 1rem;
        margin-bottom: 0px;
    }

    .dark-mode .ingredient-quantity {
        font-size: 1rem;
        margin-bottom: 0px;
    }

    .ingredient-info {
        padding: 10px 10px 0px 10px;
    }

    .dark-mode .ingredient-info {
        padding: 50px 10px 0px 10px;
    }

    .ingredient-name {
        padding: 20px 5px 30px 5px;
        font-size: 0.9rem;
    }

    .dark-mode .ingredient-name {
        padding: 20px 5px 20px 5px;
        font-size: 0.9rem;
    }


/* Mode sombre - Autres éléments (supprimés) */

/* ======================================
 * MEDIA QUERIES (RESPONSIVE)
 * ====================================== */

/* Écrans larges */
@media screen and (max-width: 1200px) {
    .ingredients-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    .ingredient-card {
        padding: 0;
    }

    .dark-mode .ingredient-card {
        padding: 0;
    }

    .ingredient-card::before {
        height: 180px; 
    }

    .dark-mode .ingredient-card::before {
        height: 180px; 
    }

    .ingredient-card::after {
        top: 180px;
    }

    .dark-mode .ingredient-card::after {
        top: 180px;
    }

    .ingredient-image {
        margin: 20px auto 0px;
        width: 130px;
        height: 130px;
    }

    .dark-mode .ingredient-image {
        margin: 20px auto 0px;
        width: 130px;
        height: 130px;
    }

    .ingredient-quantity {
        font-size: 1rem;
        margin-bottom: 0px;
    }

    .dark-mode .ingredient-quantity {
        font-size: 1rem;
        margin-bottom: 0px;
    }

    .ingredient-info {
        padding: 10px 10px 0px 10px;
    }

    .dark-mode .ingredient-info {
        padding: 35px 10px 0px 10px;
    }

    .ingredient-name {
        padding: 25px 5px 30px 5px;
        font-size: 0.9rem;
    }

    .dark-mode .ingredient-name {
        padding: 25px 5px 30px 5px;
        font-size: 0.9rem;
    }


}

/* Tablettes et petits écrans */
@media screen and (max-width: 1024px) {

    .recette-content > section {
        margin-bottom: 20px;
        padding-bottom: 30px;
    }

    .recette-content h2 {
        font-size: 1.3rem;
    }

    .ingredients-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
    }

    .ingredient-card {
        padding: 0;
    }

    .dark-mode .ingredient-card {
        padding: 0;
    }

    .ingredient-card::before {
        height: 180px; 
    }

    .dark-mode .ingredient-card::before {
        height: 165px; 
    }

    .ingredient-card::after {
        top: 180px;
    }

    .dark-mode .ingredient-card::after {
        top: 165px;
    }

    .ingredient-image {
        margin: 20px auto 0px;
        width: 120px;
        height: 120px;
    }

    .dark-mode .ingredient-image {
        margin: 20px auto 0px;
        width: 120px;
        height: 120px;
    }

    .ingredient-quantity {
        font-size: 1.0rem;
        margin-bottom: 0px;
    }

    .dark-mode .ingredient-quantity {
        font-size: 1.0rem;
        margin-bottom: 0px;
    }

    .ingredient-info {
        padding: 10px 10px 0px 10px;
    }

    .dark-mode .ingredient-info {
        padding: 35px 10px 0px 10px;
    }

    .ingredient-name {
        padding: 25px 5px 30px 5px;
        font-size: 0.9rem;
    }

    .dark-mode .ingredient-name {
        padding: 25px 5px 30px 5px;
        font-size: 0.9rem;
    }
    
    .nutrition-circles {
        justify-content: space-between;
    }

}

/* Tablettes en mode portrait et téléphones larges */
@media screen and (max-width: 768px) {
    .recette-meta {
        flex-wrap: wrap;
    }
    
    .recette-note {
        margin-left: 0;
    }
    
    .recette-temps-container {
        margin-bottom: 25px;
    }
    
    .recette-temps-summary {
        padding: 12px 15px;
    }
    
    .temps-total .temps-label {
        font-size: 0.95rem;
    }
    
    .temps-total .temps-value {
        font-size: 1.1rem;
    }
    
    .recette-temps-details {
        justify-content: center;
        padding: 12px 10px;
    }
    
    .temps-item {
        padding: 0 2.5rem;
    }
    
    .temps-label {
        font-size: 0.85rem;
    }
    
    .temps-value {
        font-size: 1rem;
    }
    
    /* Responsive - Ingrédients */
    .ingredients-header {
        align-items: center;
        gap: 20px;
    }
    
    .ingredients-price-wrapper {
        margin-left: 0;
    }
    
    .ingredients-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    /* Responsive - Étapes */
    .sous-etape-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sous-etape-image {
        flex: none;
        width: 100%;
    }
    
    .sous-etape-image img {
        height: 200px;
    }
    
    .sous-etape-item::before {
        left: -1.5rem;
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.8rem;
    }
    .ingredient-card {
        padding: 0;
    }

    .dark-mode .ingredient-card {
        padding: 0;
    }

    .ingredient-card::before {
        height: 180px; 
    }

    .dark-mode .ingredient-card::before {
        height: 150px; 
    }

    .ingredient-card::after {
        top: 180px;
    }

    .dark-mode .ingredient-card::after {
        top: 150px;
    }

    .ingredient-image {
        margin: 10px auto 0px;
        width: 100%;
        height: 110px;
    }

    .dark-mode .ingredient-image {
        margin: 15px auto 0px;
        width: 100%;
        height: 110px;
    }

    .ingredient-quantity {
        font-size: 0.95rem;
        margin-bottom: 5px;
        line-height: 1.1rem;
    }

    .dark-mode .ingredient-quantity {
        font-size: 0.95rem;
        margin-bottom: 5px;
        line-height: 1.1rem;
    }

    .ingredient-info {
        padding: 10px 10px 0px 10px;
    }

    .dark-mode .ingredient-info {
        padding: 40px 10px 0px 10px;
    }

    .ingredient-name {
        padding: 20px 5px 30px 5px;
        font-size: 0.85rem;
        line-height: 0.95rem;
    }

    .dark-mode .ingredient-name {
        padding: 20px 5px 30px 5px;
        font-size: 0.85rem;
        line-height: 0.95rem;
    }
}

/* Téléphones et petites tablettes */
@media screen and (max-width: 480px) {

    .recette-temps-container {
        margin-bottom: 20px;
    }

    .temps-item {
    padding: 0 1.3rem;
}
    
    .recette-temps-summary {
        padding: 12px 15px 10px 15px;
    }
    
    .temps-total {
        align-items: baseline;
    }
    
    .temps-total .temps-label {
        font-size: 0.9rem;
    }
    
    .temps-total .temps-value {
        font-size: 1rem;
    }
    
    .temps-value {
        font-weight: 600;
        font-size: 0.9rem;
    }

    .recette-temps-details {
        justify-content: center;
        padding: 8px 10px;
        gap: 0px;
    }

    .temps-label {
        margin-bottom: 3px;
    }

    
    /* Responsive - Ingrédients */


    .ingredients-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .ingredient-card {
        flex-direction: column;
        text-align: center;
        padding: 0px 5px;
        align-items: center;
    }
    
    .ingredient-image {
        margin: 0px auto;
        width: 90%;
    }

    .dark-mode .ingredient-image {
        width: 90%;
    }
    
    .ingredient-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .ingredients-price {
        font-size: 1.4rem;
    }
    
    .servings-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    #servings {
        width: 35px;
        height: 38px;
        font-size: 1.3rem;
    }
    
    #servings + label {
        font-size: 0.85rem;
    }
    
    /* Responsive - Étapes */
    .sous-etape-image img {
        height: 150px;
    }
    
    .grande-etape {
        padding: 1rem;
    }
    
    .etapes-list {
        padding-left: 20px;
    }
    
    .ustensiles-list {
        flex-direction: column;
    }
    
    .ustensile-item {
        width: 100%;
    }
    
    .recette-content > section {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .recette-content h2 {
        font-size: 1.3rem;
    }
}

/* Téléphones moyens (321-480px) - Ajustements taille servings/prix */
@media screen and (min-width: 321px) and (max-width: 480px) {
    .ingredients-header {
        gap: 8px;
    }
    
    .ingredients-price-wrapper {
        margin-left: 10px;
    }
    
    .ingredients-price {
        font-size: 1.15rem;
        white-space: nowrap;
    }
    
    .servings-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    
    #servings {
        width: 28px;
        height: 34px;
        font-size: 1.1rem;
        margin-left: 6px;
    }
    
    #servings + label {
        font-size: 0.8rem;
        min-width: 70px;
        padding-right: 8px;
    }
    
    .btn-add-to-cart {
        width: 34px;
        height: 34px;
        margin-left: 10px;
    }
    
    .btn-add-to-cart i {
        font-size: 0.95rem;
    }
}

/* Petits téléphones */
@media screen and (max-width: 320px) {
    .ingredients-grid {
        grid-template-columns: 1fr;
    }
    
    .ingredient-card {
        flex-direction: row;
        text-align: left;
        padding: 12px;
        align-items: center;
    }
    
    .ingredient-image {
        width: 70px;
        height: 70px;
        margin-bottom: 0;
        margin-right: 15px;
    }
    
    .ingredient-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Mode sombre - Ajustements pour mobile */
    .dark-mode .ingredient-card {
        flex-direction: row;
        min-height: 90px; /* Hauteur minimale pour les cartes en mode mobile */
    }
    
    /* Adapter la zone blanche pour le mode horizontal */
    .dark-mode .ingredient-card::before {
        width: 90px; /* Largeur fixe pour la zone d'image */
        height: 100%;
        border-radius: 8px 0 0 8px; /* Coins arrondis à gauche seulement */
    }
    
    /* Adapter la zone sombre pour le mode horizontal */
    .dark-mode .ingredient-card::after {
        top: 0;
        left: 90px; /* Même valeur que la largeur du ::before */
        border-radius: 0 8px 8px 0; /* Coins arrondis à droite seulement */
    }
    
    /* Ajuster l'image */
    .dark-mode .ingredient-image {
        margin: auto 5px auto 10px;
        max-height: 70px;
        max-width: 70px;
    }
    
    /* Ajuster la zone de texte */
    .dark-mode .ingredient-info {
        padding-left: 15px;
    }
    
    .recette-content > section {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    
    .recette-content h2 {
        font-size: 1.2rem;
    }
}

/* ======================================
 * BOUTON AJOUTER AU PANIER / LISTE DE COURSES
 * Style aligné sur les boutons +/- (rose/corail)
 * ====================================== */

.btn-add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    background-color: #ff6b6b;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    margin-left: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 0px 20px rgba(0, 0, 0, 0.1);
    touch-action: manipulation; /* Empêche le zoom au double-tap */
}

.btn-add-to-cart:hover {
    background-color: var(--primary-color, #ff6b6b);
    filter: brightness(0.95);
}

.btn-add-to-cart:active {
    transform: scale(0.95);
}

.btn-add-to-cart i {
    font-size: 1.1rem;
}

/* Animation de succès */
.btn-add-to-cart.success {
    background-color: #10b981;
    animation: cartPulse 0.5s ease;
}

.btn-add-to-cart.success i::before {
    content: "\f00c"; /* fa-check */
}

@keyframes cartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ======================================
 * TOOLTIP DU BOUTON PANIER
 * Style identique aux tooltips des étapes
 * ====================================== */

.btn-add-to-cart {
    position: relative;
    overflow: visible; /* Important pour le tooltip */
}

.btn-add-to-cart .tooltip-text {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #2a3334;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    border: 2px solid var(--savoor-coral, #FF6B6B);
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Flèche du tooltip */
.btn-add-to-cart .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--savoor-coral, #FF6B6B);
}

/* Affichage au hover */
.btn-add-to-cart:hover .tooltip-text,
.btn-add-to-cart:focus .tooltip-text {
    opacity: 1;
    visibility: visible;
}

/* Masquer le tooltip pendant l'état de succès */
.btn-add-to-cart.success .tooltip-text {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Mode clair */
body.light-mode .btn-add-to-cart .tooltip-text {
    background-color: #2c3e50;
}

body.light-mode .btn-add-to-cart .tooltip-text::after {
    border-top-color: var(--savoor-coral, #FF6B6B);
}

/* Responsive */
@media (max-width: 480px) {
    .btn-add-to-cart {
        width: 38px;
        height: 38px;
        margin-left: 12px;
    }
    
    .btn-add-to-cart i {
        font-size: 1rem;
    }
    
    .btn-add-to-cart .tooltip-text {
        font-size: 0.9rem;
        padding: 8px 14px;
        white-space: normal;
        width: max-content;
        max-width: 200px;
        text-align: center;
    }
}
