﻿@import './variables.css';

/* Base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-secondary);
  background-color: #F5F5F5 !important;
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Debug: Ensure all sections have proper background */
.competences-landing,
.news,
.rendez-vous,
.association-logos,
.google-reviews-section,
.contact,
.footer {
  background-color: #F5F5F5 !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-normal);
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}



/* Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Focus styles */
:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

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

/* Selection */
::selection {
  background-color: var(--blue);
  color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: var(--border-radius-sm);
}

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

/* App layout */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Loading state */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  color: var(--blue);
}

.loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 4px solid var(--blue);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Error state */
.error {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--coral);
}

.error h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

.error p {
  color: var(--black);
  margin-bottom: var(--spacing-lg);
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mt-auto {
  margin-top: auto;
}

.mb-0 {
  margin-bottom: 0;
}

.w-100 {
  width: 100%;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --blue: #0052cc;
    --black: #000000;
    --white: #F5F5F5;
    --coral: #cc0000;
  }

  * {
    border-color: currentColor !important;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
  }

  @page {
    margin: 2cm;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
  }
}
