/* ========= Components ========= */
.card{
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}
.card h3{ margin: 6px 0 8px; letter-spacing:-.02em; }
.card p{ margin: 0; color: var(--muted); line-height:1.55; }

.grid{
  display:grid;
  gap: 14px;
}
.grid.cols-2{ grid-template-columns: repeat(2, 1fr); }
.grid.cols-3{ grid-template-columns: repeat(3, 1fr); }
.grid.cols-4{ grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px){
  .grid.cols-3, .grid.cols-4{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px){
  .grid.cols-2, .grid.cols-3, .grid.cols-4{ grid-template-columns: 1fr; }
}

/* Portfolio cards */
.project{
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}
.project .dates{
  margin: 0 0 12px;
  color: var(--muted2);
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.project .logo{
  width: 120px;
  height: auto;
  margin: 10px auto 8px;
  opacity: .9;
}
.project ul{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

/* Social rows (fix huge icons forever) */
.Logo, .logo-row, .social-row{
  display:flex;
  align-items:center;
  gap: 10px;
}
.Logo img, .logo-row img, .social-row img{
  width: 22px !important;
  height: 22px !important;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Headings used in existing pages */
.page-content header h1{
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  letter-spacing: -.04em;
}
.page-content{
  padding-bottom: 10px;
}


/* Contact form layout */
.contact-card{ margin-top: 14px; }
.contact-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px){
  .contact-grid{ grid-template-columns: 1fr; }
}
.field{ display:flex; flex-direction:column; gap: 6px; }
.field--full{ grid-column: 1 / -1; }
.actions{ display:flex; gap: 10px; align-items:center; flex-wrap:wrap; margin-top: 6px; }
.help{ color: var(--muted2); font-size: 12px; margin: 0; }

.alert{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--surface2);
  color: var(--text);
  margin: 10px 0;
  font-weight: 800;
}
.alert.ok{ border-color: rgba(34,211,238,.35); }
.alert.err{ border-color: rgba(239,68,68,.45); }

/* ===== Certifications / Licences ===== */
.certifications img,
.licences img {
  max-width: 120px;      /* taille max logo */
  max-height: 120px;
  width: auto;
  height: auto;

  display: block;
  margin: 14px auto 0;  /* centré */
  object-fit: contain;  /* 🔑 empêche toute déformation */
}

.certifications .card,
.licences .card {
  display: flex;
  flex-direction: column;
}

.certifications .card img,
.licences .card img {
  margin-top: auto;
}
.card img{
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
}

/* Logos - Licences & Certifications */
.certifs .project img{
  max-width: 120px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 14px auto 0;
}

.certifs .project{
  display: flex;
  flex-direction: column;
}

.certifs .project img{
  margin-top: auto;
}
