/* Card styles */
.card {
  margin: 10px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  width: 100%;
  max-width: 500px;
  max-height: 450px;
  margin-bottom: 50px;
  text-decoration: none;
}
.card-header img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
body {
  background-image: url('../images/Realisation_Pro/terre.png');
  background-repeat: repeat;
  background-size: auto;
}
.collapse-container {
  margin-bottom: 1em;
  border: 2px solid #000;
  border-radius: 10px;
  background: #8B5C2A;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  overflow: hidden;
}

/* Collapse grid: two-column responsive layout for collapse containers */
.collapse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}
.collapse-btn {
  background: #8B5C2A;
  color: #fff;
  border: none;
  padding: 0.7em 1em;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
  border-bottom: 2px solid #000;
  border-radius: 10px 10px 0 0;
}
.collapse-content {
  display: none;
  padding: 1em;
  background: #8B5C2A;
  color: #fff;
  border-radius: 0 0 10px 10px;
}
.collapse-btn.active + .collapse-content {
  display: block;
}

/* Conteneur des colonnes École/Entreprise */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Style pour les colonnes */
.section-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-column h2 {
  color: #8B5C2A;
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Style pour les cartes des sections */
.section-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.section-card-image {
  width: 100%;
  /* per-card override via --img-height (e.g. --img-height:160px) */
  height: var(--img-height, 160px);
  /* per-card fit / aspect via CSS variables */
  object-fit: var(--img-fit, cover);
  aspect-ratio: var(--img-aspect, 16/9);
  object-position: var(--img-position, center);
  padding: var(--img-padding, 0);
  border-bottom: 2px solid #8B5C2A;
  display: block;
}

/* Utility classes to modify per-card image sizing/behavior */
.img-size-120 { --img-height: 120px; }
.img-size-140 { --img-height: 140px; }
.img-size-160 { --img-height: 160px; }
.img-size-180 { --img-height: 180px; }
.img-size-200 { --img-height: 200px; }

.img-aspect-16-9 { --img-aspect: 16/9; }
.img-aspect-4-3  { --img-aspect: 4/3; }

.img-fit-cover   { --img-fit: cover; }
.img-fit-contain { --img-fit: contain; }

.img-padding-default { --img-padding: 10px; }
.img-padding-none    { --img-padding: 0; }

.img-center { --img-position: center; }

.section-card-header {
  background: #8B5C2A;
  color: #fff;
  padding: 15px 20px;
  font-weight: bold;
}

.section-card-content {
  padding: 20px;
  color: #333;
  line-height: 1.5;
  flex-grow: 1;
}

.section-card-footer {
  padding: 15px 20px;
  background: #f5f5f5;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.btn-more, .btn-site {
  display: inline-block;
  padding: 8px 20px;
  background: #8B5C2A;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.btn-more:hover, .btn-site:hover {
  background: #724B22;
  transform: translateY(-2px);
}

/* Responsive: une colonne sur mobile */
@media (max-width: 768px) {
  .sections-grid {
    grid-template-columns: 1fr;
    padding: 15px;
  }
  
  .section-column {
    gap: 15px;
  }
}