/* CSS pour le plugin Conseil Solaire - UX Amélioré */

.conseil-solaire-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Section Hero */
.hero-section {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-section h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.3em;
    margin-bottom: 20px;
    opacity: 0.9;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Section Tarifs */
.pricing-section {
    margin-bottom: 50px;
}

.pricing-section h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 30px;
    color: #2c3e50;
}

.pricing-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.price-base, .price-calculator {
    padding: 20px;
}

.price-base h3, .price-calculator h3 {
    color: #e67e22;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

.price {
    font-size: 3em;
    font-weight: bold;
    color: #27ae60;
    text-align: center;
    margin-bottom: 20px;
}

.price-base ul {
    list-style: none;
    padding: 0;
}

.price-base ul li {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
    position: relative;
    padding-left: 25px;
}

.price-base ul li:before {
    content: "✓";
    color: #27ae60;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.calculator-form {
    text-align: center;
}

#client-address, #booking-address {
    width: 100%;
    padding: 12px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

#client-address:focus, #booking-address:focus {
    outline: none;
    border-color: #e67e22;
}

#calculate-btn, #calculate-booking-price {
    background: #e67e22;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

#calculate-btn:hover, #calculate-booking-price:hover {
    background: #d35400;
}

/* NOUVEAU : Styles pour le message de redirection des tarifs */
.tarif-redirect-message {
    margin-top: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 12px;
    border-left: 5px solid #27ae60;
    text-align: center;
    animation: slideInUp 0.5s ease-out;
}

.tarif-redirect-message h4 {
    color: #155724;
    margin: 0 0 15px 0;
    font-size: 1.3em;
}

.tarif-redirect-message p {
    color: #155724;
    margin: 0 0 20px 0;
    font-size: 1.1em;
}

.scroll-to-booking {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.scroll-to-booking:hover {
    background: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* NOUVEAU : Styles pour l'affichage unifié du résultat de prix */
.unified-price-result {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
    border: 2px solid #e67e22;
    animation: slideInUp 0.6s ease-out;
}

.price-result-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.price-result-header h4 {
    color: #27ae60;
    font-size: 1.5em;
    margin: 0 0 10px 0;
}

.calculation-source {
    color: #6c757d;
    font-style: italic;
    margin: 0;
    font-size: 0.95em;
}

.price-main-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.final-price-large {
    font-size: 3.5em;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.price-subtitle {
    color: #6c757d;
    font-size: 1.1em;
    margin: 0;
}

/* NOUVEAU : Section des détails extensibles */
.calculation-details-section {
    margin: 25px 0;
}

.toggle-details-btn {
    width: 100%;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    font-size: 1.1em;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-details-btn:hover {
    background: #e9ecef;
    border-color: #e67e22;
    color: #e67e22;
}

.toggle-icon {
    font-size: 0.9em;
    transition: transform 0.3s;
}

.calculation-details-content {
    margin-top: 15px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.details-grid {
    display: grid;
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #e9ecef;
    transition: all 0.3s;
}

.detail-item.highlight {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.detail-item.success {
    background: #d1e7dd;
    border-left-color: #27ae60;
}

.detail-label {
    font-weight: 600;
    color: #495057;
}

.detail-value {
    color: #2c3e50;
    font-weight: 500;
}

/* NOUVEAU : Section d'action principale */
.price-action-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

#start-booking-process {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    font-size: 1.3em;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3);
}

#start-booking-process:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.4);
}

.action-subtitle {
    color: #6c757d;
    font-size: 0.95em;
    margin: 15px 0 0 0;
    font-style: italic;
}

/* NOUVEAU : Effet de mise en évidence pour la section réservation */
#reservation.highlighted {
    position: relative;
    animation: highlightPulse 3s ease-out;
}

#reservation.highlighted::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #e67e22, #f39c12, #e67e22, #f39c12);
    background-size: 400% 400%;
    border-radius: 20px;
    z-index: -1;
    animation: gradientShift 2s ease-in-out infinite;
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(230, 126, 34, 0.2);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Messages d'erreur pour les tarifs */
.tarif-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.tarif-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.tarif-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Styles existants conservés */
#price-result, #booking-price-result {
    margin-top: 20px;
    padding: 20px;
    background: #ecf0f1;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.result-details {
    text-align: left;
    margin-top: 15px;
}

.result-details p {
    margin: 5px 0;
    color: #2c3e50;
}

.final-price {
    font-size: 1.5em;
    font-weight: bold;
    color: #27ae60;
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: white;
    border-radius: 5px;
}

/* Section Projets */
.projects-section {
    margin-bottom: 50px;
}

.projects-section h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 15px;
    color: #2c3e50;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2em;
    color: #7f8c8d;
    margin-bottom: 40px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.project-card h3 {
    color: #e67e22;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.project-card p {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.image-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.image-container:hover img {
    transform: scale(1.05);
}

.image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px;
    text-align: center;
    font-size: 0.9em;
}

.savings {
    text-align: center;
    padding: 15px;
    background: #d5f4e6;
    border-radius: 8px;
    color: #27ae60;
}

/* Section CTA */
.cta-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 50px 40px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 40px;
}

.cta-section h2 {
    font-size: 2em;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #e67e22;
    color: white;
}

.btn-primary:hover {
    background: #d35400;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #2c3e50;
}

/* Styles pour le système de réservation */
.reservation-section, .conseil-solaire-booking-widget {
    margin-bottom: 50px;
}

.reservation-section h2, .conseil-solaire-booking-widget h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 15px;
    color: #2c3e50;
}

.booking-widget {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.booking-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    position: relative;
}

.booking-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
    width: calc(100% - 100px);
    transform: translateX(-50%);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    margin: 0 20px;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.step.active .step-number {
    background: #e67e22;
    color: white;
}

.step.completed .step-number {
    background: #27ae60;
    color: white;
}

.step-text {
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

.step.active .step-text {
    color: #e67e22;
    font-weight: 600;
}

.booking-step {
    min-height: 300px;
}

.booking-step h3 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
}

/* Calendrier */
.calendar-container {
    max-width: 600px;
    margin: 0 auto;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav button {
    background: #e67e22;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
}

.calendar-nav button:hover {
    background: #d35400;
}

#current-month {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
}

#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.calendar-day {
    background: white;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.has-slots {
    background: #e8f5e8;
    color: #27ae60;
    font-weight: 600;
}

.calendar-day.has-slots:hover {
    background: #d4edda;
}

.calendar-day.selected {
    background: #e67e22;
    color: white;
}

.calendar-day.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.calendar-day.other-month {
    color: #bbb;
}

.calendar-header {
    font-weight: 600;
    background: #f8f9fa;
    color: #495057;
}

#time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.time-slot {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.time-slot:hover {
    border-color: #e67e22;
    background: #fff3e0;
}

.time-slot.selected {
    background: #e67e22;
    color: white;
    border-color: #e67e22;
}

/* Formulaire de réservation */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e67e22;
}

.booking-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #e67e22;
}

.booking-summary h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
}

.summary-line.total {
    border-top: 2px solid #e9ecef;
    margin-top: 15px;
    padding-top: 15px;
    font-weight: 600;
    font-size: 1.1em;
    color: #27ae60;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.2em;
    width: 100%;
    margin-top: 20px;
}

/* Loading et erreurs */
.loading, .loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e67e22;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

/* Messages d'état */
.booking-message {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.booking-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.booking-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.booking-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Navigation fluide */
.scroll-to {
    transition: all 0.3s ease;
}

/* Loading states */
.booking-step.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .conseil-solaire-container {
        padding: 15px;
    }
    
    .hero-section {
        padding: 40px 20px;
    }
    
    .hero-section h1 {
        font-size: 2em;
    }
    
    .pricing-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 250px;
    }
    
    .booking-widget {
        padding: 20px;
    }
    
    .booking-steps {
        flex-direction: column;
        gap: 10px;
    }
    
    .booking-steps::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        justify-content: flex-start;
        margin: 0;
    }
    
    .step-number {
        margin-right: 15px;
        margin-bottom: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    #calendar-grid {
        font-size: 0.9em;
    }
    
    .calendar-day {
        min-height: 35px;
        padding: 8px;
    }
    
    #time-slots {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .time-slot {
        padding: 10px;
        font-size: 0.9em;
    }
    
    /* NOUVEAU : Responsive pour les nouveaux éléments */
    .final-price-large {
        font-size: 2.5em;
    }
    
    .details-grid {
        gap: 10px;
    }
    
    .detail-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .unified-price-result {
        padding: 20px;
    }
    
    .price-main-display {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .project-images {
        grid-template-columns: 1fr;
    }
    
    .image-container {
        aspect-ratio: 16/9;
    }
    
    .final-price-large {
        font-size: 2em;
    }
}

/* Styles pour l'administration WordPress */
.wrap .form-table th {
    width: 200px;
}

.wrap .button-small {
    padding: 2px 8px;
    font-size: 11px;
    line-height: 1.4;
    margin-right: 5px;
}

.wrap .notice {
    margin: 15px 0;
}

.wrap table img {
    max-width: 50px;
    height: auto;
    border-radius: 4px;
}

.wrap .form-table td p {
    margin: 5px 0;
    font-style: italic;
    color: #666;
}

.wp-list-table .column-actions {
    width: 150px;
}

.admin-project-preview {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.admin-project-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Styles spécifiques pour les statistiques de réservation */
.bookings-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.stat-box {
    background: #f1f1f1;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    min-width: 100px;
}

.stat-box h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.stat-box .count {
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
}

.payment-en_attente { color: #f56e00; }
.payment-complete { color: #46b450; }
.payment-echec { color: #dc3232; }
.payment-rembourse { color: #6c757d; }

/* Animation d'apparition progressive des éléments */
.hero-section, .pricing-section, .projects-section, .cta-section, .reservation-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.project-card {
    transition: all 0.3s ease;
}

.project-card.animate-in {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lightbox pour les images */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    cursor: default;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    font-weight: bold;
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    color: white;
    text-align: center;
    font-size: 16px;
}