/**
 * Pro Client B2B - Styles Front-Office
 */

/* ============================================
   MASQUER L'INSCRIPTION NATIVE PRESTASHOP
   ============================================ */

/* Masquer le lien "Pas de compte ? Créez-en un" sur la page de connexion */
#login-form ~ div a[href*="controller=registration"],
#login-form ~ div a[href*="create_account"],
.login-form ~ div a[href*="controller=registration"],
.login-form ~ div a[href*="create_account"],
a[data-link-action="display-register-form"],
.no-account a,
#content .no-account,
.page-authentication .no-account {
    display: none !important;
}

/* ============================================
   PAGE D'INSCRIPTION PROFESSIONNELLE
   ============================================ */

/* Container principal */
.pro-registration-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Introduction - Header violet */
.pro-registration-intro {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: #ffffff;
    padding: 45px 35px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(90, 103, 216, 0.4);
}

.pro-registration-intro h2 {
    color: #ffffff !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    margin: 0 0 20px 0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pro-registration-intro .lead {
    font-size: 1.15rem;
    margin: 0;
    line-height: 1.9;
    font-weight: 500;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    opacity: 1 !important;
}

/* Formulaire */
.pro-registration-form {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Sections du formulaire */
.form-section {
    padding: 25px 30px;
    border: none;
    border-bottom: 1px solid #eee;
    margin: 0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section legend {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    border: none;
    padding: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section legend i.material-icons {
    color: #667eea;
    font-size: 24px;
}

/* Labels */
.col-form-label {
    font-weight: 500;
    color: #555;
}

.col-form-label.required::after {
    content: " *";
    color: #d9534f;
}

/* Inputs */
.pro-registration-form .form-control {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.pro-registration-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    outline: none;
}

.pro-registration-form select.form-control {
    height: auto;
    padding: 10px 15px;
}

.pro-registration-form textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Fichier upload */
.form-control-file {
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    cursor: pointer;
    transition: border-color 0.3s;
}

.form-control-file:hover {
    border-color: #667eea;
}

/* Bouton "Fournir le KBIS plus tard" */
.btn-skip-kbis {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 15px;
    color: #6c757d;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px dashed #adb5bd;
    border-radius: 20px;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-skip-kbis:hover {
    color: #667eea;
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    text-decoration: none;
}

.btn-skip-kbis i.material-icons {
    font-size: 18px;
}

/* Message quand KBIS ignoré */
.kbis-skipped-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border: 1px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    font-size: 0.9rem;
}

.kbis-skipped-notice i.material-icons {
    font-size: 20px;
    color: #d39e00;
}

/* Champ KBIS désactivé */
#kbis-upload-group.kbis-skipped .form-control-file {
    opacity: 0.5;
    pointer-events: none;
    border-color: #ddd;
    background: #e9ecef;
}

/* Footer du formulaire */
.form-footer {
    background: #f9f9f9;
    padding: 25px 30px;
    border-top: 1px solid #eee;
}

.form-footer .text-muted {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.form-footer .text-muted i.material-icons {
    font-size: 18px;
    color: #999;
}

/* Bouton submit */
.pro-registration-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.pro-registration-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.pro-registration-form .btn-primary i.material-icons {
    vertical-align: middle;
    margin-right: 8px;
}

/* ============================================
   MESSAGE DE SUCCÈS
   ============================================ */

.pro-registration-success {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(40, 167, 69, 0.2);
}

.pro-registration-success .success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 50px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.4);
}

.pro-registration-success h2 {
    color: #155724;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.pro-registration-success .success-message {
    font-size: 1.2rem;
    color: #155724;
    margin-bottom: 15px;
    line-height: 1.8;
}

.pro-registration-success .success-info {
    font-size: 1rem;
    color: #1e7e34;
    margin-bottom: 30px;
    font-style: italic;
}

.pro-registration-success .btn-primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
}

.pro-registration-success .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4);
}

/* ============================================
   MESSAGES D'ERREUR
   ============================================ */

.pro-registration-container .alert {
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 25px;
}

.pro-registration-container .alert h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.pro-registration-container .alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.pro-registration-container .alert-danger {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.pro-registration-container .alert ul {
    margin: 0;
    padding-left: 20px;
}

/* ============================================
   BLOC PRO SUR PAGE DE CONNEXION
   ============================================ */

.pro-registration-link {
    margin-top: 30px;
    margin-bottom: 20px;
}

.pro-registration-link .card {
    border: 2px solid #667eea;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.pro-registration-link .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
}

.pro-registration-link .card-body {
    padding: 25px;
}

.pro-registration-link .card-title {
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.pro-registration-link .card-text {
    color: #555;
    margin-bottom: 15px;
}

.pro-registration-link .btn-outline-primary {
    color: #667eea;
    border-color: #667eea;
    border-width: 2px;
    padding: 10px 25px;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s;
}

.pro-registration-link .btn-outline-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
    transform: scale(1.05);
}

.pro-registration-link .btn-outline-primary i {
    margin-right: 5px;
}

/* ============================================
   ICÔNES (fallback si Material Icons non dispo)
   ============================================ */

.form-section legend i.material-icons,
.pro-registration-link i.material-icons {
    font-family: 'Material Icons', sans-serif;
    font-size: 20px;
    vertical-align: middle;
}

/* Fallback avec emojis si Material Icons non chargé */
@supports not (font-family: 'Material Icons') {
    .form-section legend i.material-icons {
        font-style: normal;
    }
    .form-section legend i.material-icons::before {
        content: '📋';
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .pro-registration-container {
        padding: 10px;
    }

    .form-section {
        padding: 20px 15px;
    }

    .col-form-label {
        margin-bottom: 8px;
        font-size: 0.95rem;
    }

    .pro-registration-intro {
        padding: 25px 20px;
        border-radius: 10px;
    }

    .pro-registration-intro h2 {
        font-size: 1.3rem !important;
    }

    .pro-registration-intro .lead {
        font-size: 1rem;
    }

    .pro-registration-form .btn-primary {
        padding: 12px 25px;
        font-size: 1rem;
        width: 100%;
    }

    .pro-registration-link .card-body {
        padding: 20px 15px;
    }

    .pro-registration-link .btn-outline-primary {
        width: 100%;
        display: block;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pro-registration-container {
    animation: fadeInUp 0.5s ease-out;
}

.form-section {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
