/* ============================================
   COTATION MRH - STYLES PERSONNALISÉS
   Modernisation de l'interface cotation MRH
   ============================================ */

/* Variables couleurs site */
:root {
    --sherpa-primary: #831717;
    --sherpa-secondary: #574142;
    --sherpa-accent: #c60000;
    --sherpa-bg-light: #f5f5f9;
    --sherpa-text-dark: #051922;
    --sherpa-white: #ffffff;
    --sherpa-border: #e0e0e0;
    --sherpa-success: #28a745;
    --sherpa-shadow: rgba(131, 23, 23, 0.1);
    --transition-smooth: all 0.3s ease;
}

/* ============================================
   1. WIZARD - INDICATEUR DE PROGRESSION
   ============================================ */

.wizard-progress-container {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--sherpa-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.wizard-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 10px;
}

.wizard-progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--sherpa-border);
    z-index: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.wizard-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sherpa-white);
    border: 3px solid var(--sherpa-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #999;
    margin-bottom: 8px;
    transition: var(--transition-smooth);
}

.wizard-step.active .wizard-step-circle {
    background: var(--sherpa-primary);
    border-color: var(--sherpa-primary);
    color: var(--sherpa-white);
    transform: scale(1.1);
}

.wizard-step.completed .wizard-step-circle {
    background: var(--sherpa-success);
    border-color: var(--sherpa-success);
    color: var(--sherpa-white);
}

.wizard-step-circle i {
    font-size: 18px;
}

.wizard-step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
    font-weight: 500;
}

.wizard-step.active .wizard-step-label {
    color: var(--sherpa-primary);
    font-weight: 600;
}

/* ============================================
   2. OFFRES COMPAGNIES - CARDS MODERNES
   ============================================ */

.offres-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.offre-card {
    background: var(--sherpa-white);
    border: 2px solid var(--sherpa-border);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.offre-card:hover {
    border-color: var(--sherpa-primary);
    box-shadow: 0 8px 24px var(--sherpa-shadow);
    transform: translateY(-4px);
}

.offre-card.selected {
    border-color: var(--sherpa-primary);
    border-width: 3px;
    box-shadow: 0 8px 24px var(--sherpa-shadow);
}

.offre-card.selected::before {
    content: '✓';
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--sherpa-success);
    color: var(--sherpa-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.offre-badge {
    position: absolute;
    top: 0;
    left: 24px;
    background: var(--sherpa-accent);
    color: var(--sherpa-white);
    padding: 6px 16px;
    border-radius: 0 0 12px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offre-logo-container {
    text-align: center;
    margin-bottom: 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offre-logo-container img {
    max-height: 50px;
    max-width: 100%;
    object-fit: contain;
}

.offre-prix-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: var(--sherpa-bg-light);
    border-radius: 12px;
}

.offre-prix-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.offre-prix-montant {
    font-size: 32px;
    font-weight: 700;
    color: var(--sherpa-primary);
    line-height: 1;
}

.offre-prix-devise {
    font-size: 14px;
    color: #666;
    margin-left: 4px;
}

.offre-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.offre-detail-item {
    display: flex;
    flex-direction: column;
}

.offre-detail-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.offre-detail-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--sherpa-text-dark);
}

.offre-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.offre-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.offre-btn-primary {
    background: var(--sherpa-primary);
    color: var(--sherpa-white);
}

.offre-btn-primary:hover {
    background: var(--sherpa-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--sherpa-shadow);
}

.offre-btn-secondary {
    background: transparent;
    color: var(--sherpa-primary);
    border: 2px solid var(--sherpa-primary);
}

.offre-btn-secondary:hover {
    background: var(--sherpa-bg-light);
}

/* ============================================
   3. GARANTIES OPTIONNELLES - TOGGLE CARDS
   ============================================ */

.garanties-optionnelles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.garantie-option-card {
    background: var(--sherpa-white);
    border: 2px solid var(--sherpa-border);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition-smooth);
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.garantie-option-card:hover {
    border-color: var(--sherpa-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.garantie-option-card.active {
    border-color: var(--sherpa-primary);
    background: rgba(131, 23, 23, 0.02);
}

.garantie-option-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--sherpa-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--sherpa-primary);
    flex-shrink: 0;
}

.garantie-option-card.active .garantie-option-icon {
    background: var(--sherpa-primary);
    color: var(--sherpa-white);
}

.garantie-option-content {
    flex: 1;
}

.garantie-option-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--sherpa-text-dark);
    margin-bottom: 6px;
}

.garantie-option-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
}

.garantie-option-prix {
    font-size: 14px;
    font-weight: 700;
    color: var(--sherpa-primary);
}

.garantie-option-toggle {
    width: 48px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    position: relative;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.garantie-option-card.active .garantie-option-toggle {
    background: var(--sherpa-success);
}

.garantie-option-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--sherpa-white);
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.garantie-option-card.active .garantie-option-toggle::after {
    transform: translateX(22px);
}

/* ============================================
   4. ONGLET HABITATION - GROUPES VISUELS
   ============================================ */

.habitation-section {
    margin-bottom: 32px;
}

.habitation-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--sherpa-border);
}

.habitation-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--sherpa-primary);
    color: var(--sherpa-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.habitation-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--sherpa-text-dark);
    margin: 0;
}

.habitation-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.habitation-field-group {
    display: flex;
    flex-direction: column;
}

.habitation-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--sherpa-text-dark);
    margin-bottom: 8px;
}

.habitation-field-label.required::after {
    content: '*';
    color: var(--sherpa-accent);
    margin-left: 4px;
}

/* Type de bien - Cards visuels */
.type-bien-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.type-bien-card {
    background: var(--sherpa-white);
    border: 2px solid var(--sherpa-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.type-bien-card:hover {
    border-color: var(--sherpa-primary);
    transform: translateY(-2px);
}

.type-bien-card.selected {
    border-color: var(--sherpa-primary);
    background: rgba(131, 23, 23, 0.05);
}

.type-bien-card i {
    font-size: 32px;
    color: var(--sherpa-primary);
    margin-bottom: 8px;
}

.type-bien-card-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--sherpa-text-dark);
}

/* Checkboxes équipements */
.equipements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.equipement-item {
    background: var(--sherpa-white);
    border: 2px solid var(--sherpa-border);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.equipement-item:hover {
    border-color: var(--sherpa-primary);
}

.equipement-item.checked {
    border-color: var(--sherpa-primary);
    background: rgba(131, 23, 23, 0.05);
}

.equipement-item i {
    color: var(--sherpa-primary);
    font-size: 18px;
}

.equipement-label {
    font-size: 14px;
    color: var(--sherpa-text-dark);
    flex: 1;
}

/* ============================================
   5. MODERN CARDS (Remplacement des fieldsets)
   ============================================ */

.modern-card {
    background: var(--sherpa-white);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 32px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.modern-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.modern-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 32px;
    background: linear-gradient(135deg, var(--sherpa-primary) 0%, var(--sherpa-accent) 100%);
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

.modern-card-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--sherpa-white);
    flex-shrink: 0;
}

.modern-card-title {
    color: var(--sherpa-white);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-card-body {
    padding: 32px;
}

/* Animation au chargement */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-card {
    animation: cardSlideIn 0.4s ease-out;
}

/* Variantes de couleur pour les en-têtes */
.modern-card.card-secondary .modern-card-header {
    background: linear-gradient(135deg, var(--sherpa-secondary) 0%, #6d5153 100%);
}

.modern-card.card-success .modern-card-header {
    background: linear-gradient(135deg, var(--sherpa-success) 0%, #20c997 100%);
}

/* ============================================
   6. AMÉLIORATIONS GÉNÉRALES
   ============================================ */

/* Fieldsets améliorés (si encore utilisés ailleurs) */
.ui-fieldset {
    border: none !important;
    background: var(--sherpa-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

.ui-fieldset-legend {
    background: var(--sherpa-primary) !important;
    color: var(--sherpa-white) !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

/* Boutons améliorés */
.ui-button-secondary {
    background: var(--sherpa-primary) !important;
    border-color: var(--sherpa-primary) !important;
    padding: 14px 32px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: var(--transition-smooth) !important;
}

.ui-button-secondary:hover {
    background: var(--sherpa-accent) !important;
    border-color: var(--sherpa-accent) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--sherpa-shadow) !important;
}

/* Inputs améliorés */
.ui-inputfield {
    border: 2px solid var(--sherpa-border) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    transition: var(--transition-smooth) !important;
}

.ui-inputfield:focus {
    border-color: var(--sherpa-primary) !important;
    box-shadow: 0 0 0 3px var(--sherpa-shadow) !important;
    outline: none !important;
}

/* ============================================
   WIZARD PRIMEFACES - NAVBAR MODERNE
   ============================================ */

/* Container principal du wizard */
.ui-wizard {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Navbar du wizard - Container des onglets */
.ui-wizard .ui-wizard-navbar {
    background: var(--sherpa-white) !important;
    border: none !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    overflow: hidden !important;
}

/* Container des titres/onglets */
.ui-wizard .ui-wizard-step-titles {
    display: flex !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background: var(--sherpa-bg-light) !important;
}

/* Chaque onglet */
.ui-wizard .ui-wizard-step-title {
    flex: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    position: relative !important;
    transition: var(--transition-smooth) !important;
}

/* Lien dans l'onglet */
.ui-wizard .ui-wizard-step-title a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 18px 24px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #666 !important;
    background: var(--sherpa-bg-light) !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    transition: var(--transition-smooth) !important;
    height: 100% !important;
}

/* Hover sur onglet */
.ui-wizard .ui-wizard-step-title a:hover {
    background: rgba(131, 23, 23, 0.05) !important;
    color: var(--sherpa-primary) !important;
}

/* Onglet actif */
.ui-wizard .ui-wizard-step-title.ui-state-highlight a,
.ui-wizard .ui-wizard-step-title.ui-state-active a {
    background: var(--sherpa-white) !important;
    color: var(--sherpa-primary) !important;
    border-bottom-color: var(--sherpa-primary) !important;
    font-weight: 700 !important;
}

/* Onglet complété */
.ui-wizard .ui-wizard-step-title.ui-state-complete a {
    background: rgba(40, 167, 69, 0.08) !important;
    color: var(--sherpa-success) !important;
    border-bottom-color: var(--sherpa-success) !important;
}

/* Icône checkmark pour étapes complétées */
.ui-wizard .ui-wizard-step-title.ui-state-complete a::before {
    content: '\f00c' !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    margin-right: 8px !important;
    font-size: 12px !important;
}

/* Onglet désactivé */
.ui-wizard .ui-wizard-step-title.ui-state-disabled a {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Container du contenu */
.ui-wizard .ui-wizard-content {
    background: var(--sherpa-white) !important;
    border: none !important;
    border-radius: 0 0 12px 12px !important;
    padding: 32px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    margin-top: 0 !important;
    min-height: 400px !important;
}

/* Wizard navigation buttons améliorée */
.ui-wizard-nav-back,
.ui-wizard-nav-next {
    padding: 12px 28px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: var(--transition-smooth) !important;
    border: 2px solid var(--sherpa-primary) !important;
}

.ui-wizard-nav-next {
    background: var(--sherpa-primary) !important;
    color: var(--sherpa-white) !important;
}

.ui-wizard-nav-next:hover {
    background: var(--sherpa-accent) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px var(--sherpa-shadow) !important;
}

.ui-wizard-nav-back {
    background: transparent !important;
    color: var(--sherpa-primary) !important;
}

.ui-wizard-nav-back:hover {
    background: var(--sherpa-bg-light) !important;
}

/* Messages d'aide */
.help-text {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #e8f4f8;
    border-left: 4px solid #0288d1;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 14px;
    color: #01579b;
}

.help-text i {
    font-size: 18px;
}

/* Résumé latéral */
.summary-sidebar {
    position: sticky;
    top: 20px;
    background: var(--sherpa-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.summary-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--sherpa-text-dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--sherpa-border);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.summary-item-label {
    color: #666;
}

.summary-item-value {
    font-weight: 600;
    color: var(--sherpa-text-dark);
}

/* ============================================
   7. RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .wizard-progress-bar {
        flex-wrap: wrap;
    }
    
    .wizard-step {
        margin-bottom: 16px;
    }
    
    .offres-container {
        grid-template-columns: 1fr;
    }
    
    .garanties-optionnelles-container {
        grid-template-columns: 1fr;
    }
    
    .habitation-fields-grid {
        grid-template-columns: 1fr;
    }
    
    .type-bien-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .offre-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.offre-card,
.garantie-option-card {
    animation: slideIn 0.3s ease-out;
}
/* ============================================
   ANIMATIONS WIZARD
   ============================================ */

/* Animation du contenu lors du changement d'étape */
.ui-wizard-content {
    animation: fadeSlideIn 0.4s ease-out !important;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation des onglets au hover */
.ui-wizard .ui-wizard-step-title a {
    position: relative;
    overflow: hidden;
}

.ui-wizard .ui-wizard-step-title a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--sherpa-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.ui-wizard .ui-wizard-step-title a:hover::after {
    width: 80%;
}

/* Numérotation automatique des étapes */
.ui-wizard .ui-wizard-step-title {
    counter-increment: wizard-step;
}

.ui-wizard .ui-wizard-step-title a::before {
    content: counter(wizard-step) ". ";
    font-weight: 700;
    margin-right: 4px;
}

.ui-wizard .ui-wizard-step-titles {
    counter-reset: wizard-step;
}

/* Override pour étapes complétées (checkmark au lieu de numéro) */
.ui-wizard .ui-wizard-step-title.ui-state-complete a::before {
    content: '\f00c' !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    margin-right: 8px !important;
    font-size: 12px !important;
}

/* Responsive Wizard Navbar pour mobile */
@media (max-width: 768px) {
    .ui-wizard .ui-wizard-step-titles {
        flex-direction: column !important;
    }
    
    .ui-wizard .ui-wizard-step-title a {
        padding: 14px 16px !important;
        font-size: 13px !important;
        justify-content: flex-start !important;
    }
    
    .ui-wizard .ui-wizard-content {
        padding: 20px 16px !important;
    }
    
    .wizard-progress-container {
        display: none !important; /* Cacher l'indicateur personnalisé sur mobile */
    }
}

/* Loading indicator pour changement d'étape */
.ui-wizard-content.ui-helper-loading {
    position: relative;
    opacity: 0.6;
}

.ui-wizard-content.ui-helper-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--sherpa-bg-light);
    border-top-color: var(--sherpa-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}