/* ============================================
   GROUPE SINGULARIS - Brand Guidelines
   Premium Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400;1,500&family=Gantari:wght@400;600;800&family=Inter:wght@300;400;500;600&display=swap');

/* --- Design Tokens --- */
:root {
  --navy: #040122;
  --gold: #F1CB18;
  --anthracite: #272626;
  --white: #FFFFFF;
  --cream: #FAFAF8;
  --grey-100: #F5F5F3;
  --grey-200: #E8E8E6;
  --grey-300: #D0D0CC;
  --grey-400: #A0A09C;
  --grey-500: #6B6B67;

  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --space-unit: 8px;
  --content-width: 1200px;
  --gutter: 80px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--anthracite);
  background: var(--white);
}

/* --- Typography Scale --- */
.display-xl {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
}

.display-lg {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.heading-md {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey-400);
}

.body-lg {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--grey-500);
}

.body-sm {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--grey-400);
}

.mono {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.8125rem;
}

/* --- Layout --- */
.page {
  min-height: 100vh;
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 160px 0;
}

.section--dark {
  background: var(--navy);
  color: var(--white);
}

.section--cream {
  background: var(--cream);
}

.grid {
  display: grid;
  gap: 60px;
}

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

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

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

.grid--asymmetric {
  grid-template-columns: 1fr 2fr;
  gap: 120px;
  align-items: start;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--navy);
  color: var(--white);
  padding: 120px var(--gutter);
  position: relative;
}

.hero__brand {
  margin-bottom: 80px;
}

.hero__brand-logo {
  display: flex;
  align-items: center;
  gap: 32px;
}

.hero__emblem {
  width: 400px;
  height: auto;
}

.hero__logo-complet {
  width: 800px;
  max-width: 90vw;
  height: auto;
}

.hero__brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero__groupe {
  font-family: 'Gantari', 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1;
}

.hero__wordmark {
  height: clamp(40px, 6vw, 60px);
  width: auto;
}

.hero__logo {
  width: 420px;
  max-width: 100%;
  height: auto;
  margin-bottom: 80px;
}

.hero__logo img {
  width: 100%;
  height: auto;
  display: block;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 40px;
}

.hero__subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  opacity: 0.9;
}

.hero__version {
  position: absolute;
  bottom: 60px;
  left: var(--gutter);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-400);
}

/* --- Section Headers --- */
.section__header {
  margin-bottom: 80px;
}

.section__number {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-style: italic;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
}

.section__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 24px;
}

.section--dark .section__title {
  color: var(--white);
}

.section__intro {
  max-width: 640px;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--grey-500);
}

.section--dark .section__intro {
  color: var(--grey-300);
}

/* --- Logo Display --- */
.logo-showcase {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.logo-card {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  border-radius: 4px;
  overflow: hidden;
}

.logo-card--navy {
  background: var(--navy);
}

.logo-card--white {
  background: var(--white);
  border: 1px solid var(--grey-200);
}

.logo-card--anthracite {
  background: var(--anthracite);
}

.logo-card--cream {
  background: var(--cream);
  border: 1px solid var(--grey-200);
}

.logo-card__image {
  max-width: 70%;
  max-height: 60%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo-card__label {
  position: absolute;
  bottom: 20px;
  left: 24px;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Logo Complet */
.logo-complet {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo-complet__emblem {
  height: 120px;
  width: auto;
}

.logo-complet__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.logo-complet__groupe {
  font-family: 'Gantari', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1;
}

.logo-complet__groupe--dark {
  color: var(--navy);
}

.logo-complet__wordmark {
  height: 72px;
  width: auto;
}

.logo-card--navy .logo-card__label,
.logo-card--anthracite .logo-card__label {
  color: var(--grey-400);
}

.logo-card--white .logo-card__label,
.logo-card--cream .logo-card__label {
  color: var(--grey-400);
}

/* --- Color Palette --- */
.color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.color-chip {
  display: flex;
  flex-direction: column;
}

.color-chip__preview {
  aspect-ratio: 1;
  border-radius: 4px;
  margin-bottom: 20px;
}

.color-chip__preview--border {
  border: 1px solid var(--grey-200);
}

.color-chip__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.color-chip__values {
  font-family: 'SF Mono', monospace;
  font-size: 0.75rem;
  color: var(--grey-400);
  line-height: 1.8;
}

/* --- Typography Specimens --- */
.type-specimen {
  padding: 80px 0;
  border-bottom: 1px solid var(--grey-200);
}

.type-specimen:last-child {
  border-bottom: none;
}

.type-specimen__label {
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey-400);
  margin-bottom: 32px;
}

.type-specimen__display {
  margin-bottom: 40px;
}

.type-specimen__meta {
  display: flex;
  gap: 48px;
  font-size: 0.875rem;
  color: var(--grey-400);
}

.type-specimen__meta dt {
  font-weight: 500;
  color: var(--anthracite);
}

/* --- Tables --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 20px 0;
  border-bottom: 1px solid var(--grey-200);
}

.data-table th {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-400);
}

.data-table td {
  font-size: 0.9375rem;
}

/* --- Do/Don't --- */
.guidelines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.guideline-item {
  display: flex;
  flex-direction: column;
}

.guideline-item__preview {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grey-100);
  border-radius: 4px;
  margin-bottom: 16px;
  padding: 40px;
}

.guideline-item__preview img {
  max-width: 60%;
  max-height: 60%;
  object-fit: contain;
}

.guideline-item__status {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.guideline-item__status--do {
  color: #16A34A;
}

.guideline-item__status--dont {
  color: #DC2626;
}

.guideline-item__text {
  font-size: 0.875rem;
  color: var(--grey-500);
}

/* --- Downloads --- */
.download-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--grey-200);
  border-radius: 4px;
  overflow: hidden;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.download-item:hover {
  background: var(--cream);
}

.download-item__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.download-item__name {
  font-weight: 500;
}

.download-item__meta {
  font-size: 0.75rem;
  color: var(--grey-400);
}

.download-item__icon {
  width: 20px;
  height: 20px;
  color: var(--grey-400);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--grey-200);
  padding: 48px 32px;
  overflow-y: auto;
  z-index: 100;
}

.nav__logo {
  width: 100%;
  max-width: 180px;
  height: auto;
  margin-bottom: 48px;
}

.nav__section {
  margin-bottom: 32px;
}

.nav__title {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey-400);
  margin-bottom: 16px;
}

.nav__list {
  list-style: none;
}

.nav__link {
  display: block;
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--grey-500);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav__link:hover,
.nav__link.active {
  color: var(--anthracite);
}

.has-nav .page {
  margin-left: 240px;
}

/* --- Footer --- */
.footer {
  padding: 80px var(--gutter);
  border-top: 1px solid var(--grey-200);
  text-align: center;
}

.footer__text {
  font-size: 0.75rem;
  color: var(--grey-400);
  letter-spacing: 0.05em;
}

/* --- Utilities --- */
.mt-lg { margin-top: 80px; }
.mt-xl { margin-top: 120px; }
.mb-lg { margin-bottom: 80px; }
.mb-xl { margin-bottom: 120px; }
.text-gold { color: var(--gold); }
.text-center { text-align: center; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  :root {
    --gutter: 40px;
  }

  .nav {
    display: none;
  }

  .has-nav .page {
    margin-left: 0;
  }

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

  .grid--asymmetric {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .logo-showcase {
    grid-template-columns: 1fr;
  }

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

  .guidelines-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 100px 0;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 24px;
  }

  .hero {
    padding: 80px var(--gutter);
  }

  .section {
    padding: 80px 0;
  }

  .section__header {
    margin-bottom: 48px;
  }

  .color-grid {
    grid-template-columns: 1fr;
  }
}
