/**
 * CSS Principal - Façades Antoine
 * Styles de base et variables CSS
 */

/* Reset et variables CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e74c3c;
    --secondary-color: #2c3e50;
    --accent-color: #f39c12;
    --dark-color: #1a252f;
    --light-gray: #ecf0f1;
    --text-color: #333;
    --white: #ffffff;
}

/* Styles de base */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    font-display: swap;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Utilitaires */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Liens */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background: #d68910;
    transform: translateY(-2px);
}

/* Titres de section */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

/* Section subtitle avec contraste amélioré sur fond clair */
.section-light .section-subtitle {
    color: #1a252f; /* Couleur plus foncée pour meilleur contraste */
}

.section-title h2 {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-title p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* Grilles */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Cards génériques */
.card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

/* Sections */
.section {
    padding: 6rem 0;
}

.section-light {
    background: #f8f9fa; /* Couleur de fond légèrement plus contrastée */
    color: #1a252f; /* Texte plus foncé pour meilleur contraste */
}

.section-dark {
    background: linear-gradient(135deg, var(--secondary-color), var(--dark-color));
    color: var(--white);
}

.section-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
}

/* Responsive pour les sections */
@media (max-width: 768px) {
    .section {
        padding: 3rem 0; /* Réduit le padding sur mobile */
    }
    
    .section-light {
        background: var(--white); /* Assure un arrière-plan visible */
        color: var(--dark-color); /* Assure un texte visible */
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem; /* Plus petit sur mobile */
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* Gradient overlays */
.gradient-overlay {
    position: relative;
}

.gradient-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(26, 37, 47, 0.8));
    z-index: 1;
}

.gradient-overlay > * {
    position: relative;
    z-index: 2;
}

/* Formulaires */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Icons */
.icon {
    display: inline-block;
    font-size: 1.2em;
    margin-right: 0.5rem;
}

.icon-large {
    font-size: 2em;
}

.icon-xl {
    font-size: 3em;
}

/* Badges et étiquettes */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.badge-secondary {
    background: var(--secondary-color);
}

.badge-accent {
    background: var(--accent-color);
}

.badge-success {
    background: #27ae60;
}

.badge-warning {
    background: #f39c12;
}

.badge-info {
    background: #3498db;
}

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

/* Correction breadcrumb pour les pages services */
nav[aria-label="breadcrumb"] {
    margin-top: 70px; /* Compenser la hauteur du header fixe */
}

/* Correction spécifique pour les pages avec hero ayant margin-top négatif */
/* Peinture, Ravalement, Hydrofuge ont margin-top: -20px */
body:has(.service-hero[style*="margin-top: -20px"]) nav[aria-label="breadcrumb"] {
    margin-top: 90px !important; /* Compenser le margin-top négatif du hero */
}

@media (max-width: 768px) {
    /* Correction breadcrumb pour mobile */
    nav[aria-label="breadcrumb"] {
        margin-top: 60px;
        padding: 0.8rem 0 !important;
    }
    
    /* Correction spécifique mobile pour les pages avec hero ayant margin-top négatif */
    body:has(.service-hero[style*="margin-top: -20px"]) nav[aria-label="breadcrumb"] {
        margin-top: 80px !important;
    }
    
    nav[aria-label="breadcrumb"] .container {
        padding: 0 1rem !important;
    }
    
    nav[aria-label="breadcrumb"] .breadcrumb {
        font-size: 0.8rem !important;
        flex-wrap: wrap !important;
    }
    
    /* Réduire drastiquement les écarts pour tenir sur une ligne */
    nav[aria-label="breadcrumb"] li {
        margin: 0 0.1rem !important;
    }
    
    nav[aria-label="breadcrumb"] .breadcrumb-separator {
        margin: 0 0.1rem !important;
    }
    
    /* Réduire le padding des liens */
    nav[aria-label="breadcrumb"] a {
        padding: 0.2rem 0.3rem !important;
    }
    
    /* Réduire l'espacement du conteneur */
    nav[aria-label="breadcrumb"] .container {
        padding: 0 0.5rem !important;
    }
    
    /* Masquer l'icône maison sur mobile pour gagner de la place */
    nav[aria-label="breadcrumb"] .fas.fa-home {
        display: none !important;
    }
    
    /* Masquer les particules animées sur mobile pour améliorer la lisibilité */
    .process-timeline > div[style*="position: absolute"]:not(.process-step),
    div[style*="position: absolute"][style*="animation"],
    div[style*="position: absolute"][style*="float"],
    div[style*="position: absolute"][style*="border-radius: 50%"][style*="animation"] {
        display: none !important;
    }
    
    /* Masquer les numéros circulaires des étapes sur mobile */
    .process-step div[style*="width: 60px"][style*="height: 60px"][style*="border-radius: 50%"] {
        display: none !important;
    }
    
    /* Simplifier l'affichage du processus en étapes sur mobile */
    .process-timeline {
        padding: 0 !important;
    }
    
    .process-step {
        flex-direction: column !important;
        text-align: center !important;
        margin-bottom: 2rem !important;
    }
    
    .process-step > div {
        width: 100% !important;
        flex: none !important;
        padding: 0 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Masquer la ligne centrale sur mobile */
    .process-timeline > div[style*="position: absolute"][style*="left: 50%"] {
        display: none !important;
    }
}

/* ====================================
   BREADCRUMB STYLES
   ==================================== */
.breadcrumb-container {
    background: var(--light-gray);
    border-bottom: 1px solid #ddd;
    padding: 0.8rem 0;
    position: relative;
    z-index: 1000;
}

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: #666;
    transition: color 0.3s ease;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-left: 0.8rem;
    margin-right: 0.3rem;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    position: relative;
}

.breadcrumb-item a:hover {
    color: var(--secondary-color);
    background: rgba(231, 76, 60, 0.1);
    transform: translateY(-1px);
}

.breadcrumb-item.active {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Icon pour le premier élément (accueil) */
.breadcrumb-item:first-child a::before {
    content: '🏠';
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* Responsive breadcrumb */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 0 1rem;
        font-size: 0.8rem;
    }
    
    .breadcrumb-item {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .breadcrumb-item:not(:last-child)::after {
        margin-left: 0.5rem;
        margin-right: 0.2rem;
    }
}

@media (max-width: 480px) {
    .breadcrumb-container {
        padding: 0.5rem 0;
    }
    
    .breadcrumb {
        padding: 0 0.5rem;
        font-size: 0.75rem;
    }
    
    .breadcrumb-item {
        max-width: 80px;
    }
    
    /* Masquer les éléments intermédiaires sur très petit écran */
    .breadcrumb-item:not(:first-child):not(:last-child):not(:nth-last-child(2)) {
        display: none;
    }
    
    /* Ajouter "..." pour indiquer les éléments masqués */
    .breadcrumb-item:nth-child(2):not(:last-child)::before {
        content: '...';
        margin-right: 0.5rem;
        color: #999;
    }
}