/* style/style_projets.css — version + claire */

:root{
  /* Fond + clair */
  --bg: #f6f7ff;
  --bg-2:#eef0ff;

  /* Cartes */
  --card: #ffffff;
  --card-soft:#f4f5ff;

  /* Texte */
  --text:#141427;
  --muted:#4b4b6b;

  /* Accent */
  --accent:#6b4dff;
  --accent-soft: rgba(107,77,255,.14);

  --radius: 18px;
  --shadow: 0 14px 40px rgba(20,20,39,.10);
}

*{ box-sizing:border-box; margin:0; padding:0; }
html, body{ height:100%; }

body{
  font-family: "Work Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 650px at 10% -15%, rgba(107,77,255,.18) 0%, transparent 60%),
    radial-gradient(900px 520px at 95% 5%, rgba(255,120,200,.12) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  line-height: 1.5;
}

img{ max-width:100%; height:auto; display:block; }
a{ color: inherit; text-decoration: none; }

/* ===== Navbar ===== */
header{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(246,247,255,.70);
  border-bottom: 1px solid rgba(20,20,39,.10);
}

.navbar{
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px;
}

.navbar a{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(107,77,255,.08);
  border: 1px solid rgba(107,77,255,.18);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.navbar a:hover{
  transform: translateY(-1px);
  background: rgba(107,77,255,.12);
  border-color: rgba(107,77,255,.35);
}

.navbar a:focus-visible{
  outline: 3px solid rgba(107,77,255,.35);
  outline-offset: 3px;
}

/* ===== Layout ===== */
main{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 16px 38px;
}

.contenaireproject{
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

/* ===== Cards ===== */
.card1{
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(244,245,255,1));
  border: 1px solid rgba(20,20,39,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* ===== Image + overlay ===== */
.image-container{
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(20,20,39,.04);
}

.image-container a{
  display: block;
  width: 100%;
  height: 100%;
}

.hover-image{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform .35s ease, filter .35s ease;
}

.overlay{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  /* overlay plus doux */
  background: rgba(20,20,39,.30);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.show-button{
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(20,20,39,.12);
  box-shadow: 0 10px 30px rgba(20,20,39,.18);
  transform: translateY(6px);
  transition: transform .2s ease;
}

.image-container a:hover .overlay,
.image-container a:focus-visible .overlay{
  opacity: 1;
}

.image-container a:hover .hover-image,
.image-container a:focus-visible .hover-image{
  transform: scale(1.08);
  filter: saturate(1.06) contrast(1.03);
}

.image-container a:hover .show-button,
.image-container a:focus-visible .show-button{
  transform: translateY(0);
}

/* Mobile : overlay toujours visible mais léger */
@media (hover: none){
  .overlay{
    opacity: 1;
    background: linear-gradient(to top, rgba(20,20,39,.40), rgba(20,20,39,.06));
  }
  .show-button{
    transform: none;
    width: 48px;
    height: 48px;
    font-size: 20px;
    background: rgba(255,255,255,.78);
  }
}

/* ===== Titre + logos ===== */
.titreimage{
  padding: 14px 16px 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.titreimage h2{
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .2px;
  flex: 1 1 180px;
  margin-right: auto;
}

.logo{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(20,20,39,.10);
  background: rgba(107,77,255,.08);
  flex: 0 0 auto;
}

.logoImg{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Description ===== */
.description{
  padding: 10px 16px 16px;
  color: var(--muted);
  font-size: .98rem;
}

.description p{ margin: 0; }
.description br{ line-height: 1.2; }

/* ===== Responsive ===== */
@media (max-width: 520px){
  main{ padding: 14px 12px 28px; }
  .navbar{ padding: 12px 12px; }

  .titreimage{ padding: 12px 12px 6px; }
  .description{
    padding: 10px 12px 14px;
    font-size: .95rem;
  }
  .titreimage h2{
    font-size: 1.05rem;
    flex-basis: 100%;
  }
}

@media (min-width: 1200px){
  .contenaireproject{ gap: 22px; }
}
