/* ==========================================================================
   THÈME DOMOTIQUE - Styles pour les pages avec thématique domotique/IoT
   Fichier: 06-themes/domotique.css
   ========================================================================== */

/* ==========================================================================
   HERO SECTION DOMOTIQUE
   ========================================================================== */
.domotique-hero {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    text-align: center;
    min-height: 400px;
}

.domotique-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
    z-index: 1;
}

.domotique-hero .container {
    position: relative;
    z-index: 2;
}

/* Animation icône ESP32 */
.esp32-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #fbbc05;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: chipPulse 3s ease-in-out infinite alternate;
    display: block;
    text-align: center;
}

@keyframes chipPulse {
    0% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    100% { 
        transform: scale(1.1) rotate(3deg);
        opacity: 0.8;
    }
}

/* ==========================================================================
   CARTES COMPOSANTS DOMOTIQUE
   ========================================================================== */
.component-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-left: 5px solid #1a73e8;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.component-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* En-tête des cartes composants */
.component-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.component-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    color: #1a73e8;
}

.component-title {
    flex: 1;
}

.component-title h3 {
    margin: 0 0 5px 0;
    font-size: 1.8rem;
    color: #1a73e8;
}

.component-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

.component-badge {
    background: linear-gradient(45deg, #1a73e8, #0d47a1);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   ARCHITECTURE ET GRILLES
   ========================================================================== */
.architecture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.arch-block {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    text-align: center;
    transition: all 0.3s ease;
}

.arch-block:hover {
    border-color: #1a73e8;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(26, 115, 232, 0.2);
}

.arch-block h4 {
    color: #1a73e8;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Statistiques de performance */
.performance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.perf-stat {
    background: linear-gradient(145deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e1f5fe;
}

.perf-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1a73e8;
    margin-bottom: 5px;
}

.perf-stat-label {
    font-size: 0.9rem;
    color: #666;
}

/* ==========================================================================
   COMMUNICATION ET PROTOCOLES
   ========================================================================== */
.communication-flow {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
}

.comm-diagram {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.comm-node {
    background-color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border: 2px solid #1a73e8;
    text-align: center;
    min-width: 120px;
    transition: all 0.3s ease;
}

.comm-node:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.comm-arrow {
    font-size: 1.5rem;
    color: #1a73e8;
    font-weight: bold;
    animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.2); 
        opacity: 0.8; 
    }
}

/* Badges de protocole */
.protocol-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.protocol-badge {
    background: linear-gradient(45deg, #1e7e34, #27ae60);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.wifi-icon, 
.bluetooth-icon, 
.uart-icon, 
.spi-icon {
    display: inline-block;
    margin-right: 5px;
}

/* Grille de protocoles */
.protocol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.protocol-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    border-top: 4px solid #34a853;
}

.protocol-card h4 {
    color: #34a853;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.protocol-icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* ==========================================================================
   DISPOSITIFS ET COMPOSANTS
   ========================================================================== */


.device-icon {
    margin-right: 10px;
    font-size: 1.3rem;
}

.device-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.device-list li {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
    position: relative;
    padding-left: 25px;
}

.device-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.device-list li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   TABLEAUX DE COMPARAISON DOMOTIQUE
   ========================================================================== */

.comparison-table tr:hover {
    background-color: #f8f9ff;
}

.comparison-table .component-name {
    font-weight: 600;
    color: #1a73e8;
}

/* ==========================================================================
   SECTIONS SPÉCIALISÉES
   ========================================================================== */

/* Section composants */
.devices-section {
    background: linear-gradient(145deg, #ecf0f1 0%, #bdc3c7 100%);
    padding: 60px 0;
    margin: 60px 0;
}

/* Section avantages de configuration */
.config-advantages {
    margin-top: 40px;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.advantage-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #9b59b6;
    text-align: center;
    transition: transform 0.3s ease;
}

.advantage-card:hover {
    transform: translateY(-3px);
}

.advantage-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #9b59b6;
}

.advantage-card h4 {
    color: #9b59b6;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.advantage-card p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Section flux d'intégration */
.integration-flow {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    padding: 60px 0;
    color: white;
}

.flow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.flow-step {
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s ease;
}

.flow-step:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.15);
}

.step-number {
    background: white;
    color: #e67e22;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.flow-step h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.flow-step p {
    opacity: 0.9;
    line-height: 1.5;
}

/* ==========================================================================
   HOME ASSISTANT INTÉGRATION
   ========================================================================== */
.ha-hero {
    background: linear-gradient(135deg, #18bcf2 0%, #1565c0 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.ha-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #00d4ff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: haPulse 3s ease-in-out infinite alternate;
    display: block;
    text-align: center;
}

@keyframes haPulse {
    0% { 
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    }
    100% { 
        transform: scale(1.06);
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8));
    }
}

.integration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.integration-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-top: 4px solid #4caf50;
    transition: all 0.3s ease;
}

.integration-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Dashboard showcase */
.dashboard-showcase {
    background: linear-gradient(135deg, #263238 0%, #37474f 100%);
    padding: 60px 0;
    color: white;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.dashboard-card {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-5px);
}

.dashboard-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #00d4ff;
}

/* ==========================================================================
   RESPONSIVE DOMOTIQUE
   ========================================================================== */
@media (max-width: 768px) {
    .component-header {
        flex-direction: column;
        text-align: center;
    }
    
    .component-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .comm-diagram {
        flex-direction: column;
    }
    
    .comm-arrow {
        transform: rotate(90deg);
    }
    
    .architecture-grid,
    .device-grid,
    .flow-steps,
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .performance-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .protocol-badges {
        justify-content: center;
    }
    
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .domotique-hero {
        padding: 60px 0;
    }
    
    .esp32-icon {
        font-size: 3rem;
    }
    
    .component-card {
        padding: 20px;
    }
    
    .component-header {
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .component-icon {
        font-size: 2rem;
    }
    
    .component-title h3 {
        font-size: 1.5rem;
    }
    
    .architecture-grid {
        gap: 15px;
    }
    
    .arch-block {
        padding: 15px;
    }
    
    .performance-stats {
        grid-template-columns: 1fr;
    }
    
    .comm-node {
        min-width: auto;
        padding: 10px 15px;
    }
    
    .comparison-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .comparison-table th,
    .comparison-table td {
        min-width: 120px;
        font-size: 0.8rem;
    }
}