/* Agenda public — complète benevoles/assets/css/benevoles.css (design Maison Bleue v2) */
.rot90 { transform: rotate(90deg); }
.rot-90 { transform: rotate(-90deg); }

body.agenda { background: radial-gradient(circle at 0% 0%, #efeaff 0%, transparent 42%), radial-gradient(circle at 100% 30%, #e3f8f1 0%, transparent 38%), #f7f6fb; }

/* ------------------------------------------------------------------ En-tête du site */
.ag-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 32px;
    background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(124, 109, 242, .10); position: sticky; top: 0; z-index: 20;
}
.ag-brand { display: flex; align-items: center; gap: 10px; color: var(--primary-dark); font-family: var(--font-head); font-weight: 800; font-size: 19px; }
.ag-brand:hover { text-decoration: none; }
.ag-links { display: flex; gap: 4px; }
.ag-brand span, .ag-links a { white-space: nowrap; }
.ag-links a { color: var(--ink); font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: var(--r-pill); }
.ag-links a:hover { background: var(--primary-light); text-decoration: none; }
.ag-links a:last-child { background: var(--grad); color: #fff; box-shadow: var(--shadow-btn); }

.ag-main { max-width: 1280px; margin: 0 auto; padding: 26px 28px 70px; }

/* ------------------------------------------------------------------ Bandeau : période + commandes */
.ag-hero {
    position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px;
    padding: 30px 34px 28px; margin-bottom: 22px; border-radius: 28px; color: #fff;
    background: linear-gradient(120deg, #6153d6 0%, #7c6df2 48%, #49c9a8 130%);
    box-shadow: 0 22px 44px -22px rgba(97, 83, 214, .65);
}
.ag-hero::before, .ag-hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.ag-hero::before { width: 300px; height: 300px; right: -70px; top: -150px; background: rgba(255, 255, 255, .10); }
.ag-hero::after { width: 170px; height: 170px; right: 230px; bottom: -110px; background: rgba(255, 255, 255, .07); }
.ag-hero-text { position: relative; min-width: 0; }
.ag-kicker { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .82; }
.ag-hero h1 { margin: 0; color: #fff; font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.ag-sub { margin: 6px 0 0; font-size: 14.5px; opacity: .88; }
.ag-controls { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ag-seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); }
.ag-seg button { border: 0; background: none; color: #fff; font: inherit; font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: var(--r-pill); cursor: pointer; opacity: .9; }
.ag-seg button:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.ag-seg button.active { background: #fff; color: var(--primary-dark); opacity: 1; box-shadow: 0 6px 14px -6px rgba(30, 20, 90, .4); }
.ag-nav { display: flex; align-items: center; gap: 6px; }
.ag-round { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ag-round:hover { background: rgba(255, 255, 255, .28); }
.ag-today { border: 0; border-radius: var(--r-pill); background: #fff; color: var(--primary-dark); font: inherit; font-weight: 700; font-size: 14px; padding: 9px 18px; cursor: pointer; box-shadow: 0 6px 14px -6px rgba(30, 20, 90, .4); }
.ag-today:hover { background: #f4f2ff; }
.ag-today .t-short { display: none; }

/* ------------------------------------------------------------------ Une activité : heure + nom */
.ev {
    --c: var(--primary);
    display: flex; align-items: baseline; gap: 7px; width: 100%; min-width: 0; text-align: left; cursor: pointer;
    border: 0; font: inherit; color: var(--ink);
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.ev-time { flex: none; font-family: var(--font-head); font-weight: 700; font-size: 12.5px; color: color-mix(in srgb, var(--c) 45%, #1f1a33); font-variant-numeric: tabular-nums; }
.ev-name { min-width: 0; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ev-full { flex: none; margin-left: auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--danger-dark); background: #fdecea; border-radius: 99px; padding: 1px 7px; align-self: center; }
.ev.is-full .ev-name { opacity: .7; }

/* Carte (semaine) */
.ev-card { flex-direction: column; gap: 3px; padding: 9px 11px 10px; border-radius: 14px; background: color-mix(in srgb, var(--c) 9%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 20%, #ece9f7); }
.ev-card .ev-name { font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ev-card .ev-time { display: inline-flex; align-items: center; gap: 6px; }
.ev-card .ev-time::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ev-card .ev-full { margin-left: 0; align-self: flex-start; }
.ev-card:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--c) 15%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent), 0 10px 20px -12px color-mix(in srgb, var(--c) 70%, #000); }

/* Ligne (mois) */
.ev-line { align-items: center; padding: 3px 6px; border-radius: 8px; background: none; font-size: 12.5px; }
.ev-line::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); align-self: center; }
.ev-line .ev-time { font-size: 11.5px; }
.ev-line .ev-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-line .ev-full { display: none; }
.ev-line.is-full .ev-name { text-decoration: line-through; text-decoration-color: rgba(214, 71, 63, .6); }
.ev-line:hover { background: color-mix(in srgb, var(--c) 14%, #fff); }

/* Rangée (liste et journée) */
.ev-row { align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); border-left: 5px solid var(--c); }
.ev-row .ev-time { min-width: 52px; padding: 5px 9px; border-radius: 99px; text-align: center; font-size: 13px; background: color-mix(in srgb, var(--c) 12%, #fff); }
.ev-row .ev-name { font-size: 15px; }
.ev-row:hover { transform: translateX(3px); box-shadow: var(--shadow-hover); }

.vac { font-size: 11.5px; font-weight: 700; color: #8a5a12; background: repeating-linear-gradient(135deg, #fff1d6 0 8px, #ffe9c2 8px 16px); border-radius: 10px; padding: 5px 10px; text-align: center; }
.ag-empty { margin: 18px 0 0; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------------ Semaine */
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #fff; border-radius: 24px; box-shadow: var(--shadow-soft); overflow: hidden; border: 1px solid var(--line); }
.wk-day { display: flex; flex-direction: column; min-height: 420px; border-left: 1px solid var(--line); }
.wk-day:first-child { border-left: 0; }
.wk-day.is-weekend { background: #fbfaff; }
.wk-day.is-today { background: linear-gradient(180deg, #f3f0ff, #fff 55%); }
.wk-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px 14px; }
.wk-dow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wk-num { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--ink); }
.wk-day.is-past .wk-num { color: var(--muted); }
.wk-day.is-today .wk-dow { color: var(--primary-dark); }
.wk-day.is-today .wk-num { background: var(--grad); color: #fff; box-shadow: var(--shadow-btn); }
.wk-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 14px; }
.wk-none { flex: 1; margin: 6px 10px 0; border-radius: 14px; background: radial-gradient(circle, #ece9f7 1.2px, transparent 1.6px) 0 0 / 14px 14px; opacity: .55; min-height: 60px; }
.wk-day.is-past .ev-card { opacity: .6; filter: saturate(.7); }

/* ------------------------------------------------------------------ Mois */
.mo { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #fff; border-radius: 24px; box-shadow: var(--shadow-soft); overflow: hidden; border: 1px solid var(--line); }
.mo-dow { padding: 12px 0 10px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: #fcfbff; }
.mo-cell { position: relative; min-height: 128px; padding: 8px 6px 6px; display: flex; flex-direction: column; gap: 1px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: #fff; min-width: 0; }
.mo-dow + .mo-cell, .mo-cell:nth-child(7n + 1) { border-left: 0; }
.mo-cell:nth-child(-n + 14) { border-top: 0; }
.mo-cell.is-weekend { background: #fbfaff; }
.mo-cell.is-out { background: #f9f8fc; }
.mo-cell.is-out .mo-num { color: var(--line-strong); }
.mo-cell.is-vac { background: linear-gradient(180deg, #fff6e6, #fff 70%); }
.mo-top { display: flex; align-items: center; gap: 6px; margin: 0 2px 4px; min-width: 0; }
.mo-num { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--ink); }
.mo-cell.is-past:not(.is-out) .mo-num { color: var(--muted); }
.mo-cell.is-today .mo-num { background: var(--grad); color: #fff; box-shadow: var(--shadow-btn); }
.mo-vac { min-width: 0; font-size: 10.5px; font-weight: 700; color: #8a5a12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mo-cell.is-past .ev-line { opacity: .6; }
.mo-more { margin: 2px 4px 0; padding: 2px 6px; align-self: flex-start; border: 0; border-radius: 99px; background: var(--primary-light); color: var(--primary-dark); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }

/* Mois sur téléphone : des points, puis la liste du jour choisi */
.mo-small .mo-cell { min-height: 58px; padding: 6px 2px; align-items: center; cursor: pointer; font: inherit; color: inherit; text-align: center; border-style: solid; border-color: var(--line); border-width: 1px 0 0 1px; }
.mo-small .mo-cell:nth-child(7n + 1) { border-left-width: 0; }
.mo-small .mo-cell:nth-child(-n + 14) { border-top-width: 0; }
.mo-small .mo-top { margin: 0; }
.mo-small .mo-num { width: 32px; height: 32px; font-size: 14px; }
.mo-small .mo-cell.is-picked .mo-num { box-shadow: 0 0 0 2px var(--primary); }
.mo-small .mo-cell.is-today.is-picked .mo-num { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }
.mo-dots { display: flex; gap: 3px; margin-top: 4px; }
.mo-dots i { width: 6px; height: 6px; border-radius: 50%; }
.mo-daylist { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.mo-daylist h2 { margin: 0 0 2px; font-size: 18px; }

/* ------------------------------------------------------------------ Liste */
.li { display: flex; flex-direction: column; gap: 14px; }
.li-day { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: start; }
.li-date { position: sticky; top: 80px; display: flex; flex-direction: column; align-items: center; padding: 10px 0 12px; border-radius: 20px; background: #fff; box-shadow: var(--shadow-soft); }
.li-dow { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.li-num { font-family: var(--font-head); font-weight: 800; font-size: 28px; line-height: 1.1; color: var(--ink); }
.li-mon { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.li-day.is-today .li-date { background: var(--grad); box-shadow: var(--shadow-btn); }
.li-day.is-today .li-date span { color: #fff; }
.li-items { display: flex; flex-direction: column; gap: 8px; }

/* ------------------------------------------------------------------ Détail */
.ag-detail-line { display: flex; gap: 9px; align-items: center; margin: 0 0 8px; }
.ag-detail-line .ico { color: var(--primary); }
.ag-detail-line.complet { color: var(--danger-dark); font-weight: 600; }
.ag-detail-line.complet .ico { color: var(--danger-dark); }
.participant + .participant { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 4px; }

/* ------------------------------------------------------------------ Tablettes et téléphones */
@media (max-width: 1100px) {
    .wk-day { min-height: 340px; }
    .ev-card { padding: 8px 9px; }
    .ev-card .ev-name { font-size: 12.5px; }
}
@media (max-width: 760px) {
    .ag-header { padding: 10px 16px; }
    .ag-links a:first-child { display: none; }
    .ag-brand { font-size: 16px; }
    .ag-links a { padding: 7px 12px; font-size: 13px; }
    .ag-main { padding: 16px 14px 50px; }
    /* Bandeau compact : titre, puis une seule ligne de commandes */
    .ag-hero { padding: 16px 14px 14px; gap: 12px; border-radius: 22px; margin-bottom: 14px; }
    .ag-kicker { display: none; }
    .ag-hero h1 { font-size: 24px; }
    .ag-sub { margin-top: 2px; font-size: 13px; }
    .ag-controls { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 6px; }
    .ag-seg { flex: none; padding: 3px; }
    .ag-seg button { padding: 6px 9px; font-size: 12.5px; }
    .ag-nav { gap: 4px; flex: none; }
    .ag-round { width: 32px; height: 32px; }
    .ag-round .ico { width: 16px; height: 16px; }
    .ag-today { padding: 7px 10px; font-size: 12.5px; }
    /* Semaine : les jours les uns sous les autres, sans les jours vides */
    .wk { display: flex; flex-direction: column; gap: 12px; background: none; box-shadow: none; border: 0; border-radius: 0; overflow: visible; }
    .wk-day { min-height: 0; border: 0; border-radius: 20px; background: #fff; box-shadow: var(--shadow-soft); }
    .wk-day.is-empty { display: none; }
    .wk-day.is-weekend { background: #fff; }
    .wk-head { flex-direction: row; align-items: center; gap: 10px; padding: 12px 16px 6px; }
    .wk-dow { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); font-family: var(--font-head); }
    .wk-num { width: 34px; height: 34px; font-size: 16px; order: -1; background: var(--primary-light); color: var(--primary-dark); }
    .wk-month { font-size: 13px; color: var(--muted); }
    .wk-body { padding: 6px 12px 14px; }
    .ev-card .ev-name { font-size: 14.5px; -webkit-line-clamp: 2; }
    .li-day { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; }
    .li-num { font-size: 22px; }
    .ev-row { padding: 11px 12px; gap: 10px; }
    .ev-row .ev-name { font-size: 14.5px; }
    .mo { border-radius: 20px; }
}
@media (max-width: 370px) {
    .ag-today .t-long { display: none; }
    .ag-today .t-short { display: inline; }
    .ag-seg button { padding: 6px 7px; }
    .ag-brand span { display: none; }
}
