/* ===== PAGE PLANNING — THÈME AMAZONES DU DÉSERT ===== */

.planning-container {
    background: #F6E2F6;
    padding: 0 0 5rem;
    min-height: 100vh;
}

/* === Header de page === */
.planning-page-header {
    background: linear-gradient(15deg, #fce4ec 0%, #ebcbdb 100%);
    text-align: center;
    padding: 5rem 6% 4rem;
    position: relative;
    overflow: hidden;
}
.planning-page-header::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.planning-page-header::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(249,214,109,0.22) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.planning-page-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 700;
    color: #E46CC5;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}
.planning-page-subtitle {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1rem;
    color: #8a4060;
    font-weight: 500;
    position: relative;
    z-index: 1;
}
.planning-page-divider {
    width: 80px;
    height: 5px;
    background: linear-gradient(to right, var(--pink-soft, #f06292), var(--gold-warm, #f9d66d));
    border-radius: 3px;
    margin: 1.2rem auto 0;
    position: relative;
    z-index: 1;
}
.header-wave {
    display: block;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    margin: -1px 0;
}
.header-wave svg { width: 100%; height: 60px; }

/* === Carte principale === */
.planning-card {
    max-width: 1200px;
    margin: 3rem auto 0;
    background: white;
    border-radius: 28px;
    box-shadow: 0 12px 50px rgba(194, 24, 91, 0.1);
    overflow: hidden;
    border: 1px solid rgba(240, 98, 146, 0.12);
    margin-left: 5%;
    margin-right: 5%;
}
@media (min-width: 1300px) {
    .planning-card { margin-left: auto; margin-right: auto; }
}

/* === Mois / en-tête interne === */
.planning-header {
    background: linear-gradient(135deg, var(--pink-deep, #c2185b) 0%, var(--pink-soft, #f06292) 100%);
    padding: 2.8rem 2.5rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}
.planning-header::before {
    content: '🌸';
    position: absolute;
    font-size: 16rem;
    opacity: 0.06;
    top: -50px; right: -40px;
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-18px) rotate(5deg); }
}
.planning-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    margin: 0 0 0.6rem;
    position: relative;
    z-index: 1;
}
.month-display {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 7vw, 3.8rem);
    font-weight: 900;
    margin: 0.8rem 0 0.6rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
}
.month-langs {
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
    letter-spacing: 1.5px;
    position: relative;
    z-index: 1;
}

/* === Navigation mois === */
.planning-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 2.5rem;
    background: linear-gradient(to bottom, #fef5f9 0%, white 100%);
    border-bottom: 2px solid rgba(240, 98, 146, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}
.nav-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.7rem 1.6rem;
    background: white;
    color: var(--pink-deep, #c2185b);
    text-decoration: none;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 4px 16px rgba(194, 24, 91, 0.1);
    transition: all 0.3s;
    border: 2px solid rgba(240, 98, 146, 0.2);
}
.nav-button:hover {
    background: linear-gradient(135deg, var(--pink-soft, #f06292), var(--pink-deep, #c2185b));
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(194, 24, 91, 0.28);
    border-color: transparent;
}
.year-badge {
    font-family: 'Quicksand', sans-serif;
    font-weight: 800;
    color: var(--dark-cozy, #2d2a32);
    font-size: 1.1rem;
    padding: 0.5rem 1.4rem;
    background: rgba(249, 214, 109, 0.2);
    border-radius: 50px;
    border: 2px solid rgba(249, 214, 109, 0.4);
}

/* === Calendrier === */
.calendar-wrapper {
    padding: 2rem 2.5rem;
    background: white;
    overflow-x: auto;
}
.calendar-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 2px solid rgba(194, 24, 91, 0.15);
    border-radius: 16px;
    overflow: hidden;
    font-family: 'Quicksand', sans-serif;
    box-shadow: 0 6px 24px rgba(194, 24, 91, 0.07);
    min-width: 560px;
}
.calendar-table thead th {
    background: linear-gradient(135deg, var(--dark-cozy, #2d2a32) 0%, #3a3642 100%);
    color: white;
    padding: 1rem 0.6rem;
    font-weight: 700;
    text-transform: lowercase;
    font-size: 0.95rem;
    letter-spacing: 0.4px;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.calendar-table thead th:last-child { border-right: none; }
.calendar-table tbody td {
    border: 1px solid rgba(194, 24, 91, 0.08);
    height: 110px;
    width: 14.28%;
    padding: 0.6rem;
    vertical-align: top;
    background: white;
    position: relative;
    transition: all 0.25s;
}
.calendar-table tbody td:hover {
    background: #fff5f8;
    box-shadow: inset 0 0 0 2px var(--pink-soft, #f06292);
    z-index: 10;
}
.calendar-table tbody td.other-month { background: #fdf8fa; opacity: 0.55; }
.calendar-table tbody td.today {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d6 100%);
    border: 2px solid var(--gold-warm, #f9d66d);
    box-shadow: 0 0 20px rgba(249, 214, 109, 0.35);
}
.day-num {
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--dark-cozy, #2d2a32);
    margin-bottom: 4px;
}
.other-month .day-num { color: #d0b0be; }
.today .day-num {
    background: linear-gradient(135deg, var(--gold-warm, #f9d66d) 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    font-size: 1.6rem;
}

/* === Pastilles événements === */
.events-list { margin-top: 4px; display: flex; flex-direction: column; gap: 3px; }
.event-pill {
    background: linear-gradient(135deg, rgba(240,98,146,0.1) 0%, rgba(240,98,146,0.04) 100%);
    border-left: 3px solid var(--pink-soft, #f06292);
    padding: 4px 7px;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dark-cozy, #2d2a32);
    cursor: pointer;
    transition: all 0.25s;
    line-height: 1.3;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    flex-wrap: wrap;
}
.event-pill:hover,
.event-pill:focus {
    background: linear-gradient(135deg, var(--pink-soft, #f06292) 0%, var(--pink-deep, #c2185b) 100%);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 5px 18px rgba(240, 98, 146, 0.38);
    border-left-color: var(--gold-warm, #f9d66d);
    outline: none;
}
.event-time-badge {
    display: inline-block;
    background: var(--dark-cozy, #2d2a32);
    color: white;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}
.event-pill:hover .event-time-badge,
.event-pill:focus .event-time-badge { background: white; color: var(--pink-deep, #c2185b); }
.event-name { flex: 1; word-break: break-word; min-width: 0; }
.part-mini  { display: flex; gap: 2px; align-items: center; flex-shrink: 0; margin-left: auto; }
.part-dot   { font-size: 0.62rem; line-height: 1; }
.dot-oui    { color: #10b981; }
.dot-non    { color: #ef4444; }
.dot-aucune { color: #9ca3af; }
.event-pill:hover .part-dot,
.event-pill:focus .part-dot { filter: brightness(1.5); }

/* === Footer notes === */
.calendar-footer {
    padding: 1.8rem 2.5rem;
    background: linear-gradient(to top, #fef5f9 0%, white 100%);
    border-top: 2px solid rgba(240, 98, 146, 0.1);
}
.notes-title { font-family: 'Quicksand', sans-serif; font-weight: 800; color: var(--pink-deep, #c2185b); margin-bottom: 0.7rem; font-size: 1rem; }
.notes-box {
    background: white;
    border: 2px dashed rgba(240, 98, 146, 0.25);
    border-radius: 14px;
    padding: 1.1rem 1.4rem;
    min-height: 60px;
    font-size: 0.95rem;
    color: #a07090;
    font-style: italic;
    font-family: 'Quicksand', sans-serif;
}

/* === Modal === */
#eventModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(30, 10, 20, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    padding: 1rem;
}
#eventModal.is-open { display: flex; }
#eventModal .modal-dialog {
    background: white;
    border-radius: 24px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 70px rgba(194, 24, 91, 0.25);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
#eventModal .modal-header {
    background: linear-gradient(135deg, var(--pink-deep, #c2185b) 0%, var(--pink-soft, #f06292) 100%);
    color: white;
    padding: 1.8rem 2rem;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#eventModal .modal-header::before {
    content: '🌸';
    position: absolute;
    font-size: 8rem;
    opacity: 0.08;
    top: -20px; right: -20px;
    pointer-events: none;
}
#eventModal .modal-header h5 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 4vw, 1.75rem);
    margin: 0;
    position: relative;
    z-index: 1;
    padding-right: 1rem;
}
#modalCloseBtn {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 1.8rem;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}
#modalCloseBtn:hover { background: white; color: var(--pink-deep, #c2185b); transform: rotate(90deg); }
#eventModal .modal-body { padding: 1.8rem 2rem; background: white; border-radius: 0 0 24px 24px; }
#eventModal .modal-body p { font-family: 'Quicksand', sans-serif; font-size: 1rem; margin-bottom: 0.6rem; color: var(--dark-cozy, #2d2a32); }
.description-box {
    background: linear-gradient(135deg, #fff8f5 0%, #fff0f5 100%);
    padding: 1.3rem 1.6rem;
    border-radius: 16px;
    border-left: 5px solid var(--gold-warm, #f9d66d);
    line-height: 1.8;
    margin: 1.2rem 0;
    box-shadow: 0 4px 16px rgba(194, 24, 91, 0.06);
    font-family: 'Quicksand', sans-serif;
    color: #4a3040;
}
.participation-section { margin-top: 1.5rem; }
.participation-section-title {
    font-family: 'Quicksand', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: var(--dark-cozy, #2d2a32);
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.participation-section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, rgba(240,98,146,0.2), transparent);
}
.participation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.participation-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
}
.participation-item.statut-participe     { background: #d1fae5; color: #065f46; }
.participation-item.statut-participe_pas { background: #fee2e2; color: #991b1b; }
.participation-item.statut-aucune        { background: #f3f4f6; color: #6b7280; }
.participation-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.78rem; flex-shrink: 0;
}
.statut-participe     .participation-avatar { background: #10b981; color: white; }
.statut-participe_pas .participation-avatar { background: #ef4444; color: white; }
.statut-aucune        .participation-avatar { background: #9ca3af; color: white; }
.participation-statut-icon { margin-left: auto; font-size: 0.95rem; flex-shrink: 0; }
.participation-member-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.participation-name { font-weight: 600; }
.participation-item.statut-participe_pas .participation-name { color: #991b1b !important; font-weight: 700 !important; }
.participation-cross { display: inline; font-size: 0.95rem; font-weight: 900; color: #ef4444; margin-left: 4px; vertical-align: middle; }
.participation-note  { font-size: 0.76rem; font-weight: 400; opacity: 0.85; margin-top: 1px; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.participation-item.has-note { align-items: flex-start; }
.participation-recap { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.9rem; font-family: 'Quicksand', sans-serif; font-size: 0.83rem; font-weight: 700; }
.parts-restricted {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin-top: 1.2rem; padding: 0.7rem 1.1rem;
    background: #f9f0f5; border: 1px dashed rgba(194,24,91,0.2);
    border-radius: 12px; font-family: 'Quicksand', sans-serif;
    font-size: 0.88rem; color: #a06080; font-style: italic;
}

/* ===== BOUTONS MA PARTICIPATION ===== */
.my-participation-section { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 2px solid rgba(240,98,146,0.12); }
.my-participation-title {
    font-family: 'Quicksand', sans-serif; font-weight: 800; font-size: 1rem;
    color: var(--dark-cozy, #2d2a32); margin-bottom: 1rem;
    display: flex; align-items: center; gap: 8px;
}
.my-participation-title::after { content: ''; flex: 1; height: 2px; background: linear-gradient(to right, rgba(240,98,146,0.2), transparent); }
.participation-btn-group { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.participation-btn {
    flex: 1; min-width: 120px; padding: 0.75rem 1rem;
    border-radius: 14px; border: 2px solid transparent;
    font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 0.95rem;
    cursor: pointer; transition: all 0.25s ease;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: #f5f5f5; color: #666;
}
.participation-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.12); }
.participation-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.participation-btn.btn-participe.active     { background: linear-gradient(135deg, #d1fae5, #a7f3d0); border-color: #10b981; color: #065f46; box-shadow: 0 4px 14px rgba(16,185,129,0.25); }
.participation-btn.btn-participe_pas.active { background: linear-gradient(135deg, #fee2e2, #fecaca); border-color: #ef4444; color: #991b1b; box-shadow: 0 4px 14px rgba(239,68,68,0.25); }
.participation-btn.btn-aucune.active        { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); border-color: #9ca3af; color: #4b5563; box-shadow: 0 4px 14px rgba(156,163,175,0.2); }
.participation-btn.btn-participe:not(:disabled):hover     { background: linear-gradient(135deg, #d1fae5, #a7f3d0); border-color: #10b981; color: #065f46; }
.participation-btn.btn-participe_pas:not(:disabled):hover { background: linear-gradient(135deg, #fee2e2, #fecaca); border-color: #ef4444; color: #991b1b; }
.participation-btn.btn-aucune:not(:disabled):hover        { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); border-color: #9ca3af; color: #4b5563; }
.participation-feedback {
    margin-top: 0.8rem; padding: 0.6rem 1rem; border-radius: 10px;
    font-family: 'Quicksand', sans-serif; font-size: 0.9rem; font-weight: 600;
    display: none; align-items: center; gap: 0.5rem;
    animation: fadeInUp 0.3s ease;
}
.participation-feedback.show    { display: flex; }
.participation-feedback.success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.participation-feedback.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.participation-feedback.loading { background: #f9f0f5; color: #a06080; border: 1px solid rgba(194,24,91,0.15); display: flex; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.participation-note-field { margin-top: 0.8rem; }
.participation-note-field.show { display: block; }

/* ── Bouton Valider ───────────────────────────────────────────────────── */
.participation-validate-wrap {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
}
.participation-validate-btn {
    background: linear-gradient(135deg, #e91e8c, #c2185b);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 0.45rem 1.4rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: opacity 0.15s, transform 0.12s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 2px 8px rgba(233,30,140,0.25);
}
.participation-validate-btn:hover:not(:disabled) {
    opacity: 0.88;
    transform: translateY(-1px);
}
.participation-validate-btn:active:not(:disabled) {
    transform: translateY(0);
    opacity: 1;
}
.participation-validate-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.participation-note-input {
    width: 100%; padding: 0.65rem 0.9rem;
    border: 2px solid rgba(240,98,146,0.25); border-radius: 10px;
    font-family: 'Quicksand', sans-serif; font-size: 0.9rem;
    color: var(--dark-cozy, #2d2a32); outline: none;
    transition: border-color 0.2s; box-sizing: border-box;
}
.participation-note-input:focus { border-color: var(--pink-soft, #f06292); box-shadow: 0 0 0 3px rgba(240,98,146,0.1); }
.participation-note-input::placeholder { color: #c4a0b0; }
@media (max-width: 480px) { .participation-btn-group { flex-direction: column; } .participation-btn { min-width: unset; } }
.recap-badge  { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; }
.recap-oui    { background: #d1fae5; color: #065f46; }
.recap-non    { background: #fee2e2; color: #991b1b; }
.recap-aucune { background: #f3f4f6; color: #6b7280; }

/* === Responsive === */
@media (max-width: 900px) { .planning-card { margin-left: 3%; margin-right: 3%; } }
@media (max-width: 768px) {
    .planning-page-header { padding: 3.5rem 5% 3rem; }
    .planning-card { margin-left: 2%; margin-right: 2%; margin-top: 2rem; border-radius: 20px; }
    .planning-header { padding: 2rem 1.5rem; }
    .planning-nav { flex-direction: column; padding: 1.2rem 1.5rem; }
    .nav-button { width: 100%; justify-content: center; }
    .calendar-wrapper { padding: 1.2rem 1rem; }
    .calendar-table thead th { padding: 0.7rem 0.4rem; font-size: 0.8rem; }
    .calendar-table tbody td { height: 85px; padding: 5px; }
    .day-num { font-size: 1.15rem; }
    .event-pill { font-size: 0.73rem; padding: 3px 5px; }
    .calendar-footer { padding: 1.2rem 1.5rem; }
    #eventModal .modal-body { padding: 1.4rem 1.2rem; }
    .participation-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .planning-card { margin-left: 1%; margin-right: 1%; border-radius: 16px; }
    .month-display { font-size: 2rem; }
    .calendar-table { min-width: 460px; }
    .calendar-table tbody td { height: 68px; }
    .day-num { font-size: 1rem; }
    #eventModal .modal-header h5 { font-size: 1.2rem; }
}