
/*  Base */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Raleway", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #222;
  background: #f9f5ff;
}

/* Titre + logo */
.title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}

.logo-portfolio {
  width: 70px;
  height: auto;
  margin-bottom: 10px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.logo-portfolio:hover {
  transform: scale(1.05);
}

.portfolio-title {
  font-size: 2rem;
  color: #8c4fd0;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.portfolio-title span {
  display: block;
  font-weight: 500;
  font-size: 1rem;
  color: #6d3fb3;
  margin-top: 4px;
}

/* Menu */
.menu {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  padding: 14px 6%;
  background: #9f5ed8;
}

.menu a {
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.menu a:hover,
.menu a.is-active {
  opacity: 1;
  text-decoration: underline;
}

/* Contenu principal */
.portfolio {
  padding: 60px 5%;
  background-color: #f9f6fc;
  color: #333;
  text-align: center;
}

.portfolio h1 {
  color: #9f5ed8;
  font-size: 2.4rem;
  margin-bottom: 0.4em;
}

.intro {
  color: #555;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Boutons */
.portfolio-links {
  text-align: center;
  margin-top: 15px;
  margin-bottom: 20px;
}

.portfolio-links .btn {
  display: inline-block;
  background-color: #9f5ed8;
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  margin: 5px;
  transition: background-color 0.3s;
}

.portfolio-links .btn:hover {
  background-color: #7e45b9;
}

/* Bouton retour (exercices)*/
.back-btn {
  display: inline-block;
  margin: 10px 0 20px;
  background-color: #8c4fd0;
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}
.back-btn:hover {
  background-color: #a46fe3;
}

/* Mes cours */
.courses {
  margin-top: 32px;
}

/* Carte générique */
.course-card {
  display: block;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  text-decoration: none;
  color: #222;
  transition: transform .15s ease, box-shadow .15s ease;
  overflow: hidden;
}
.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
}
.course-card__content {
  padding: 20px 22px;
}
.course-card h2,
.course-card h3 { 
  margin: 0 0 6px 0; 
  color: #111;
}
.course-card p { 
  margin: 0; 
  color: #444;
}

/* Grand rectangle STIC I */
.course-card--wide {
  padding: 0;
  margin-bottom: 18px;
}
.course-card--wide .course-card__content {
  padding: 26px 28px;
}
.course-card--wide h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
}

/* Grille des carrés */
.course-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Couleurs carré */
.violet  { background: #9f5ed8; color: #fff; }
.teal    { background: #2fedda; color: #111; }
.pink    { background: #f2b7e2; color: #111; }
.gold    { background: #ffd77a; color: #111; }
.gray    { background: #71e8fb; color: #111; }

.violet h2, .violet h3, .violet p { color: #fff; }

footer {
  text-align: center;
  margin-top: 60px;
  padding-top: 20px;
  border-top: 2px solid #e0d0f5;
  color: #777;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 700px) {
  .course-card--wide .course-card__content { padding: 22px; }
  .logo-portfolio { width: 60px; }
}

/*  Grille des exercices */
.exercise-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

/* Carte violette arrondie */
.card{
  border-radius: 16px;
  padding: 18px;
  border: 1px solid #eadcfb;
  background: linear-gradient(135deg, #f7f1ff 0%, #efe6ff 100%);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover{
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

.card h3{
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: #6e3fb1; /* titre bien lisible */
}

/* Liens dans la carte */
.card a{
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  margin: 4px 0;
  background: rgba(159, 94, 216, .12);
  color: #5b2ea1;
  border: 1px solid rgba(159, 94, 216, .25);
  transition: background .15s ease, transform .15s ease;
}
.card a:hover{
  background: rgba(159, 94, 216, .18);
  transform: translateY(-1px);
}

/* Variations de teintes */
.violet-1{ background: linear-gradient(135deg,#f7f1ff,#efe6ff); }
.violet-2{ background: linear-gradient(135deg,#f6eeff,#ece2ff); }
.violet-3{ background: linear-gradient(135deg,#f5ecff,#e8ddff); }
.violet-4{ background: linear-gradient(135deg,#f4eaff,#e3d7ff); }

/* Responsive – un peu plus d’air sur mobile */
@media (max-width: 600px){
  .card h3{ font-size: 1.05rem; }
  .card{ padding: 16px; }
}
/* Petit Thymio kawaii dans la carte Ex.3 */
.mini-thymio {
  width: 70px;
  height: auto;
  display: block;
  margin: 10px auto 0; /* espace au-dessus + centré */
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.15));
  animation: floaty 3s ease-in-out infinite; /* même effet que dans la page exercice 3 */
  transition: transform .2s ease;
}

.mini-thymio:hover {
  transform: translateY(-3px) scale(1.05);
}
@keyframes floaty {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}
