/* ===== RESET & BASE STYLES ===== */
@import "./user/services.css";
@import "./client.css";
@import "./technicien.css";
@import "./admin.css";
@import "./user/login.css";
@import "./user/actualite.css";
@import "./user/contact.css";
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --secondary-color: #3498db;
    --dark-bg: whitesmoke;
    --darker-bg: whitesmoke;
    --card-bg: whitesmoke;
    --text-light: black;
    --text-gray: black;
    --border-color: #333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: whitesmoke;
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin: 3rem 0 2rem;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

h4 {
    font-size: 1.2rem;
    color: var(--text-light);
}

p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

/* ===== BUTTONS ===== */
.btn-primary, .btn-secondary, button[type="submit"] {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

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

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

button[type="submit"] {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
    width: 100%;
    font-size: 1.1rem;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #2980b9, var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.9)),
                url('/images/back.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: -20px -20px 0;
    padding: 20px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: whitesmoke;
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: 4rem 0;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.card h3 {
    margin-bottom: 1rem;
}

.card p {
    flex-grow: 1;
}

.services .btn-secondary {
    display: block;
    width: fit-content;
    margin: 2rem auto 0;
}

/* ===== ACTUALITÉS SECTION ===== */
.home-actualites {
    padding: 4rem 0;
    background: var(--darker-bg);
    margin: 0 -20px;
    padding: 4rem 20px;
    background: white;
}

.actualites-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.mini-actu-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: block;
}

.mini-actu-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.mini-actu-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.mini-actu-card p {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.date {
    font-size: 0.85rem;
    color: var(--text-gray);
    opacity: 0.8;
}

.see-more {
    text-align: center;
    margin-top: 2rem;
}

.see-more a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.see-more a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 4rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.contact form {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact input,
.contact textarea {
    padding: 15px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 1rem;
    transition: var(--transition);
}

.contact input:focus,
.contact textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

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

.contact input::placeholder,
.contact textarea::placeholder {
    color: #666;
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero {
        min-height: 60vh;
        background-attachment: scroll;
    }
    
    .service-cards {
        grid-template-columns: 1fr;
    }
    
    .actualites-mini-grid {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 0 15px;
    }
    
    .hero, .home-actualites {
        margin: 0 -15px;
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .btn-primary, .btn-secondary, button[type="submit"] {
        padding: 12px 24px;
        width: 100%;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .btn-primary,
    .btn-secondary,
    button[type="submit"],
    .see-more a {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .card, .mini-actu-card {
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* ===== HEADER STYLES ===== */
header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 0;
    position: relative;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

.btn-login {
    background: var(--primary-color);
    color: white !important;
    padding: 10px 24px !important;
    border-radius: 4px;
    font-weight: 600 !important;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-login::after {
    display: none !important;
}

/* Mobile Navigation */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

/* ===== FOOTER STYLES ===== */
footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 20px;
    margin-top: 4rem;
    text-align: center;
}

footer p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links span {
    color: var(--text-gray);
}

/* ===== RESPONSIVE HEADER ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    
    nav ul {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--darker-bg);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    nav ul.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    nav ul li {
        width: 100%;
        text-align: center;
    }
    
    nav ul li a {
        display: block;
        padding: 10px;
    }
    
    .btn-login {
        margin-top: 1rem;
        display: inline-block;
        width: auto;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }
    
    footer {
        padding: 2rem 15px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-links span {
        display: none;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* ===== FORM VALIDATION STYLES ===== */
input:invalid,
textarea:invalid {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 5px;
}

.success-message {
    color: var(--primary-color);
    font-size: 1rem;
    text-align: center;
    padding: 1rem;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 4px;
    margin-top: 1rem;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none; }

/* ===== PRINT STYLES (COMPLEMENT) ===== */
@media print {
    header, footer {
        display: none;
    }
    
    .btn-login, .see-more a {
        display: none;
    }
    
    a {
        color: #000 !important;
        text-decoration: none !important;
    }
}


/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    :root {
        --text-light: #fff;
        --text-gray: #ccc;
        --border-color: #555;
    }
    
    .btn-primary,
    .btn-secondary,
    button[type="submit"] {
        border: 2px solid currentColor;
    }
}

/* Correction pour le menu */
nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Pour assurer que le header est bien affiché */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Styles pour la barre de recherche */
.search-container {
  max-width: 600px;
  margin: 2rem auto 1rem;
  position: relative;
}

.search-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-input-group {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-secondary);
}

.search-input {
  width: 100%;
  padding: 15px 50px 15px 48px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  background: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.clear-search-btn:hover {
  background: var(--background-light);
  color: var(--text-primary);
}

.search-btn {
  padding: 15px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.search-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

/* Styles pour l'en-tête des services */
.services-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.results-count {
  background: var(--background-light);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.results-count.updated {
  background: var(--primary-light);
  color: var(--primary-color);
  transform: scale(1.05);
}

/* Styles pour le message "aucun résultat" */
.no-results-message {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--background-light);
  border-radius: 16px;
  margin-top: 2rem;
}

.no-results-message svg {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.no-results-message h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.no-results-message p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Animation pour les cartes filtrées */
.service-card {
  transition: all 0.3s ease;
}

.service-card[style*="display: none"] {
  opacity: 0;
  transform: scale(0.9);
}

/* Responsive */
@media (max-width: 768px) {
  .search-form {
    flex-direction: column;
  }
  
  .search-input,
  .search-btn {
    width: 100%;
  }
  
  .services-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .search-container {
    margin: 1.5rem auto;
  }
}


