/* ===== Portail Intranet CTC Artisan Culinaire ===== */
/* Charte design : voir 01-GUIDE-DESIGN.md           */

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600;700&display=swap');

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

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

body {
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #F5F6F8;
  color: #1A1A2E;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Header === */
header {
  background: linear-gradient(135deg, #132030 0%, #1c3a52 100%);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.03) 0%, transparent 50%);
  pointer-events: none;
}

.header-logo {
  height: 64px;
  width: auto;
  margin-bottom: 0.75rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

header p {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.25rem;
}

/* === Main / Tile Grid === */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  width: 100%;
}

/* === Tile === */
.tile {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(19, 32, 48, 0.08);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.tile-active {
  cursor: pointer;
}

.tile-active a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tile-active:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(19, 32, 48, 0.15);
}

/* === Tile Icon Container === */
.tile-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(19, 32, 48, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: all 0.3s ease;
}

.tile-active:hover .tile-icon {
  background: #132030;
}

.tile-active:hover .tile-icon svg {
  filter: brightness(0) invert(1);
}

/* === Tile Content === */
.tile-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1A1A2E;
  margin-bottom: 0.25rem;
}

.tile-desc {
  font-size: 0.875rem;
  font-weight: 400;
  color: #6B7280;
  line-height: 1.4;
}

/* === Disabled Tile === */
.tile-disabled {
  cursor: default;
  background: #F0F0F5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tile-disabled .tile-icon {
  background: rgba(156, 163, 175, 0.15);
}

.tile-disabled .tile-icon svg {
  opacity: 0.5;
}

.tile-disabled .tile-title {
  color: #9CA3AF;
}

.tile-disabled .tile-desc {
  color: #B0B7C3;
}

.tile-disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.badge-coming {
  display: inline-block;
  background: rgba(156, 163, 175, 0.2);
  color: #9CA3AF;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-top: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === Footer === */
footer {
  background: #132030;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

footer p {
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}

/* === Responsive === */
@media (max-width: 1023px) {
  .tile-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
  }

  header h1 { font-size: 1.75rem; }
}

@media (max-width: 639px) {
  .tile-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  header {
    padding: 2rem 1rem 1.5rem;
  }

  header h1 { font-size: 1.5rem; }

  .header-logo { height: 52px; }

  main { padding: 2rem 1rem; }

  .tile { padding: 1.5rem 1rem; }
}

/* === Selection (consistency) === */
::selection {
  background: rgba(19, 32, 48, 0.2);
  color: #132030;
}
