:root {
    --primary-color: #FF6B35;
    --secondary-color: #000000;
    --text-color: #333333;
    --light-gray: #F5F5F5;
    --medium-gray: #CCCCCC;
    --dark-gray: #666666;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-weight: 300;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    background-color: var(--white);
}

/* ========================================
   TITILLIUM WEB - APPLICATION GLOBALE
   ======================================== */

/* Forcer Titillium Web sur TOUS les éléments */
*,
*::before,
*::after {
    font-family: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif !important;
}

/* Forcer sur tous les composants MudBlazor */
.mud-typography,
.mud-button,
.mud-button-root,
.mud-link,
.mud-text,
.mud-card,
.mud-paper,
.mud-list,
.mud-list-item,
.mud-menu-item,
.mud-nav-link,
.mud-input,
.mud-select,
.mud-chip {
    font-family: 'Titillium Web', sans-serif !important;
}

/* ========================================
   HEADER (NAVMENU) - TITILLIUM WEB
   ======================================== */

/* Header/NavMenu - Appliquer Titillium Web */
.navbar-glass,
.navbar-glass *,
.mud-appbar,
.mud-appbar * {
    font-family: 'Titillium Web', sans-serif !important;
}

.navbar-glass .nav-link {
    font-family: 'Titillium Web', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
}

.navbar-glass .mud-typography {
    font-family: 'Titillium Web', sans-serif !important;
}

.navbar-glass .mud-button {
    font-family: 'Titillium Web', sans-serif !important;
    font-weight: 600 !important;
}

/* Logo dans le header */
.navbar-glass .font-bold {
    font-weight: 700 !important;
}

/* ========================================
   FOOTER - TITILLIUM WEB
   ======================================== */

/* Footer - Appliquer Titillium Web */
footer,
footer *,
footer .mud-container,
footer .mud-grid,
footer .mud-grid-item {
    font-family: 'Titillium Web', sans-serif !important;
}

footer .mud-typography {
    font-family: 'Titillium Web', sans-serif !important;
}

footer h5,
footer h6 {
    font-family: 'Titillium Web', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
}

footer .mud-link,
footer .mud-button {
    font-family: 'Titillium Web', sans-serif !important;
    font-weight: 400 !important;
}

footer .font-bold {
    font-weight: 700 !important;
}

footer .font-semibold {
    font-weight: 600 !important;
}

/* ========================================
   MOBILE DRAWER MENU - TITILLIUM WEB
   ======================================== */

/* Mobile Drawer Menu - Appliquer Titillium Web */
.mobile-drawer,
.mobile-drawer *,
.mobile-nav-menu,
.mobile-nav-menu *,
.mud-drawer,
.mud-drawer * {
    font-family: 'Titillium Web', sans-serif !important;
}

.mobile-nav-item {
    font-family: 'Titillium Web', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
}

.mobile-drawer-header {
    font-family: 'Titillium Web', sans-serif !important;
}

/* ========================================
   PAGE D'ACCUEIL ET AUTRES PAGES
   ======================================== */

/* Hero Section */
.hero-swiper-section,
.hero-swiper-section *,
.hero-slide,
.hero-slide *,
.hero-content,
.hero-content * {
    font-family: 'Titillium Web', sans-serif !important;
}

/* Sections générales */
.section,
.section *,
.section-title,
.section-title * {
    font-family: 'Titillium Web', sans-serif !important;
}

/* Cards */
.mud-card,
.mud-card *,
.mud-card-content,
.mud-card-content *,
.mud-card-actions,
.mud-card-actions * {
    font-family: 'Titillium Web', sans-serif !important;
}

/* Grille et conteneurs */
.mud-grid,
.mud-grid *,
.mud-container,
.mud-container * {
    font-family: 'Titillium Web', sans-serif !important;
}

/* DRAWER MOBILE - Suppression de tous les styles conflictuels */
/* Laisser MudBlazor gérer le drawer complètement */

.mud-drawer-header {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1.5rem 1rem;
}

.mud-drawer .mud-nav-link {
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    margin: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
}

.mud-drawer .mud-nav-link:hover {
    background: rgba(255, 107, 53, 0.08);
}

.mud-drawer .mud-nav-link.active {
    background: rgba(255, 107, 53, 0.12);
    color: #FF6B35;
}

.mud-drawer .mud-icon-root {
    margin-right: 12px;
}

/* Overlay pour le drawer mobile */
.mud-overlay {
    z-index: 1350 !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Titillium Web', sans-serif !important;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    font-family: 'Titillium Web', sans-serif !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    font-family: 'Titillium Web', sans-serif !important;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-family: 'Titillium Web', sans-serif !important;
    font-weight: 400;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: #E85A2A;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-fluid {
    width: 100%;
    padding: 0 2rem;
}

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

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--dark-gray);
}

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

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Titillium Web', sans-serif !important;
    font-weight: 400;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: 'Titillium Web', sans-serif !important;
    font-weight: 300;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

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

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

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

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

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

/* Responsive */
@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    
    .section { padding: 3rem 0; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .container, .container-fluid {
        padding: 0 1rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .section { padding: 2rem 0; }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Mobile drawer fix */
    .mud-drawer {
        width: 320px !important;
        max-width: 85vw !important;
    }
    
    /* Force hamburger button visibility on mobile */
    @media (max-width: 1024px) {
        .hamburger-button {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            pointer-events: all !important;
            cursor: pointer !important;
        }
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 3rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
.pb-5 { padding-bottom: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.bg-light { background-color: var(--light-gray); }
.bg-dark { background-color: var(--secondary-color); color: var(--white); }
.bg-primary { background-color: var(--primary-color); color: var(--white); }

.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-gray { color: var(--dark-gray); }

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Blazor Error UI */
#blazor-error-ui {
    background: #b32121;
    bottom: 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.3);
    color: white;
    display: none;
    left: 0;
    padding: 0.6rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ========================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ======================================== */

/* Tablets et petits écrans */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    
    .section {
        padding: 4rem 0;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    .section {
        padding: 3rem 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .page-header {
        padding: 6rem 0 4rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header .lead {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Portfolio responsive */
    .portfolio-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    /* Services responsive */
    .service-detail-card {
        padding: 1.5rem;
    }
    
    .service-detail-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .service-detail-icon {
        margin-right: 0;
    }
    
    /* Team responsive */
    .team-member-card {
        padding: 1.5rem;
    }
    
    /* Blog responsive */
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Hero Carousel Styles */
.hero-carousel {
    width: 100%;
}

.hero-carousel .mud-carousel-item {
    height: 100% !important;
}

.hero-carousel .mud-carousel-item > div {
    height: 100% !important;
}

.hero-carousel-section {
    height: 100vh;
    min-height: 600px;
}

/* Petits mobiles */
@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .section {
        padding: 2.5rem 0;
    }
    
    .page-header {
        padding: 5rem 0 3rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.75rem 1rem;
    }
    
    /* Hero carousel responsive */
    .hero-slide {
        height: auto;
        min-height: 500px;
        padding: 6rem 1rem 2rem;
    }
    
    .hero-carousel-section {
        height: auto;
        min-height: 500px;
    }
    
    .hero-carousel {
        height: auto !important;
        min-height: 500px !important;
    }
    
    .hero-carousel .mud-button {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    .hero-slide h1 {
        font-size: 1.75rem !important;
    }
    
    .hero-slide h5 {
        font-size: 1rem !important;
    }
}
