:root{
  --ch-bg1: #fff7fb;
  --ch-bg2: #f1fbff;
  --ch-ink: #1c2430;
  --ch-muted: rgba(28,36,48,.72);

  --ch-card: rgba(255,255,255,.78);
  --ch-border: rgba(28,36,48,.12);

  --ch-primary: #ff6fa6;
  --ch-primary2:#7b61ff;
  --ch-accent: #2ec4b6;

  --ch-radius: 18px;
  --ch-shadow: 0 10px 30px rgba(28,36,48,.10);
}

body.champa{
  margin:0;
  color: var(--ch-ink);
  font-family: ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 15% 15%, rgba(255,111,166,.18), transparent 60%),
    radial-gradient(900px 500px at 85% 25%, rgba(123,97,255,.14), transparent 62%),
    radial-gradient(700px 420px at 40% 85%, rgba(46,196,182,.13), transparent 60%),
    linear-gradient(135deg, var(--ch-bg1), var(--ch-bg2));
  min-height: 100vh;
}

.ch-wrap{
  max-width: 1100px;
  margin: 18px auto;
  padding: 0 14px 28px;
}

.ch-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;

  padding: 14px 14px;
  border: 1px solid var(--ch-border);
  border-radius: calc(var(--ch-radius) + 6px);
  background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,255,255,.62));
  box-shadow: var(--ch-shadow);
  position: sticky;
  top: 10px;
  backdrop-filter: blur(8px);
  z-index: 10;
}

.ch-brand{
  display:flex;
  align-items:center;
  gap: 12px;
}

.ch-badge{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ch-primary), var(--ch-primary2));
  box-shadow: 0 10px 22px rgba(123,97,255,.18);
  position: relative;
}
.ch-badge::after{
  content:"";
  position:absolute;
  inset: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.55);
  transform: rotate(10deg);
}

.ch-title h1{
  margin:0;
  font-size: 1.25rem;
  line-height:1.1;
}
.ch-title .sub{
  margin-top:4px;
  font-size:.92rem;
  color: var(--ch-muted);
}

/* Titre special demandé */
.ch-hero{
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(28,36,48,.10);
  background: rgba(255,255,255,.70);
  box-shadow: var(--ch-shadow);
}
.ch-hero h2{
  margin:0;
  font-size: 1.35rem;
}
.ch-hero .hint{
  margin-top:6px;
  color: var(--ch-muted);
  font-size:.95rem;
}

.ch-actions{ display:flex; gap:10px; flex-wrap:wrap; }

.ch-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--ch-border);
  background: rgba(255,255,255,.72);
  color: var(--ch-ink);
  text-decoration:none;
  box-shadow: 0 8px 18px rgba(28,36,48,.08);
  transition: transform .08s ease, box-shadow .12s ease, background .12s ease;
}
.ch-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(28,36,48,.10);
  background: rgba(255,255,255,.84);
}
.ch-btn.primary{
  border: none;
  color: white;
  background: linear-gradient(135deg, var(--ch-primary), var(--ch-primary2));
}
.ch-btn.ghost{
  background: rgba(255,255,255,.0);
}

.ch-card{
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--ch-radius);
  border: 1px solid var(--ch-border);
  background: var(--ch-card);
  box-shadow: var(--ch-shadow);
}

.ch-form label{
  display:block;
  font-size:.92rem;
  color: var(--ch-muted);
  margin-bottom:6px;
}
.ch-form input,
.ch-form select,
.ch-form textarea{
  width:100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(28,36,48,.14);
  background: rgba(255,255,255,.85);
  color: var(--ch-ink);
  outline: none;
}
.ch-form input:focus,
.ch-form select:focus,
.ch-form textarea:focus{
  border-color: rgba(255,111,166,.55);
  box-shadow: 0 0 0 4px rgba(255,111,166,.14);
}

.ch-grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 780px){
  .ch-grid2{ grid-template-columns: 1fr; }
}

.ch-pill{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(28,36,48,.12);
  background: rgba(255,255,255,.65);
  color: var(--ch-muted);
  font-size:.85rem;
}

/* Table responsive: desktop table / mobile cards */
.ch-table{
  width:100%;
  border-collapse: collapse;
}
.ch-table th, .ch-table td{
  padding: 10px 10px;
  border-bottom: 1px dashed rgba(28,36,48,.16);
  text-align:left;
}
.ch-table th{
  font-size:.9rem;
  color: var(--ch-muted);
  font-weight:600;
}
.ch-table td.actions{
  white-space: nowrap;
  text-align:right;
}

@media (max-width: 700px){
  .ch-table thead{ display:none; }
  .ch-table tr{
    display:block;
    border: 1px solid rgba(28,36,48,.12);
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 10px;
    background: rgba(255,255,255,.82);
  }
  .ch-table td{
    display:flex;
    justify-content:space-between;
    gap: 12px;
    border-bottom: none;
    padding: 8px 6px;
  }
  .ch-table td::before{
    content: attr(data-label);
    font-size:.88rem;
    color: var(--ch-muted);
  }
  .ch-table td.actions{
    justify-content:flex-end;
  }
}

.ch-alert{
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--ch-border);
  background: rgba(255,255,255,.85);
}
.ch-alert.ok{ border-color: rgba(53,208,127,.35); }
.ch-alert.err{ border-color: rgba(255,90,101,.35); }
/* Evite les débordements */
*{ box-sizing:border-box; }
.ch-card{ overflow:hidden; }

/* Inputs mieux contenus */
.ch-form input,
.ch-form select,
.ch-form textarea{
  max-width: 100%;
  min-width: 0;
}

/* Textareas plus jolies */
.ch-form textarea{
  resize: vertical;
}

/* Titres un peu plus “classe” */
.ch-card h2{
  margin-top: 0;
  letter-spacing: .2px;
}

/* Petites sections plus aérées */
.ch-form h2{
  margin: 0 0 12px 0;
}
/* =========================
   Dégradé classes maternelle
   Accueil -> M3
   ========================= */

.row-accueil{
  background: rgba(255, 240, 250, 0.35);
}

.row-m1{
  background: rgba(255, 200, 235, 0.35);
}

.row-m2{
  background: rgba(255, 150, 215, 0.35);
}

.row-m3{
  background: rgba(255, 110, 190, 0.35);
}

/* hover harmonisé */
.ch-table tr:hover{
  filter: brightness(1.05);
  transition: 0.15s ease;
}
.ch-filter-check{
  margin-top:14px;
  padding:12px 16px;
  border-radius:16px;
  background:rgba(255,255,255,.65);
  border:1px solid rgba(28,36,48,.10);
}

.ch-filter-check label{
  display:flex;
  align-items:center;
  gap:12px;
  cursor:pointer;
}

.ch-filter-check input{
  width:18px;
  height:18px;
}

.ch-filter-check small{
  display:block;
  font-size:.85rem;
  color:rgba(28,36,48,.6);
  font-weight:400;
}
/* Empêche les liens "bleu/violet soulignés" dans les cartes */
.ch-menu-card{
  color: inherit;
  text-decoration: none;
}
.ch-menu-card:visited{
  color: inherit;
}
/* ===========================
   CHAMPA — UI cards (menu)
   =========================== */

.ch-section-title{
  margin: 18px 0 10px;
  font-size: 1.05rem;
  color: rgba(28,36,48,.78);
  font-weight: 700;
  letter-spacing: .2px;
}

.ch-menu-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap:16px;
  margin-top:10px;
}

.ch-menu-card{
  padding:18px;
  border-radius:20px;
  border:1px solid rgba(28,36,48,.12);
  background:rgba(255,255,255,.78);
  box-shadow:0 10px 25px rgba(28,36,48,.08);
  text-decoration:none;
  color:inherit;
  transition:.15s ease;
  display:block;
  overflow:hidden;
}

.ch-menu-card:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 30px rgba(28,36,48,.12);
}

.ch-menu-card h3{
  margin:0 0 8px 0;
  font-size:1.1rem;
}

.ch-menu-card p{
  margin:0;
  font-size:.95rem;
  color:rgba(28,36,48,.7);
}

/* évite le lien violet "visited" */
.ch-menu-card:visited{ color:inherit; }

.ch-tag{
  display:inline-block;
  margin-top:10px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(28,36,48,.12);
  background:rgba(255,255,255,.6);
  color:rgba(28,36,48,.7);
  font-size:.85rem;
}

/* petit bonus: mise en avant du titre + ligne badges */
.prepa-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.prepa-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
}
/* ===========================
   PRÉPAS — Style cartes premium
   =========================== */

.prepas-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap:22px;
  margin-top:20px;
}

.prepa-card{
  border-radius:22px;
  overflow:hidden;
  background:rgba(255,255,255,.92);
  box-shadow:0 15px 35px rgba(28,36,48,.12);
  text-decoration:none;
  color:inherit;
  transition:all .2s ease;
  display:flex;
  flex-direction:column;
}

.prepa-card:hover{
  transform:translateY(-6px);
  box-shadow:0 20px 45px rgba(28,36,48,.18);
}

.prepa-card-top{
  padding:18px 20px;
  background:linear-gradient(135deg, #f7c6d9 0%, #c6d4f7 100%);
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.prepa-card-title{
  font-size:1.15rem;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
}

.prepa-card-body{
  padding:18px 20px;
  flex:1;
}

.prepa-card-body p{
  margin:0;
  font-size:.95rem;
  color:rgba(28,36,48,.7);
}

.prepa-card-footer{
  padding:14px 20px;
  border-top:1px solid rgba(28,36,48,.08);
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:.9rem;
  color:rgba(28,36,48,.6);
}

.prepa-badge{
  padding:5px 10px;
  border-radius:999px;
  background:white;
  font-size:.8rem;
  border:1px solid rgba(28,36,48,.12);
}
.ch-btn.danger{
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
}

.ch-btn.danger:hover{
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 8px 18px rgba(220,38,38,.25);
}