/* ====== Design tokens ====== */
:root{
  --brand: #f29a1e;          /* orange principal */
  --brand-ink: #cf7c0f;      /* orange foncé pour hovers */
  --ink: #0f0f0f;            /* texte quasi noir */
  --muted: #6b6b6b;          /* texte secondaire */
  --bg: #ffffff;             /* fond page */
  --soft: #fdebd4;           /* fond pêche pour la bannière */
  --radius-xl: 22px;         /* gros arrondis */
  --radius-xxl: 26px;
  --shadow: 0 6px 20px rgba(0,0,0,.08);
  --max: 1200px;
  --gap: 24px;
}

/* ====== Base ====== */
*{box-sizing:border-box}
html,body{margin:0}
body{
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background:var(--bg);
  line-height:1.65;
}

/* ====== Header ====== */
.header{
  position:sticky; top:0; z-index:30;
  background:#fff; box-shadow:0 2px 12px rgba(0,0,0,.04);
}
.header__inner{
  max-width:var(--max); margin:auto;
  padding:14px var(--gap);
  display:flex; align-items:center; gap:20px;
}
.brand{
  display:flex; align-items:center; gap:12px; text-decoration:none;
}
.brand__logo{
  width:42px; height:42px; border-radius:50%;
  background: conic-gradient(from 0deg, var(--brand) 0 25%, #000 25% 50%, var(--brand) 50% 75%, #000 75% 100%);
  display:inline-block;
}
.brand__logo-img{
  height:52px; width:auto; object-fit:contain;
}
.brand__name{
  font-family:Poppins, sans-serif; font-weight:700; font-size:28px;
  color:var(--ink);
}
.nav{ margin-left:auto; display:flex; align-items:center; gap:10px; }
.nav a{
  text-decoration:none; color:var(--ink);
  padding:10px 14px; border-radius:999px; font-weight:500;
}
.nav a:hover{ background:#f6f6f6; }
.cta{
  background:var(--brand); color:#fff; text-decoration:none;
  padding:10px 16px; border-radius:999px; font-weight:700;
  box-shadow:var(--shadow);
}
.cta:hover{ background:var(--brand-ink); }

.burger{ display:none; margin-left:auto; cursor:pointer; }
.burger span{display:block;width:26px;height:3px;background:#222;border-radius:2px;margin:5px 0;transition:transform .2s}

/* ====== Banner ====== */
.banner{
  max-width:var(--max); margin:24px auto 32px; padding:42px;
  background:var(--soft); border-radius:var(--radius-xxl); position:relative; overflow:hidden;
}
.banner__decor{
  position:absolute; right:-40px; top:-40px; width:260px; height:260px; opacity:.8;
  background:
    radial-gradient(circle at 50% 50%, var(--brand) 18px, transparent 19px) 50% 50%/120px 120px no-repeat,
    conic-gradient(from 0deg, var(--brand) 0 12.5%, #000 12.5% 25%, var(--brand) 25% 37.5%, #000 37.5% 50%, var(--brand) 50% 62.5%, #000 62.5% 75%, var(--brand) 75% 87.5%, #000 87.5% 100%);
  border-radius:50%;
  filter: blur(.2px);
}
.banner h1{
  margin:0; font-family:Poppins, sans-serif; font-size:64px; line-height:1.05; letter-spacing:-.5px;
}

/* ====== Welcome Kiwi Banner ====== */
.welcome-kiwi{
  max-width:1400px; margin:24px auto 32px; padding:0 var(--gap);
}

.welcome-kiwi__inner{
  display:flex; align-items:center; gap:32px;
  background:#f5f5f5; padding:32px; border-radius:var(--radius-xl);
  position:relative;
  
  /* VARIANTE 1 : Fond gris clair + bordure gauche + ombre orange renforcée (ACTIVE) */
  box-shadow:0 8px 32px rgba(242, 154, 30, 0.25), 0 2px 8px rgba(242, 154, 30, 0.15);
  border-left:6px solid var(--brand);
  
  /* VARIANTE 2 : Bordure complète orange (DÉCOMMENTÉE pour tester) */
  /* border:3px solid var(--brand); */
  /* box-shadow:0 2px 12px rgba(0,0,0,0.08); */
  
  /* VARIANTE 3 : Fond dégradé orange subtil (DÉCOMMENTÉE pour tester) */
  /* background:linear-gradient(135deg, #fff 0%, #fff5e6 100%); */
  /* border-left:6px solid var(--brand); */
  /* box-shadow:0 4px 16px rgba(242, 154, 30, 0.12); */
  
  /* VARIANTE 4 : Bordure orange épaisse + ombre portée (DÉCOMMENTÉE pour tester) */
  /* border:4px solid var(--brand); */
  /* box-shadow:0 8px 24px rgba(242, 154, 30, 0.2), 0 0 0 1px rgba(242, 154, 30, 0.1); */
  
  /* VARIANTE 5 : Accent orange en haut (DÉCOMMENTÉE pour tester) */
  /* border-top:6px solid var(--brand); */
  /* box-shadow:0 4px 16px rgba(0,0,0,0.1); */
  /* background:linear-gradient(to bottom, rgba(242, 154, 30, 0.03) 0%, #fff 10%); */
}
.welcome-kiwi__image{
  flex-shrink:0;
}
.welcome-kiwi__img{
  width:300px; height:300px; object-fit:cover;
  border-radius:16px; box-shadow:0 4px 12px rgba(0,0,0,0.1);
}
.welcome-kiwi__content{
  flex:1;
}
.welcome-kiwi__title{
  margin:0 0 16px 0; font-family:Poppins, sans-serif;
  font-size:36px; line-height:1.2; color:var(--ink);
}
.welcome-kiwi__description{
  margin:0; font-size:16px; line-height:1.6; color:var(--muted);
}
.welcome-kiwi__description a{
  color:var(--brand); text-decoration:none; font-weight:500;
  border-bottom:1px solid transparent; transition:border-color 0.2s;
}
.welcome-kiwi__description a:hover{
  border-bottom-color:var(--brand);
}
.welcome-kiwi__description strong{
  font-weight:600; color:var(--ink);
}
.welcome-kiwi__description em{
  font-style:italic;
}

/* Responsive: empiler sur mobile */
@media (max-width:768px){
  .welcome-kiwi__inner{
    flex-direction:column; text-align:center;
  }
  .welcome-kiwi__img{
    width:200px; height:200px;
  }
  .welcome-kiwi__title{
    font-size:28px;
  }
}

/* ====== Layout ====== */
.container{ max-width:1400px; margin:auto; padding:0 var(--gap); }
.grid{
  display:grid; grid-template-columns: minmax(0,2fr) minmax(260px,1fr);
  gap:40px; align-items:start;
}

/* ====== Article ====== */
.card{
  background:#fff; border-radius:var(--radius-xxl); box-shadow:var(--shadow);
  overflow:hidden;
}
.cover{
  display:block; width:100%; aspect-ratio: 16/9; object-fit:cover;
}
.article{ padding:28px 28px 10px; }
.article h1{
  font-family:Poppins, sans-serif; font-weight:700; font-size:48px; line-height:1.1; letter-spacing:-.3px; margin:10px 0 18px;
}
.meta{
  display:flex; flex-wrap:wrap; gap:16px; color:var(--muted); font-size:14px; margin-bottom:20px;
}
.meta i{ color:var(--brand); margin-right:6px; }
.article h2{
  font-family:Poppins, sans-serif; font-size:28px; margin:28px 0 10px;
}
.article p{ margin:12px 0; }
.sep{ height:3px; width:120px; background:var(--brand); border-radius:3px; margin:28px 0; opacity:.6; }

/* ====== Sidebar ====== */
.side-group{
  background:#fff; border-radius:var(--radius-xl); box-shadow:var(--shadow);
  padding:22px;
}
.side-title{
  display:flex; align-items:center; gap:10px; margin:0 0 14px;
  font-family:Poppins, sans-serif; font-size:22px;
}
.side-title:before{
  content:""; width:18px; height:18px; border:4px solid var(--brand); border-radius:50%;
}
.recent{
  display:grid; gap:16px;
}
.recent a{
  display:grid; grid-template-columns:56px 1fr; gap:12px; align-items:center;
  text-decoration:none; color:var(--ink);
}
.recent img{
  width:56px; height:56px; object-fit:cover; border-radius:12px;
}
.recent small{ color:var(--muted); display:block; margin-top:2px; }

/* ====== Share widget ====== */
.share{
  margin-top:22px; display:grid; gap:10px;
}
.share .chip{
  display:flex; align-items:center; gap:10px;
  background:var(--brand); color:#fff; text-decoration:none;
  border:none; padding:10px 14px; border-radius:12px; font-weight:600;
  box-shadow:var(--shadow);
}
.share .chip:hover{ background:var(--brand-ink); }

/* ====== Footer ====== */
.footer{
  margin-top:60px; background:#111; color:#fff; padding:40px var(--gap);
}
.footer__inner{
  max-width:var(--max); margin:auto;
  display:grid; grid-template-columns: 1.2fr 1fr 1fr; gap:30px;
}
.footer h4{ font-family:Poppins, sans-serif; margin:0 0 14px; }
.footer a{ color:#fff; text-decoration:none; opacity:.9 }
.footer a:hover{ text-decoration:underline }
.brand--footer{
  display:flex; align-items:center; gap:14px;
}
.brand--footer .brand__logo{ background: radial-gradient(circle at 30% 30%, var(--brand) 0 40%, #000 40% 70%, var(--brand) 70% 100%); }
.social a{
  display:inline-flex; width:38px; height:38px; align-items:center; justify-content:center;
  border-radius:10px; background:var(--brand); margin-right:8px; color:#fff;
}

/* ====== Formulaire ====== */
input:focus, textarea:focus{
  outline:none; border-color:var(--brand) !important;
  box-shadow:0 0 0 3px rgba(242, 154, 30, 0.1);
}
button:hover{ background:var(--brand-ink) !important; }

/* ====== Alertes ====== */
.alert{
  padding:16px 20px;
  border-radius:12px;
  margin-bottom:20px;
  line-height:1.6;
  display:flex;
  align-items:center;
  gap:12px;
}
.alert-error{
  background:#f8d7da;
  border-left:4px solid #dc3545;
  color:#721c24;
}
.alert-success{
  background:#d4edda;
  border-left:4px solid #28a745;
  color:#155724;
}
.alert-info{
  background:#d1ecf1;
  border-left:4px solid #0dcaf0;
  color:#0c5460;
}
.alert-warning{
  background:#fff3cd;
  border-left:4px solid #ffc107;
  color:#856404;
}

/* ====== Utilitaires ====== */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:var(--brand);
  color:#fff;
  text-decoration:none;
  padding:12px 20px;
  border-radius:12px;
  font-weight:600;
  box-shadow:var(--shadow);
  transition:background 0.2s;
  border:none;
  cursor:pointer;
  font-size:16px;
}
.btn:hover{ background:var(--brand-ink); }
.btn.outline{
  background:transparent;
  border:2px solid var(--brand);
  color:var(--brand);
}
.btn.outline:hover{
  background:var(--brand);
  color:#fff;
}
.btn.small{
  padding:8px 16px;
  font-size:14px;
}
.muted{
  color:var(--muted);
}
.stack{
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* ====== Cartes Applications ====== */
.app-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 2px solid transparent;
}

.app-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

.app-card--active {
  border-color: rgba(76, 175, 80, 0.2);
}

.app-card--active:hover {
  border-color: rgba(76, 175, 80, 0.4);
}

.app-card--locked {
  background: #f8f9fa;
  opacity: 0.85;
}

.app-card--locked:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.app-card--admin {
  border-color: rgba(242, 154, 30, 0.3);
}

.app-card--admin:hover {
  border-color: rgba(242, 154, 30, 0.6);
}

.app-card__lock-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #666;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 2;
}

.app-card__icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.app-card__title {
  font-family: Poppins, sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--ink);
  line-height: 1.3;
}

.app-card__description {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 20px 0;
  flex: 1;
  min-height: 60px;
}

.app-card__footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.app-card__footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.app-card__badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.app-card__badge--success {
  background: rgba(76, 175, 80, 0.1);
  color: #2e7d32;
}

.app-card__badge--info {
  background: rgba(33, 150, 243, 0.1);
  color: #1565c0;
}

.app-card__badge--purple {
  background: rgba(156, 39, 176, 0.1);
  color: #6a1b9a;
}

.app-card__badge--locked {
  background: rgba(0, 0, 0, 0.05);
  color: #999;
}

.app-card__btn {
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-card__register-link {
  text-align: center;
  margin-top: 4px;
}

.app-card__register-link a {
  font-size: 13px;
  color: var(--brand);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
  font-weight: 500;
}

.app-card__register-link a:hover {
  color: var(--brand-ink);
  text-decoration: underline;
}

.app-card__btn:hover {
  background: var(--brand-ink);
  transform: translateX(2px);
}

.app-card__btn--cta {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
}

.app-card__btn--cta:hover {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
}

.app-card__btn--register {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.app-card__btn--register:hover {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

.app-card--locked .app-card__btn:not(.app-card__btn--register):not(.app-card__btn--cta) {
  background: #e0e0e0;
  color: #666;
}

.app-card--locked .app-card__btn--cta {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: #fff;
}

/* Bouton d'inscription - rouge - priorité maximale */
.app-card--locked .app-card__btn.app-card__btn--register,
.app-card__btn.app-card__btn--register,
a.app-card__btn.app-card__btn--register {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
  background-color: #dc3545 !important;
  color: #fff !important;
  border: none !important;
}

.app-card--locked .app-card__btn.app-card__btn--register:hover,
.app-card__btn.app-card__btn--register:hover,
a.app-card__btn.app-card__btn--register:hover {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
  background-color: #c82333 !important;
  color: #fff !important;
}

/* ====== Grille Applications ====== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .apps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .app-card {
    padding: 24px;
  }
  
  .app-card__footer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .app-card__btn {
    width: 100%;
    justify-content: center;
  }
}

/* ====== Responsive ====== */
@media (max-width: 1024px){
  .article h1{ font-size:42px }
  .grid{ grid-template-columns: 1fr }
}
@media (max-width: 820px){
  .banner h1{ font-size:52px }
  .nav{ display:none }
  .burger{ display:block }
}
@media (max-width: 520px){
  .banner{ padding:30px }
  .banner h1{ font-size:40px }
  .article h1{ font-size:34px }
  .banner > div{ flex-direction:column; align-items:flex-start; gap:12px; }
}

