/* --- Boutons --- */
.btn,
a.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-sm);
    height: var(--btn-height-lg);
    padding: 0 var(--padding-lg);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn:focus-visible,
a.btn:focus-visible,
button.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-nav,
.btn.btn-nav {
    height: var(--btn-height-lg);
    padding: 0 var(--padding-sm);
}

.btn-sm,
.btn.btn-sm {
    height: var(--btn-height-sm);
    padding: 0 var(--padding-sm);
    font-size: 0.875rem;
}

.btn-primary,
.btn.btn-primary {
    color: #fbfbf9;
    color: var(--neutral-on-dark);
    background-color: #909d71;
    background-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.btn.btn-primary:hover {
    background-color: #7a8a5f;
    background-color: var(--primary-color-hover);
    box-shadow: var(--shadow-md);
}

.btn-primary:active,
.btn.btn-primary:active { box-shadow: var(--shadow-sm); }

.btn-outline,
.btn.btn-outline {
    color: #4a4d42;
    color: var(--secondary-color);
    background-color: #fbfcf9;
    background-color: var(--bg-white);
    box-shadow: inset 0 0 0 2px #909d71;
    box-shadow: inset 0 0 0 2px var(--primary-color);
}

.btn-outline:hover,
.btn.btn-outline:hover {
    background-color: #fbfcf9;
    background-color: var(--bg-white);
    color: #909d71;
    color: var(--primary-color);
    box-shadow: inset 0 0 0 2px #909d71;
    box-shadow: inset 0 0 0 2px var(--primary-color);
}

.btn-outline:active,
.btn.btn-outline:active { background-color: var(--bg-white); }

/* Transparent, bordure et texte primary (style léger) */
.btn-outline-primary,
.btn.btn-outline-primary {
    color: var(--primary-color);
    background-color: var(--bg-white);
    border: 1px solid var(--primary-color);
    box-shadow: none;
}

.btn-outline-primary:hover,
.btn.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--neutral-on-dark);
}

.btn-outline-primary:active,
.btn.btn-outline-primary:active {
    background-color: var(--primary-color-hover);
    color: var(--neutral-on-dark);
}

.btn-danger,
.btn.btn-danger {
    background: var(--color-danger);
    color: #fff;
    border: none;
}

.btn-danger:hover,
.btn.btn-danger:hover { background: var(--color-danger-hover); }

.btn-danger:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-block,
.btn.btn-block { width: 100%; }

/* --- Formulaires --- */
.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea,
.contact-form input,
.contact-form select,
.contact-form textarea,
.controls input,
.controls select,
.controls textarea,
.admin-forgot-input,
.admin-form input,
.admin-form select,
.admin-promo-input,
.profile-drawer-body .drawer-forgot-input {
    width: 100%;
    padding: 16px 16px;
    padding: var(--input-padding);
    font-family: var(--font-body);
    font-size: 1rem;
    color: #4a4d42;
    color: var(--secondary-color);
    background-color: #f3f4f1;
    background-color: var(--bg-light);
    border: 1px solid #d8dbd2;
    border: var(--input-border);
    border-radius: 22px;
    border-radius: var(--input-border-radius);
    transition: var(--transition);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus,
.controls input:focus,
.controls select:focus,
.controls textarea:focus,
.admin-forgot-input:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-promo-input:focus,
.profile-drawer-body .drawer-forgot-input:focus {
    outline: none;
    border-color: #909d71;
    border-color: var(--primary-color);
    background-color: #fbfcf9;
    background-color: var(--bg-white);
    box-shadow: 0 0 0 2px rgba(144, 157, 113, 0.2);
    box-shadow: var(--input-focus-ring);
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.contact-form input::placeholder,
.contact-form textarea::placeholder,
.controls input::placeholder,
.controls textarea::placeholder {
    color: #9c9f98;
    color: var(--neutral-gray-400);
}

.form-group select,
.contact-form select,
.controls select,
.admin-form select {
    cursor: pointer;
    appearance: none;
    padding-right: 2.5rem;
    background-image: var(--select-arrow);
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.form-group textarea,
.contact-form textarea,
.controls textarea {
    resize: vertical;
    min-height: 100px;
}

/* Champ mot de passe avec bouton afficher / masquer */
.password-field-wrap {
    position: relative;
    width: 100%;
}

.password-field-wrap input {
    padding-right: 3rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--neutral-gray-500, #6b6e66);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.password-toggle-btn:hover {
    color: var(--primary-color, #909d71);
    background: rgba(144, 157, 113, 0.12);
}

.password-toggle-btn:focus-visible {
    outline: 2px solid var(--primary-color, #909d71);
    outline-offset: 2px;
}

.password-toggle-icon {
    display: block;
    pointer-events: none;
}

.contact-form textarea { min-height: 120px; }

.contact-form .form-group { margin-bottom: 1.25rem; }

.contact-form .form-group:last-of-type { margin-bottom: 1.5rem; }

.admin-form .form-group { margin-bottom: 1rem; }

.admin-forgot-input { margin-bottom: 1rem; }

.admin-pension-edit-fields .form-group,
.profile-drawer-body .drawer-form .form-group,
.profile-drawer-body .drawer-forgot-block .drawer-forgot-label,
.profile-drawer-body .drawer-register-block .form-group {
    margin-bottom: 1rem;
}

.profile-drawer-body .drawer-forgot-input { margin-bottom: 1rem; }

.profile-drawer-body .drawer-form .form-group input {
    border-radius: var(--border-radius);
    padding: 0 var(--padding-sm);
    height: 48px;
    line-height: 48px;
}

.controls input,
.controls select,
.controls textarea { max-width: 500px; }

.gift-quantity-field input { max-width: 80px; }

.controls select {
    padding: var(--padding-sm) var(--padding-lg) var(--padding-sm) var(--padding-sm);
}

.admin-promo-input[type="datetime-local"] { max-width: 280px; }

/* --- Cartes --- */
.card,
.auth-card,
.profile-header,
.profile-block,
.admin-denied,
.admin-tab-placeholder,
.admin-panel-card,
.contact-info,
.contact-form {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
}

.auth-card {
    padding: var(--padding-lg);
    width: 100%;
    max-width: 30rem;
    box-shadow: var(--shadow-auth-card);
}

.contact-info,
.contact-form {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

/* --- Messages / Alertes --- */
.msg,
.error-msg,
.success-msg,
.profile-message,
.admin-login-message,
.profile-drawer-body .drawer-auth-message,
.payment-success-msg {
    padding: var(--padding-sm) var(--padding-sm);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.profile-message {
    padding: var(--padding-sm) var(--padding-sm);
    border-radius: var(--border-radius);
    margin-bottom: var(--padding-sm);
    font-weight: 500;
}

.msg-error,
.error-msg,
.admin-login-message.error-msg,
.profile-drawer-body .drawer-auth-message.error-msg,
.payment-success-msg.error-msg {
    color: var(--color-error);
    background: var(--color-error-bg);
}

.msg-success,
.success-msg,
.admin-login-message.success-msg,
.profile-drawer-body .drawer-auth-message.success-msg {
    color: var(--color-success);
    background: var(--color-success-bg);
}

.msg-info,
.profile-message-success,
.profile-message-info {
    color: var(--color-info);
    background: var(--color-info-bg);
}
