/* --- BASE & TYPOGRAPHY --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;600;700&display=swap');

:root {
  --primary-color: #0A1F3B;
  --secondary-color: #4A6B8D;
  --accent-color: #8FAEC2;
  --bg-color: #F5F5F5;
  --text-color: #333333;
  --text-light: #F5F5F5;
  --border-color: #e0e0e0;
  --spacing-unit: 8px;
  --font-family: 'Noto Sans', sans-serif;
  --header-height: 80px;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-color);
  margin-bottom: calc(var(--spacing-unit) * 3);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover, a:focus {
  color: var(--primary-color);
  text-decoration: underline;
}

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

/* --- LAYOUT & MAIN SECTIONS --- */
.container {
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 calc(var(--spacing-unit) * 2);
}

.main-content {
  padding-top: var(--header-height);
}

.page-section {
  padding: calc(var(--spacing-unit) * 10) 0;
}

.centered-text {
  text-align: center;
}

/* --- HEADER / NAVIGATION --- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3);
}

.logo a {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-color);
  text-decoration: none;
}
.logo a:hover {
  color: var(--secondary-color);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: calc(var(--spacing-unit) * 4);
}

.nav-links a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--secondary-color);
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.nav-links a.active,
.nav-links a:hover,
.nav-links a:focus {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  text-decoration: none;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-toggle .icon-bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 2);
  background-size: cover;
  background-position: center;
  text-align: center;
  color: var(--text-light);
  filter: grayscale(1);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 31, 59, 0.75);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero h1 {
  color: var(--text-light);
  font-weight: 600;
}

/* --- ARTICLE & CONTENT STYLING --- */
.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content h2, .article-content h3 {
  margin-top: calc(var(--spacing-unit) * 6);
}

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: calc(var(--spacing-unit) * 3);
  margin: calc(var(--spacing-unit) * 4) 0;
  font-style: italic;
  color: var(--secondary-color);
}

/* --- HOME PAGE SPECIFIC --- */
.intro-section {
  text-align: center;
  font-size: 1.2rem;
  color: var(--secondary-color);
}

.analysis-blocks-section {
  border-top: 1px solid var(--border-color);
  padding-top: calc(var(--spacing-unit) * 10);
}

.analysis-block {
  margin-bottom: calc(var(--spacing-unit) * 6);
  padding-bottom: calc(var(--spacing-unit) * 6);
  border-bottom: 1px solid var(--border-color);
}

.analysis-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.analysis-block h3 {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.analysis-block-link {
  display: inline-block;
  margin-top: calc(var(--spacing-unit) * 2);
  font-weight: 600;
  text-decoration: underline;
}

/* --- CONTACT PAGE --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--spacing-unit) * 6);
}

@media(min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--spacing-unit) * 10);
  }
}

.contact-info p {
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.contact-info strong {
  display: block;
  color: var(--primary-color);
  margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.contact-form .form-group {
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-unit);
}

.contact-form .form-control {
  width: 100%;
  padding: calc(var(--spacing-unit) * 1.5);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: var(--font-family);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.contact-form .form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(74, 107, 141, 0.2);
}

.btn {
  display: inline-block;
  padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 4);
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
}

.btn:hover, .btn:focus {
  background-color: var(--secondary-color);
  color: #fff;
  box-shadow: 0 4px 15px rgba(10, 31, 59, 0.2);
  transform: translateY(-2px);
  text-decoration: none;
}

.form-avertissement {
  font-size: 0.9rem;
  color: #666;
  margin-top: calc(var(--spacing-unit) * 2);
  font-style: italic;
}

.map-container {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-top: calc(var(--spacing-unit) * 6);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- FOOTER --- */
.site-footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: calc(var(--spacing-unit) * 6) 0;
  font-size: 0.9rem;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: calc(var(--spacing-unit) * 4);
}

.footer-info {
  line-height: 1.6;
}

.footer-info-item {
  margin-bottom: var(--spacing-unit);
}

.footer-links {
  list-style: none;
  display: flex;
  gap: calc(var(--spacing-unit) * 3);
}

.footer-links a {
  color: var(--accent-color);
}
.footer-links a:hover {
  color: #fff;
}

.copyright {
  color: var(--accent-color);
  margin-top: calc(var(--spacing-unit) * 2);
}

@media(min-width: 768px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
  }
}

/* --- THANK YOU PAGE --- */
.thank-you-section {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}

.thank-you-icon {
  width: 80px;
  height: 80px;
  background: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  color: white;
}

.thank-you-icon svg {
  width: 40px;
  height: 40px;
}

.thank-you-section p {
  font-size: 1.2rem;
  color: #555;
  max-width: 600px;
  margin-bottom: 30px;
}
.thank-you-section .btn {
  width: auto;
}

/* --- COOKIE BANNER --- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(10, 31, 59, 0.95);
  color: var(--text-light);
  padding: calc(var(--spacing-unit) * 3);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  gap: calc(var(--spacing-unit) * 3);
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.cookie-text {
  flex-grow: 1;
  text-align: center;
  max-width: 800px;
}

.cookie-buttons {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  flex-shrink: 0;
}

.cookie-btn {
  padding: var(--spacing-unit) calc(var(--spacing-unit) * 2.5);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.cookie-btn-accept {
  background-color: var(--accent-color);
  color: var(--primary-color);
}
.cookie-btn-accept:hover {
  background-color: #fff;
}

.cookie-btn-decline {
  background-color: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
}
.cookie-btn-decline:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

/* --- UTILITY & HELPER CLASSES --- */
.structured-diagram {
    border: 1px solid var(--border-color);
    padding: var(--spacing-unit) * 3;
    background-color: #fff;
    border-radius: 4px;
    margin: calc(var(--spacing-unit) * 4) 0;
}
.diagram-level {
    padding: var(--spacing-unit) * 2;
    margin-bottom: var(--spacing-unit) * 2;
    border: 1px dashed var(--accent-color);
    border-radius: 4px;
}
.diagram-level h4 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-unit);
    font-size: 1.1rem;
}
.diagram-item {
    background-color: #e9eef2;
    padding: var(--spacing-unit);
    margin: var(--spacing-unit) 0;
    border-radius: 4px;
}


/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: #fff;
    flex-direction: column;
    align-items: center;
    padding-top: calc(var(--spacing-unit) * 6);
    gap: calc(var(--spacing-unit) * 2);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.5rem;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .mobile-menu-toggle.active .icon-bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  .mobile-menu-toggle.active .icon-bar:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle.active .icon-bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }

  #cookie-banner {
    flex-direction: column;
  }

  .cookie-text {
    text-align: center;
  }
}