/* Chemin : assets/style.css */

/* ═══════════════════════════════════════════
   VARIABLES
═══════════════════════════════════════════ */
:root {
  --yellow:      #FFD700;
  --yellow-dim:  #E6C200;
  --black:       #0C0C0C;
  --white:       #FFFFFF;
  --off-white:   #F8F8F6;
  --gray-100:    #F2F2F0;
  --gray-200:    #E5E5E2;
  --gray-400:    #ABABAB;
  --gray-600:    #6B6B6B;
  --gray-800:    #2C2C2C;

  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);

  --transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ═══════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════ */
.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 60px);
}

/* ═══════════════════════════════════════════
   HEADER / NAV
═══════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  border-bottom: 2px solid var(--yellow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav__logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  /* Le logo CESI est blanc sur fond sombre — on s'assure qu'il reste visible */
  filter: brightness(0) invert(1);
}

.nav__logo-fallback {
  align-items: center;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--yellow);
  letter-spacing: .5px;
}

.nav__logo-sep {
  display: block;
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,.2);
}

.nav__logo-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}

.nav__links {
  display: flex;
  gap: 36px;
}

.nav__links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  transition: color var(--transition);
}

.nav__links a:hover { color: var(--yellow); }

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero {
  position: relative;
  background: var(--black);
  padding-top: clamp(60px, 10vw, 100px);
  padding-bottom: clamp(60px, 10vw, 100px);
  overflow: hidden;
}

/* Pas de motif décoratif — fond uni sobre */
.hero::before { display: none; }

.hero .container { position: relative; z-index: 1; }

.hero__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 18px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(44px, 8vw, 80px);
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: -.5px;
  font-weight: 700;
}

.hero__title em {
  font-style: normal;
  color: var(--yellow);
}

.hero__subtitle {
  max-width: 480px;
  font-size: 16px;
  font-weight: 300;
  color: rgba(255,255,255,.55);
  line-height: 1.7;
}

.hero__bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: var(--yellow);
}

/* ═══════════════════════════════════════════
   SECTION SHARED
═══════════════════════════════════════════ */
.section {
  padding-block: clamp(56px, 8vw, 96px);
}

.section-header {
  margin-bottom: 44px;
}

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  color: var(--black);
  font-weight: 700;
  letter-spacing: -.2px;
}

/* ═══════════════════════════════════════════
   OUTILS GRID
═══════════════════════════════════════════ */
.tools-section {
  background: var(--white);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    box-shadow var(--transition),
    transform var(--transition),
    border-color var(--transition);
  position: relative;
  overflow: hidden;
}

/* Trait jaune en bas, révélé au hover */
.tool-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--gray-200);
}

.tool-card:hover::after { transform: scaleX(1); }

.tool-card__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--black);
}

/* La rect .icon-bg prend la couleur de la carte — noir par défaut */
.tool-card__icon svg { width: 44px; height: 44px; }
.icon-bg { fill: var(--black); }

.tool-card:hover .icon-bg { fill: var(--yellow-dim); }
.tool-card:hover .tool-card__icon svg path[stroke],
.tool-card:hover .tool-card__icon svg line,
.tool-card:hover .tool-card__icon svg circle[stroke],
.tool-card:hover .tool-card__icon svg polyline,
.tool-card:hover .tool-card__icon svg rect[stroke] {
  stroke: var(--black);
}
.tool-card:hover .tool-card__icon svg circle[fill="white"],
.tool-card:hover .tool-card__icon svg path[fill="white"] {
  fill: var(--black);
}

.tool-card__body { flex: 1; }

.tool-card__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
  letter-spacing: -.1px;
}

.tool-card__desc {
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.55;
  font-weight: 400;
}

.tool-card__arrow {
  display: inline-block;
  font-size: 20px;
  color: var(--gray-400);
  align-self: flex-end;
  transition: color var(--transition), transform var(--transition);
  line-height: 1;
}

.tool-card:hover .tool-card__arrow {
  color: var(--black);
  transform: translateX(4px);
}

/* ═══════════════════════════════════════════
   RESOURCES
═══════════════════════════════════════════ */
.resources-section {
  background: var(--off-white);
  border-top: 1px solid var(--gray-200);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.resource-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.resource-card__meta { }

.resource-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
}

.resource-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
  flex: 1;
}

.resource-card__desc {
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.6;
}

.resource-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 4px;
  padding: 10px 20px;
  background: var(--black);
  color: var(--yellow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}

.resource-card__btn:hover {
  background: var(--yellow);
  color: var(--black);
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.footer {
  background: var(--black);
  border-top: 2px solid var(--yellow);
  padding-block: 28px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__brand {
  font-weight: 700;
  font-size: 14px;
  color: var(--white);
  letter-spacing: .5px;
}

.footer__note {
  font-size: 12px;
  color: rgba(255,255,255,.35);
  letter-spacing: .5px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 640px) {
  .nav__links { display: none; }

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

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

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ═══════════════════════════════════════════
   ANIMATIONS D'APPARITION
═══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tool-card, .resource-card {
  animation: fadeUp .45s ease both;
}

.tool-card:nth-child(1) { animation-delay: .05s; }
.tool-card:nth-child(2) { animation-delay: .10s; }
.tool-card:nth-child(3) { animation-delay: .15s; }
.tool-card:nth-child(4) { animation-delay: .20s; }
.tool-card:nth-child(5) { animation-delay: .25s; }
.tool-card:nth-child(6) { animation-delay: .30s; }

.resource-card:nth-child(1) { animation-delay: .05s; }
.resource-card:nth-child(2) { animation-delay: .10s; }
.resource-card:nth-child(3) { animation-delay: .15s; }
