/**
 * Styles CSS pour le plugin WP Sport
 *
 * @package    WP_Sport
 * @subpackage WP_Sport/public/css
 * @since      1.0.0
 */

/* Formulaires d'inscription - Compatible Divi */
.joolwebsp-register-form {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Compatibilité Divi - S'assurer que les styles ne sont pas surchargés */
.et-db #et-boc .joolwebsp-register-form,
.et-db #et-boc .joolwebsp-form-row,
.et-db #et-boc .joolwebsp-submit-button {
    box-sizing: border-box;
}

.joolwebsp-register-form h2 {
    margin-top: 0;
    color: #333;
    text-align: center;
}

.joolwebsp-form-row {
    margin-bottom: 15px;
}

.joolwebsp-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.joolwebsp-form-row .required {
    color: #d63638;
}

.joolwebsp-form-row input[type="text"],
.joolwebsp-form-row input[type="email"],
.joolwebsp-form-row input[type="password"],
.joolwebsp-form-row input[type="tel"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}

.joolwebsp-form-row input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.joolwebsp-form-row small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

.joolwebsp-submit-button {
    background: #0073aa;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: background 0.3s;
}

.joolwebsp-submit-button:hover {
    background: #005a87;
}

.joolwebsp-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.joolwebsp-form-message {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 3px;
    font-size: 14px;
}

.joolwebsp-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.joolwebsp-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.joolwebsp-form-footer {
    margin-top: 15px;
    text-align: center;
    font-size: 0.9em;
    color: #666;
}

.joolwebsp-form-footer a {
    color: #0073aa;
    text-decoration: none;
}

.joolwebsp-form-footer a:hover {
    text-decoration: underline;
}

/* Styles pour le formulaire de connexion */
.joolwebsp-login-form {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Bloc branding (logo + titre) white label */
.joolwebsp-login-branding {
    text-align: center;
    margin-bottom: 20px;
}
.joolwebsp-login-branding .joolwebsp-login-logo {
    max-width: 200px;
    max-height: 80px;
    height: auto;
    display: block;
    margin: 0 auto 12px;
}
.joolwebsp-login-branding .joolwebsp-login-title,
.joolwebsp-login-form h2 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.joolwebsp-login-form #joolwebsp-loginform {
    margin-bottom: 20px;
}

.joolwebsp-login-form #joolwebsp-loginform p {
    margin-bottom: 15px;
}

.joolwebsp-login-form #joolwebsp-loginform label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.joolwebsp-login-form #joolwebsp-loginform input[type="text"],
.joolwebsp-login-form #joolwebsp-loginform input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.joolwebsp-login-form #joolwebsp-loginform input[type="checkbox"] {
    margin-right: 5px;
}

.joolwebsp-login-form #joolwebsp-loginform .login-submit {
    margin-top: 20px;
}

.joolwebsp-login-form #joolwebsp-loginform .button-primary {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
}

/* Page de connexion : couleur primaire (white label) quand body a .joolwebsp-page */
body.joolwebsp-page .joolwebsp-login-form #joolwebsp-loginform .button-primary {
    background-color: var(--joolwebsp-primary, #2271b1);
    border-color: var(--joolwebsp-primary, #2271b1);
}
body.joolwebsp-page .joolwebsp-login-form #joolwebsp-loginform .button-primary:hover {
    background-color: var(--joolwebsp-primary-dark, #135e96);
    border-color: var(--joolwebsp-primary-dark, #135e96);
}
body.joolwebsp-page .joolwebsp-login-form .joolwebsp-login-links a {
    color: var(--joolwebsp-primary, #2271b1);
}

.joolwebsp-login-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.joolwebsp-login-links p {
    margin: 10px 0;
}

/* Page de confirmation d'inscription */
.joolwebsp-registration-confirmation {
    max-width: 520px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.joolwebsp-registration-confirmation h2 {
    margin-top: 0;
}

.joolwebsp-registration-confirmation .joolwebsp-confirmation-message {
    margin-bottom: 24px;
    text-align: left;
}

.joolwebsp-registration-confirmation .joolwebsp-confirmation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Page de paiement (shortcode free) */
.joolwebsp-payment-session-summary {
    max-width: 480px;
    margin: 24px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.joolwebsp-payment-session-summary h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

.joolwebsp-payment-session-details {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.joolwebsp-payment-session-details li {
    margin-bottom: 8px;
}

.joolwebsp-payment-page-actions {
    max-width: 480px;
    margin: 24px auto;
    text-align: center;
}

.joolwebsp-login-links a {
    color: #2271b1;
    text-decoration: none;
}

.joolwebsp-login-links a:hover {
    text-decoration: underline;
}

/* Désactiver la sidebar pour les pages WP Sport */
body.joolwebsp-no-sidebar #sidebar,
body.joolwebsp-no-sidebar .sidebar,
body.et_no_sidebar #sidebar,
body.et_no_sidebar .sidebar {
    display: none !important;
}

/* Pour Divi : s'assurer que le contenu prend toute la largeur */
body.joolwebsp-no-sidebar #main-content,
body.et_no_sidebar #main-content {
    width: 100% !important;
    max-width: 100% !important;
}

/* Pour les thèmes standards : ajuster le layout */
body.joolwebsp-no-sidebar .content-area,
body.et_no_sidebar .content-area {
    width: 100% !important;
    float: none !important;
}

