/* Make buttons in formations section larger */
.formations-grid .btn-primary {
  padding: 12px 30px;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.formations-grid .btn-primary:hover {
  transform: scale(1.05);
}

.formations-cta .btn-secondary {
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.formations-cta .btn-secondary:hover {
  transform: scale(1.05);
}

/* Enhanced Se connecter button */
.btn.se-connecter,
.btn-login {
  padding: 8px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  min-width: 130px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.btn.se-connecter i,
.btn-login i {
  margin-right: 6px;
  font-size: 1rem;
}

.btn.se-connecter:hover,
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

/* Button width improvements */
.btn-login {
    min-width: 130px; /* Wider button */
    padding: 8px 20px; /* More horizontal padding */
    font-size: 0.95rem; /* Slightly larger font */
    letter-spacing: 0.5px; /* Better letter spacing */
}

/* Ensure the button looks good on all screens */
@media (max-width: 768px) {
    .btn-login, 
    .btn.se-connecter {
        min-width: 120px;
        padding: 8px 16px;
        height: auto;
        line-height: 1.5;
        margin: 8px 0;
    }
    
    /* Improved tap targets for all buttons on mobile */
    .btn, 
    button,
    .btn-primary,
    .btn-secondary,
    a.btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 25px;
        font-size: 1rem;
        touch-action: manipulation;
    }
    
    /* Specific fix for the "Voir toutes nos formations" button */
    .formations-cta .btn-secondary {
        padding: 14px 32px;
        min-height: 54px;
        min-width: 220px;
        margin: 15px auto;
        display: flex;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
}

/* Enlarge the tap area for the "Voir toutes nos formations" button */
.formations-more .btn-secondary {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    display: block;
    text-align: center;
    padding: 15px 25px;
    position: relative;
    box-sizing: border-box;
    touch-action: manipulation; /* Improve touch handling */
}

/* Enhance mobile tappability for all buttons */
@media (max-width: 768px) {
    .btn, 
    .btn-primary, 
    .btn-secondary,
    .formations-more .btn-secondary {
        position: relative;
        min-height: 44px; /* Minimum recommended touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0); /* Remove tap highlight */
        cursor: pointer;
    }
    
    /* Specific fix for the "Voir toutes nos formations" button tap area */
    .formations-more {
        text-align: center;
        padding: 10px;
        margin-top: 20px;
    }
    
    .formations-more .btn-secondary {
        display: inline-block;
        width: 100%;
        text-align: center;
        padding: 15px 30px; /* Larger padding for easier tapping */
    }
    
    /* Create a larger tap area with pseudo-element */
    .formations-more .btn-secondary:before {
        content: "";
        position: absolute;
        top: -15px;
        right: -15px;
        bottom: -15px;
        left: -15px;
        z-index: -1; /* Place behind the button */
    }
    
    /* Fix for S'inscrire buttons in formation cards */
    .formation-card .btn-primary {
        width: 100%;
        max-width: none;
        margin-top: 15px;
        padding: 12px 20px;
    }
}

/* Fix for the menu item */
.main-menu li:last-child {
    margin-left: 0; /* Remove margin to fix alignment */
}
