/* 
 * Power Boulevard Tech - Calculateur Solaire
 * Stylesheet Elementor-Compatible
 * Version avec namespace pour éviter les conflits
 */

/* Réinitialisation locale pour le conteneur du calculateur */
.psc-wrapper {
    all: revert;
}

.psc-wrapper * {
    all: revert;
}

.psc-wrapper {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.psc-wrapper *,
.psc-wrapper *::before,
.psc-wrapper *::after {
    box-sizing: border-box;
}

.psc-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.psc-header {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.psc-header h2 {
    font-size: 2.2em;
    margin-bottom: 10px;
    color: white;
    font-weight: bold;
    line-height: 1.2;
}

.psc-header p {
    font-size: 1.1em;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
}

.psc-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 40px;
}

@media (max-width: 768px) {
    .psc-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
}

.psc-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #1a472a;
    margin-bottom: 20px;
}

.psc-section h3 {
    color: #1a472a;
    margin-bottom: 20px;
    font-size: 1.4em;
    margin-top: 0;
    font-weight: 600;
    line-height: 1.3;
}

.psc-form-group {
    margin-bottom: 20px;
}

.psc-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
    line-height: 1.4;
}

.psc-label-help {
    font-size: 0.85em;
    color: #666;
    font-weight: normal;
    display: block;
    margin-top: 4px;
    line-height: 1.4;
}

.psc-container input[type="number"],
.psc-container input[type="text"],
.psc-container select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
    background: white;
    color: #333;
    font-family: inherit;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.psc-container input[type="number"]:focus,
.psc-container input[type="text"]:focus,
.psc-container select:focus {
    outline: none;
    border-color: #1a472a;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.1);
}

.psc-equipment-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 10px;
}

.psc-equipment-item label {
    margin: 0;
    flex: 1;
    font-weight: 500;
    min-width: 150px;
}

.psc-equipment-item input[type="number"] {
    width: 80px;
    margin: 0;
    padding: 8px;
}

.psc-equipment-item .psc-unit {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    min-width: 40px;
    white-space: nowrap;
}

.psc-btn-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.psc-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-family: inherit;
    line-height: 1.5;
}

.psc-btn-calculate {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    color: white;
}

.psc-btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 71, 42, 0.3);
    color: white;
}

.psc-btn-reset {
    background: #e0e0e0;
    color: #333;
}

.psc-btn-reset:hover {
    background: #d0d0d0;
}

.psc-btn-download {
    background: #4CAF50;
    color: white;
    margin-top: 10px;
    width: 100%;
    display: block;
}

.psc-btn-download:hover {
    background: #45a049;
    color: white;
}

.psc-results {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.psc-results h3 {
    color: #1a472a;
    margin-bottom: 20px;
    margin-top: 0;
    font-size: 1.3em;
    font-weight: 600;
}

.psc-result-item {
    background: #f0f8f4;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 3px solid #4CAF50;
}

.psc-result-label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
    line-height: 1.4;
}

.psc-result-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #1a472a;
    line-height: 1.2;
}

.psc-result-unit {
    font-size: 0.9em;
    color: #666;
    margin-left: 5px;
}

.psc-result-detail {
    font-size: 0.85em;
    color: #999;
    margin-top: 5px;
    line-height: 1.4;
}

.psc-warning {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    color: #856404;
    line-height: 1.5;
}

.psc-success {
    background: #d4edda;
    border-left: 3px solid #28a745;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    color: #155724;
    line-height: 1.5;
}

.psc-info-box {
    background: #e7f3ff;
    border-left: 3px solid #2196F3;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    color: #004085;
    font-size: 0.95em;
    line-height: 1.5;
}

.psc-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

.psc-tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 1em;
    line-height: 1.5;
}

.psc-tab-btn.active {
    color: #1a472a;
    border-bottom-color: #1a472a;
}

.psc-tab-content {
    display: none;
}

.psc-tab-content.active {
    display: block;
}

.psc-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.psc-summary-table th,
.psc-summary-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    line-height: 1.5;
}

.psc-summary-table th {
    background: #f0f0f0;
    font-weight: 600;
    color: #1a472a;
}

.psc-summary-table tr:hover {
    background: #f9f9f9;
}

.psc-hidden {
    display: none !important;
}

.psc-equipment-category {
    margin-bottom: 25px;
}

.psc-category-title {
    background: #e8f5e9;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #1a472a;
    border-left: 3px solid #4CAF50;
    line-height: 1.4;
}

/* Corrections spécifiques pour Elementor */
.elementor .psc-container input[type="number"],
.elementor .psc-container input[type="text"],
.elementor .psc-container select {
    box-shadow: none !important;
    height: auto !important;
    line-height: 1.5 !important;
}

.elementor .psc-btn {
    height: auto !important;
    line-height: 1.5 !important;
}

/* Éviter les conflits avec Elementor */
.psc-container .psc-section,
.psc-container .psc-results {
    position: relative;
    z-index: 1;
}

/* Responsive pour petits écrans */
@media (max-width: 480px) {
    .psc-header h2 {
        font-size: 1.6em;
    }

    .psc-content {
        padding: 15px;
        gap: 15px;
    }

    .psc-section {
        padding: 15px;
    }

    .psc-equipment-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .psc-equipment-item input[type="number"] {
        width: 100%;
    }

    .psc-btn-group {
        flex-direction: column;
    }

    .psc-btn {
        width: 100%;
    }
}


/* ============================================
   CORRECTIONS POUR LES COULEURS DE TEXTE
   Force les couleurs visibles (anti-conflit Elementor)
   ============================================ */

/* Forcer les couleurs de texte dans tous les éléments */
.psc-wrapper {
    color: #333 !important;
}

.psc-wrapper * {
    color: inherit;
}

/* Inputs et selects */
.psc-wrapper input[type="number"],
.psc-wrapper input[type="text"],
.psc-wrapper select,
.psc-wrapper textarea {
    color: #333 !important;
    background-color: white !important;
}

.psc-wrapper input[type="number"]::placeholder,
.psc-wrapper input[type="text"]::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

/* Labels et textes */
.psc-wrapper label {
    color: #333 !important;
}

.psc-wrapper .psc-label-help {
    color: #666 !important;
}

/* Titres */
.psc-wrapper h2,
.psc-wrapper h3,
.psc-wrapper h4,
.psc-wrapper h5,
.psc-wrapper h6 {
    color: inherit !important;
}

.psc-wrapper .psc-section h3 {
    color: #1a472a !important;
}

.psc-wrapper .psc-results h3 {
    color: #1a472a !important;
}

.psc-wrapper .psc-category-title {
    color: #1a472a !important;
}

/* Résultats */
.psc-wrapper .psc-result-label {
    color: #666 !important;
}

.psc-wrapper .psc-result-value {
    color: #1a472a !important;
}

.psc-wrapper .psc-result-unit {
    color: #666 !important;
}

.psc-wrapper .psc-result-detail {
    color: #999 !important;
}

/* Équipements */
.psc-wrapper .psc-equipment-item label {
    color: #333 !important;
}

.psc-wrapper .psc-unit {
    color: #666 !important;
}

/* Tableau */
.psc-wrapper .psc-summary-table th {
    color: #1a472a !important;
    background-color: #f0f0f0 !important;
}

.psc-wrapper .psc-summary-table td {
    color: #333 !important;
}

/* Messages */
.psc-wrapper .psc-warning {
    color: #856404 !important;
}

.psc-wrapper .psc-success {
    color: #155724 !important;
}

.psc-wrapper .psc-info-box {
    color: #004085 !important;
}

/* Paragraphes et texte générique */
.psc-wrapper p {
    color: #333 !important;
}

.psc-wrapper span {
    color: inherit !important;
}

/* Boutons */
.psc-wrapper .psc-btn {
    color: inherit !important;
}

.psc-wrapper .psc-btn-calculate {
    color: white !important;
}

.psc-wrapper .psc-btn-reset {
    color: #333 !important;
}

.psc-wrapper .psc-btn-download {
    color: white !important;
}

/* Correction spécifique pour Elementor qui force white */
.elementor .psc-wrapper input[type="number"],
.elementor .psc-wrapper input[type="text"],
.elementor .psc-wrapper select,
.elementor .psc-wrapper textarea {
    color: #333 !important;
}

.elementor .psc-wrapper label {
    color: #333 !important;
}

.elementor .psc-wrapper p,
.elementor .psc-wrapper span,
.elementor .psc-wrapper div {
    color: inherit !important;
}

/* Désactiver les styles de couleur blanche imposés par Elementor */
.psc-wrapper input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]) {
    color: #333 !important;
}

.psc-wrapper select {
    color: #333 !important;
}

/* Important: Réinitialiser les styles de texte blancs */
.psc-container,
.psc-section,
.psc-results,
.psc-form-group,
.psc-equipment-item,
.psc-summary-table {
    color: #333 !important;
}
