/* ==========================================================================
   VARIABLES & THEMING (Palette d'origine restituée)
   ========================================================================== */
:root {
  /* Mode Sombre : Fond profond sombre-indigo / violet nocturne */
  --bg-color: #0b0f19;
  --card-bg: rgba(17, 24, 39, 0.75);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-main: #f3f4f8;
  --text-muted: #9ca3af;
  --accent: #5cf6f6;            /* Violet vibrant / Mystique & Ludique */
  --accent-hover: #a78bfa;
  --accent-glow: rgb(121 89 195 / 25%);
  --accordion-bg: rgba(31, 41, 55, 0.55);
  --accordion-hover: rgba(55, 65, 81, 0.7);
  --shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.45);
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --canvas-opacity: 0.3;
}

[data-theme="light"] {
  /* Mode Clair : Tons épurés, doux et chaleureux */
  --bg-color: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-border: rgba(0, 0, 0, 0.08);
  --text-main: #111827;
  --text-muted: #4b5563;
  --accent: #6d28d9;
  --accent-hover: #5b21b6;
  --accent-glow: rgba(109, 40, 217, 0.12);
  --accordion-bg: rgba(241, 245, 249, 0.85);
  --accordion-hover: rgba(226, 232, 240, 0.95);
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
  --canvas-opacity: 0.18;
}

/* ==========================================================================
   RESET & STYLES DE BASE
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
  overflow-x: hidden;
}

/* Canvas pour le fond fractale géométrique */
#fractal-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: var(--canvas-opacity);
  transition: opacity 0.3s ease;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

/* ==========================================================================
   EN-TÊTE / HEADER
   ========================================================================== */
.site-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.header-top {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 0.5rem;
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.theme-btn {
  position: absolute;
  right: 0;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-main);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-btn:hover {
  transform: scale(1.08);
  border-color: var(--accent);
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.tagline {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.quote {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0.5rem auto 0;
}

/* ==========================================================================
   CARTES DE CATEGORIES & ACCORDÉONS
   ========================================================================== */
.category-card {
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.75rem;
}

.category-header h2 {
  font-size: 1.35rem;
  font-weight: 600;
}

.subdomain-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.subdomain-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-item {
  background: var(--accordion-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.accordion-item:hover {
  background: var(--accordion-hover);
  border-color: var(--accent);
}

.accordion-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  user-select: none;
}

.accordion-title {
  font-weight: 500;
  font-size: 1rem;
}

.trigger-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.direct-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: var(--accent-glow);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.direct-link:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
}

.chevron {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.accordion-item.open .chevron {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
  padding: 0 1.1rem;
}

.accordion-item.open .accordion-content {
  padding: 0 1.1rem 1rem 1.1rem;
}

.accordion-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ==========================================================================
   GRILLE DE CONTACTS
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--accordion-bg);
  border: 1px solid var(--card-border);
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.contact-btn:hover {
  transform: translateY(-2px);
  background: var(--accordion-hover);
  border-color: var(--accent);
}

.contact-icon {
  font-size: 1.4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   SECTION EXPLICATIVE / FOOTER
   ========================================================================== */
.about-section {
  text-align: center;
  padding: 1.5rem 1rem 0;
  border-top: 1px solid var(--card-border);
  margin-top: 2rem;
}

.about-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.about-section p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Adaptations mobiles */
@media (max-width: 480px) {
  .container {
    padding: 1.5rem 0.85rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
