:root {
  --primary: #f58220;
  --secondary: #ffffff;
  --accent: #2dbf71;
  --ink: #0f172a;
  --muted: #475569;
  --bg: #0b0f1a;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--ink); background: var(--secondary); }
a { color: var(--primary); text-decoration: none; }
.container { width: min(1200px, 92vw); margin: 0 auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,0.9); backdrop-filter: blur(8px); border-bottom: 1px solid #eef2f7; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .6rem 0; }
.brand { display: flex; gap: .8rem; align-items: center; }
.logo { height: 44px; width: auto; border-radius: .5rem; }
.brand-title { margin: 0; font-size: 1.1rem; font-weight: 800; letter-spacing: .2px; }
.brand-tagline { margin: 0; color: var(--muted); font-size: .9rem; }
.main-nav a { margin-left: 1rem; font-weight: 600; color: #0f172a; }
.main-nav a:hover { color: var(--primary); }

/* Hero */
.hero { position: relative; min-height: 70vh; display: grid; place-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.bg-slider { position: absolute; inset: 0; }
.bg-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease; }
.bg-slide.active { opacity: 1; }
.hero-blur { position: absolute; inset: 0; backdrop-filter: blur(2px) brightness(.85); }
.hero-content { position: relative; z-index: 2; text-align: center; color: white; }
.hero-title { font-size: clamp(1.8rem, 4vw, 3rem); margin: 0 0 .6rem; text-shadow: 0 4px 30px rgba(0,0,0,.4); }
.hero-subtitle { margin: 0 0 1.2rem; opacity: .95; }
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .7rem 1rem; border-radius: 999px; border: 1px solid transparent; font-weight: 700; transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.btn-primary { background: var(--primary); color: white; }
.btn-ghost { background: #f8fafc; color: #0f172a; border-color: #e2e8f0; }

/* Cards */
.apps-section { padding: 3rem 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.filters { display: flex; gap: .6rem; align-items: center; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.card { border: 1px solid #eef2f7; border-radius: 1rem; overflow: hidden; background: white; box-shadow: 0 10px 30px rgba(2,8,23,0.04); transform: translateY(0); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(2,8,23,0.08); }
.card-cover { position: relative; display: block; aspect-ratio: 16/9; background: var(--tile, var(--primary)); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-ribbon { position: absolute; top: .6rem; left: .6rem; background: rgba(0,0,0,.65); color: white; padding: .2rem .5rem; border-radius: .5rem; font-size: .75rem; }
.card-body { padding: 1rem; }
.card-title { margin: 0 0 .4rem; font-size: 1.1rem; }
.card-desc { margin: 0 0 .8rem; color: #334155; min-height: 2.5em; }
.card-actions { display: flex; flex-wrap: wrap; gap: .4rem; }

/* About */
.about-section { background: #0b0f1a; color: white; padding: 3rem 0; }
.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; }
.about-badges { display: flex; gap: .6rem; flex-wrap: wrap; }
.badge { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; padding: .5rem .8rem; border-radius: .8rem; font-weight: 700; }

/* App detail */
/* --- Hero détail app : image de fond + overlay sombre --- */
.app-hero {
  position: relative;
  padding: 2.4rem 0;
  color: #fff;
  background-color: #0b0f1a;             /* fallback si pas d'image */
  background-size: cover;                 /* image couvre tout */
  background-position: center;            /* centrée */
  background-repeat: no-repeat;
  min-height: 38vh;                       /* hauteur confortable */
  display: flex;
  align-items: center;                     /* vertical center du contenu */
}

/* voile noir translucide au-dessus de l'image */
.app-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .80);         /* opacité à ajuster si besoin (.35 → .55) */
}

/* le contenu reste au-dessus du voile */
.app-hero .container {
  position: relative;
  z-index: 1;
}

.app-title   { margin: 0; font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.app-subtitle{ margin-top: .5rem; opacity: .95; max-width: 72ch; }
.back-link   { color: #fff; opacity: .9; }

.app-subtitle { margin-top: .4rem; opacity: .95; }
.back-link { color: white; opacity: .9; }
.app-gallery { padding: 2rem 0 3rem; }


/* ====== CARROUSEL BOOTSTRAP — FORMAT UNIFORME ====== */

/* Le conteneur du carrousel garde tes coins/bordures */
.app-gallery .carousel {
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  background: #fff;
}

/* Chaque item est le cadre du slide */
.carousel-item {
  position: relative;
  background: #fff;
}

/* Cadre uniforme: ratio 16:9 + hauteur bornée pour tous les écrans */
.ratio.carousel-box {
  /* 16:9 = 56.25% ; ratio Bootstrap s’occupe de la hauteur */
  --bs-aspect-ratio: 56.25%;
  max-height: clamp(320px, 60vh, 720px);
  background: #f8fafc;       /* fond neutre autour de l'image */
  border-radius: 1rem;        /* même esthétique qu’avant */
}

/* L’image occupe 100% du cadre ratio sans déformation */
.ratio.carousel-box > img {
  position: absolute;         /* géré par .ratio de Bootstrap */
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;        /* jamais étirée / coupée */
  display: block;
  margin: 0 auto;
}

/* Caption lisible: fond sombre léger + rayon bas */
.carousel .caption-overlay{
  left: 0; right: 0; bottom: 0;
  padding: .6rem .9rem;
  background: rgba(0,0,0,.65);     /* ← plus sombre que le dégradé */
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
  /* optionnels pour un rendu premium */
  backdrop-filter: blur(2px);
}
.carousel .caption-overlay p{
  color: #0f172a !important;
  text-align:center; margin:0;
}

/* Option: arrondir la base du caption pour suivre le cadre */
.carousel .carousel-caption.caption-overlay {
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
  padding-bottom: .8rem;
}

/* Petits écrans: on réduit un peu la hauteur */
@media (max-width: 480px) {
  .ratio.carousel-box { max-height: clamp(220px, 52vh, 560px); }
}


.app-description { margin-top: 1rem; color: #0f172a; background: white; border: 1px solid #e5e7eb; border-radius: 1rem; padding: 1rem; line-height: 1.6; }

/* Footer */
.site-footer { border-top: 1px solid #e5e7eb; padding: 1.4rem 0; text-align: center; background: #fff; }

/* Cursor FX */
#cursor { position: fixed; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); pointer-events: none; mix-blend-mode: multiply; transform: translate(-50%, -50%); z-index: 1000; opacity: .8; transition: transform .08s ease, width .2s, height .2s, opacity .2s; }
a:hover ~ #cursor, button:hover ~ #cursor, .btn:hover ~ #cursor { width: 22px; height: 22px; opacity: .9; }

/* Reveal animations */
[data-animate] { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
[data-animate].visible { opacity: 1; transform: translateY(0); }

/* Inputs / Pagination */
select { padding: .5rem .8rem; border-radius: .6rem; border: 1px solid #e5e7eb; background: #fff; }
.pagination { display: flex; gap: .8rem; align-items: center; justify-content: center; margin-top: 1rem; }
