/* modules/family-calendar/family-calendar.css */ :root { /* Couleurs sémantiques Calendrier */ --c-school-holiday: #ede9fe; --c-public-holiday: repeating-linear-gradient( 45deg, #f8fafc, #f8fafc 8px, #f1f5f9 8px, #f1f5f9 16px ); --c-off-carole: #fef3c7; --c-extra-off: #fee2e2; --c-selected: #dbeafe; /* Thèmes Parents (Sync Budget) */ --bg-alex: #ecfeff; --text-alex: #0891b2; --bg-laia: #fffbeb; --text-laia: #d97706; /* Rappel des variables Global Design System pour cohérence */ --pf-primary: #3b82f6; --pf-border: #e2e8f0; --pf-bg-lighter: #f8fafc; --pf-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); } .pf-family-calendar.pf-main { padding-top: 20px; padding-bottom: 40px; } /* ========================================================= EN-TÊTE & BOUTONS ========================================================= */ .fc-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; } .pf-btn-icon-text { background: white; border: 1px solid var(--pf-border); border-radius: 50px; padding: 10px 20px; display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; color: #475569; cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: var(--pf-shadow-sm); } .pf-btn-icon-text:hover { border-color: var(--pf-primary); color: var(--pf-primary); background: #f8fafc; transform: translateY(-1px); box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); } /* ========================================================= CALENDRIER MENSUEL (Vue Grille Mois) ========================================================= */ .fc-month-calendar-wrapper { background: white; border: 1px solid var(--pf-border); border-radius: 16px; padding: 24px; margin-bottom: 32px; box-shadow: var(--pf-shadow-sm); } .fc-month-header { display: flex !important; flex-direction: column !important; gap: 16px !important; margin-bottom: 20px !important; } .fc-month-nav-row { display: flex !important; align-items: center !important; justify-content: space-between !important; width: 100% !important; } .fc-month-nav-row h3 { margin: 0 !important; font-size: 1.5rem !important; font-weight: 800 !important; color: #0f172a; text-transform: capitalize !important; text-align: center !important; flex-grow: 1 !important; } .fc-nav-button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--pf-border); background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: all 0.2s; color: #64748b; } .fc-nav-button:hover { border-color: var(--pf-primary); color: var(--pf-primary); background: #eff6ff; } .fc-view-controls { display: flex !important; align-items: center; width: 100% !important; background: #f1f5f9 !important; padding: 4px !important; border-radius: 12px !important; } .fc-view-button { flex: 1 !important; text-align: center !important; background: transparent; border: none; border-radius: 6px; padding: 6px 16px; font-size: 0.85rem; font-weight: 600; color: #64748b; cursor: pointer; transition: 0.2s; } .fc-view-button--active { background: white !important; color: var(--pf-primary) !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important; font-weight: 700; } .fc-month-calendar { width: 100%; display: block; overflow-x: auto; } .fc-month-table { min-width: 100% !important; width: 100% !important; table-layout: fixed; border-collapse: separate !important; border-spacing: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--pf-border) !important; } .fc-month-table th { padding: 10px !important; font-size: 0.8rem !important; background: #f8fafc !important; color: #64748b !important; font-weight: 700 !important; text-transform: uppercase; border-bottom: 1px solid var(--pf-border) !important; border-right: 1px solid var(--pf-border) !important; } .fc-month-table td { height: 80px; padding: 6px !important; font-size: 0.85rem; vertical-align: top; position: relative; cursor: pointer; border-right: 1px solid var(--pf-border) !important; border-bottom: 1px solid var(--pf-border) !important; transition: background 0.1s; } .fc-month-table td:hover:not(.fc-day--other-month) { background: #f1f5f9; } .fc-day--other-month { background: #fcfcfc !important; } /* Vues Multi-mois */ .fc-two-months-container { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; width: 100%; overflow-x: auto; } .fc-three-months-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; overflow-x: auto; } .fc-month-title { text-align: center; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--pf-primary); text-transform: capitalize; } /* ========================================================= DÉCOMPTE CONGÉS MENSUEL (PILLS) ========================================================= */ .fc-month-balances { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-top: 20px; padding-top: 15px; border-top: 1px dashed var(--pf-border); } .fc-minimal-balance-card { display: flex; align-items: center; gap: 12px; background: white; padding: 8px 16px; border-radius: 50px; border: 1px solid var(--pf-border); box-shadow: var(--pf-shadow-sm); } .fc-minimal-chips { display: flex; gap: 8px; flex-wrap: wrap; } .fc-min-chip { display: flex; align-items: center; background: white; border-radius: 20px; padding: 3px 10px; font-size: 0.75rem; border: 1px solid var(--pf-border); font-weight: 600; } .fc-min-chip .type { font-weight: 700; color: #64748b; margin-right: 6px; } .fc-min-chip .val { font-weight: 800; color: #0f172a; } .fc-used-badge { margin-left: 6px; background: #fee2e2; color: #ef4444; padding: 1px 5px; border-radius: 10px; font-size: 0.65rem; font-weight: bold; } .fc-burn-alert { margin-left: 5px; cursor: help; animation: pulseBurn 2s infinite; font-size: 0.9rem; display: flex; align-items: center; color: #ef4444; font-weight: bold; } @keyframes pulseBurn { 0% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 0.8; } } /* ========================================================= COULEURS DES JOURS (GRILLES) ========================================================= */ .fc-day--school-holiday { background: var(--c-school-holiday) !important; } .fc-day--public-holiday { background: var(--c-public-holiday) !important; font-weight: 700; } .fc-day--off-carole { background: var(--c-off-carole) !important; } .fc-day--extra-off-carole { background: var(--c-extra-off) !important; } .fc-day--selected { background: var(--c-selected) !important; outline: 2px solid var(--pf-primary); z-index: 5; } .fc-day--off-carole.fc-day--school-holiday, .fc-day--extra-off-carole.fc-day--school-holiday, .fc-day--centre.fc-day--school-holiday, .fc-day--avis.fc-day--school-holiday { box-shadow: inset 0 -8px 0 0 var(--c-school-holiday) !important; } .fc-day--today { background: #eff6ff !important; box-shadow: inset 0 0 0 1px #bfdbfe !important; } .fc-day--today .fc-day-number { display: inline; background: none; width: auto; height: auto; box-shadow: none; border-radius: 0; margin: 0; color: var(--pf-primary); font-weight: 900; font-size: 1.1em; } /* ========================================================= PLANNING GLOBAL (Matrice Annuelle) ========================================================= */ .fc-week-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; } .fc-week-nav-controls { display: flex; align-items: center; gap: 12px; background: white; padding: 4px 12px; border-radius: 50px; } #fc-current-school-year-label { font-size: 1rem; font-weight: 800; min-width: 120px; text-align: center; } #planningTable-wrapper { max-height: 80vh; overflow: auto; border: 1px solid var(--pf-border); border-radius: 16px; background: white; box-shadow: var(--pf-shadow-sm); position: relative; margin-bottom: 24px; } #planningTable { width: 100%; min-width: 1000px; border-collapse: separate; border-spacing: 0; } /* HARMONISATION DES BORDURES ET HEADERS STICKY */ #planningTable thead tr { height: 30px; } #planningTable thead th { position: sticky; background: #f8fafc !important; border: none !important; box-shadow: inset 0 -1px 0 var(--pf-border), inset -1px 0 0 var(--pf-border) !important; padding: 6px; font-size: 0.75rem; z-index: 20; color: #475569; background-clip: padding-box; } #planningTable thead tr:nth-child(1) th { top: 0; z-index: 22; } #planningTable thead tr:nth-child(2) th { top: 30px; z-index: 21; } #planningTable thead tr:nth-child(3) th { top: 60px; z-index: 20; } .col-alex.header-group, .col-alex-sub { background: var(--bg-alex) !important; color: var(--text-alex) !important; } .col-laia.header-group, .col-laia-sub { background: var(--bg-laia) !important; color: var(--text-laia) !important; } #planningTable tbody td { position: relative; border: none !important; border-right: 1px solid var(--pf-border) !important; border-bottom: 1px solid var(--pf-border) !important; height: 36px; padding: 0 4px; text-align: center; font-size: 0.85rem; white-space: nowrap; cursor: pointer; } /* Dimensions des colonnes */ .col-month { width: 54px !important; min-width: 54px !important; max-width: 54px !important; background: white; text-align: center; vertical-align: middle; } th.col-day, td.col-day { min-width: 35px !important; } th.col-total, td.col-total, th.col-alex-sub, td.col-alex-sub, th.col-laia-sub, td.col-laia-sub { width: 32px !important; min-width: 32px !important; max-width: 32px !important; } .rotated-text span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.7rem; color: #64748b; } /* ========================================================================== OPTIMISATION DES LARGEURS DU TABLEAU HEBDOMADAIRE ========================================================================== */ /* 1. On limite les colonnes des jours (Lun-Ven) pour qu'elles prennent ~55% de la page max */ #planningTable th.col-day, #planningTable td.col-day { width: 11%; max-width: 90px; } /* 2. On compacte la colonne "Sem." qui n'affiche plus que 2 chiffres */ #planningTable th.col-sticky-sem, #planningTable td.col-sticky-sem { width: 40px; min-width: 40px; text-align: center; padding: 4px; /* Réduit les marges internes */ } /* 3. On s'assure que le tableau utilise tout l'espace disponible intelligemment */ #planningTable { table-layout: auto; width: 100%; } /* GESTION DES COLONNES STICKY (Mois & Semaine) */ #planningTable tbody td.col-sticky-mois { position: sticky !important; left: 0 !important; z-index: 15 !important; background: white !important; padding: 0 !important; } #planningTable tbody td.col-sticky-mois .fc-sticky-mois-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); writing-mode: vertical-rl; letter-spacing: 1px; text-align: center; } #planningTable tbody td.col-sticky-sem { position: sticky !important; left: 54px !important; z-index: 14 !important; background: white !important; box-shadow: 4px 0 6px -2px rgba(0, 0, 0, 0.1); } #planningTable thead tr th.col-sticky-mois { position: sticky !important; top: 0 !important; left: 0 !important; z-index: 30 !important; background: var(--pf-bg-lighter) !important; } #planningTable thead tr th.col-sticky-sem { position: sticky !important; top: 0 !important; left: 54px !important; z-index: 29 !important; background: var(--pf-bg-lighter) !important; box-shadow: inset 0 -1px 0 var(--pf-border), inset -1px 0 0 var(--pf-border), 4px 0 6px -2px rgba(0, 0, 0, 0.1) !important; } #planningTable thead th.col-month, #planningTable tbody td.col-sticky-sem { writing-mode: horizontal-tb; transform: none; padding: 6px !important; text-align: center; } /* ========================================================= PANNEAUX BAS, LÉGENDES & RÉSUMÉS ========================================================= */ .fc-bottom-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; } .pf-card { background: white; border: 1px solid var(--pf-border); border-radius: 16px; box-shadow: var(--pf-shadow-sm); padding: 24px; } .pf-card-title { margin-top: 0; margin-bottom: 16px; font-size: 1.25rem; color: #0f172a; border-bottom: 1px solid var(--pf-border); padding-bottom: 12px; } /* Légendes statiques */ .pf-legend-grid { display: flex; flex-wrap: wrap; gap: 8px; } .pf-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; padding: 6px 10px; background: #f8fafc; border: 1px solid var(--pf-border); border-radius: 8px; font-weight: 500; color: #475569; } .pf-legend-color { width: 16px; height: 16px; border-radius: 4px; } .fc-legend-school-holiday { background: var(--c-school-holiday); } .fc-legend-public-holiday { background: var(--c-public-holiday); } .fc-legend-off-carole { background: var(--c-off-carole); } .fc-legend-extra-off-carole { background: var(--c-extra-off); } .fc-legend-centre::after { content: "🏫"; } .fc-legend-pep-sick::after { content: "🤒"; } .fc-legend-avis { background: white url("/modules/family-calendar/assets/img/avis.svg") no-repeat center; background-size: contain; border: none; } /* Résumé Mensuel Injecté */ .fc-month-container { display: flex; flex-direction: column; gap: 8px; } .fc-month-summary-inline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px; background: var(--pf-bg-lighter, #f8fafc); padding: 10px 12px; border-radius: 8px; border: 1px solid var(--pf-border); } .fc-summ-pill { display: flex; flex-direction: column; align-items: center; font-size: 0.75rem; color: #64748b; flex: 1; } .fc-summ-pill strong { font-size: 0.95rem; color: #0f172a; margin-top: 2px; } .pf-presence-pill strong { color: var(--pf-primary); } [data-theme="dark"] .fc-month-summary-inline { background: #1c2128; border-color: #30363d; } [data-theme="dark"] .fc-summ-pill strong { color: #c9d1d9; } /* ========================================================= MENU CONTEXTUEL (COMPACT & PROPRE) ========================================================= */ #selectionMenu, #fc-month-selectionMenu, .fc-selection-menu { position: absolute; z-index: 9000; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); border: 1px solid rgba(226, 232, 240, 0.8); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); border-radius: 12px; padding: 8px 12px; min-width: 210px; display: none; animation: menuPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; transform-origin: top center; } @keyframes menuPopIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } } .fc-menu-section { padding: 6px 0; border-bottom: 1px dashed #cbd5e1; } .fc-menu-section:last-child { border-bottom: none; padding-bottom: 0; } .fc-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .fc-menu-btn { background: transparent; border: 1px solid transparent; padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; cursor: pointer; width: 100%; text-align: left; transition: all 0.2s ease; color: #0f172a; display: flex; align-items: center; } .fc-menu-btn:hover { background: #f1f5f9; } /* --- LE BOUTON ACTIF (SANS COCHE !) --- */ .fc-menu-btn--active { border: 1px solid var(--pf-primary) !important; background: #eff6ff !important; color: var(--pf-primary) !important; font-weight: 700 !important; } /* Sécurité absolue pour tuer les coches fantômes */ .fc-menu-btn--active::before, .fc-menu-btn--active::after { display: none !important; content: none !important; } /* Icônes intégrées dans le JS */ .fc-icon-centre { font-size: 1.1rem; line-height: 1; margin-right: 4px; } .fc-icon-avis { width: 14px; height: 14px; object-fit: contain; margin-right: 4px; vertical-align: middle; } /* ========================================================= MODALES (Paramètres & Vacances) ========================================================= */ .fc-holidays-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; } .fc-holidays-table th { background: #f8fafc; padding: 12px 16px; text-align: left; font-weight: 600; position: sticky; top: 0; border-bottom: 2px solid var(--pf-border); } .fc-holidays-table td { padding: 10px 16px; border-bottom: 1px solid var(--pf-border); } .fc-holidays-table tr:nth-child(even) { background: #fafafa; } .pf-modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; border-bottom: 1px solid var(--pf-border); padding-bottom: 15px; } .pf-modal-header .pf-modal-title { margin: 0; padding: 0; border-bottom: none; flex-grow: 1; } .pf-modal-close { background: none; border: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: #94a3b8; padding: 0 0 0 15px; transition: color 0.2s; } .pf-modal-close:hover { color: #ef4444; } .fc-sidebar-tab { display: flex; align-items: center; gap: 10px; padding: 10px 1.2rem; background: transparent; border: none; text-align: left; font-weight: 600; cursor: pointer; color: #0f172a; transition: all 0.2s; width: calc(100% - 16px); margin: 2px 8px; border-radius: 8px; font-size: 0.95rem; } .fc-sidebar-tab.active { background: #111827; color: #ffffff; } .fc-sidebar-tab:hover:not(.active) { background: #f1f5f9; } [data-theme="dark"] .fc-sidebar-tab.active { background: var(--pf-primary); color: #ffffff; } /* ========================================================= SMART DATE SELECTOR ========================================================= */ .fc-smart-select { background: #ffffff; border: 1px solid #cbd5e1; border-radius: 8px; font-family: inherit; font-size: 1.1rem; font-weight: 600; color: #0f172a; padding: 8px 12px; cursor: pointer; transition: all 0.2s ease; text-transform: capitalize; box-shadow: var(--pf-shadow-sm); } .fc-smart-select:hover { border-color: #94a3b8; } .fc-smart-select:focus { border-color: var(--pf-primary); outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); } .fc-today-button { background: white; border: 1px solid var(--pf-border); border-radius: 8px; padding: 6px 12px; font-size: 0.85rem; font-weight: 700; color: var(--pf-primary); cursor: pointer; transition: all 0.2s; box-shadow: var(--pf-shadow-sm); } .fc-today-button:hover { background: #eff6ff; border-color: var(--pf-primary); } .fc-view-divider { width: 1px; height: 20px; background: #cbd5e1; margin: 0 8px; } /* ========================================================= MOBILE RESPONSIVE ========================================================= */ @media (max-width: 768px) { .fc-smart-select { font-size: 1rem; padding: 6px 8px; } .pf-family-calendar .pf-container { padding: 0 !important; } .fc-header-row { flex-direction: column; gap: 15px; padding: 0 10px; } .fc-header-row > div { flex-direction: column; width: 100%; } .pf-btn-icon-text { width: 100%; justify-content: center; } .fc-week-header, #planningTable-wrapper { display: none !important; } .fc-month-calendar-wrapper { padding: 16px !important; margin-bottom: 20px !important; } .fc-month-table td { height: 46px !important; padding: 2px !important; font-size: 0.75rem !important; } .fc-bottom-grid { grid-template-columns: 1fr; padding: 10px; } #selectionMenu, #fc-month-selectionMenu, .fc-selection-menu { position: fixed !important; top: auto !important; left: 0 !important; bottom: 0 !important; width: 100% !important; border-radius: 24px 24px 0 0; padding: 24px 20px; transform: translateY(100%); animation: slideUpSheet 0.3s forwards; z-index: 10000 !important; } #selectionMenu::before, #fc-month-selectionMenu::before { content: ""; display: block; width: 40px; height: 5px; background: #cbd5e1; border-radius: 10px; margin: 0 auto 15px auto; } .fc-two-months-container, .fc-three-months-container { display: flex !important; flex-direction: column !important; gap: 20px !important; } } @keyframes slideUpSheet { to { transform: translateY(0); } } /* ========================================================================== AFFINAGE EXTRÊME DES COLONNES MOIS ET SEMAINE (Mise à jour) ========================================================================== */ /* 1. Colonne Mois (Texte vertical) : On réduit à 35px */ .col-month, #planningTable th.col-sticky-mois, #planningTable td.col-sticky-mois { width: 15px !important; min-width: 15px !important; max-width: 15px !important; padding: 2px !important; } /* 2. Colonne Semaine (Numéro court) : On réduit à 30px */ #planningTable th.col-sticky-sem, #planningTable td.col-sticky-sem { width: 10px !important; min-width: 10px !important; max-width: 10px !important; padding: 2px !important; font-size: 0.85rem !important; } /* 3. CORRECTION CRITIQUE : Le décalage "Sticky" de la colonne Semaine */ /* Puisque la colonne Mois fait 35px, la colonne Semaine doit démarrer à 35px (et non plus 54px) */ #planningTable tbody td.col-sticky-sem, #planningTable thead tr th.col-sticky-sem { left: 15px !important; } /* ========================================================================== RÉGLAGES MILLIMÉTRÉS (FIX ALIGNEMENTS & STICKY) ========================================================================== */ /* 1. On force un alignement strict pour éviter que les bordures de "Av." et "Use" ne se désalignent */ #planningTable { table-layout: fixed !important; width: max-content !important; min-width: 100% !important; } /* 2. Colonne Mois : Box-sizing inclut le padding pour un calcul mathématique exact */ .col-month, #planningTable th.col-sticky-mois, #planningTable td.col-sticky-mois { box-sizing: border-box !important; width: 25px !important; /* 15px + marges de sécurité */ min-width: 25px !important; max-width: 25px !important; padding: 2px !important; overflow: hidden; } /* 3. Colonne Semaine : Le décalage (left) correspond EXACTEMENT à la largeur du Mois */ #planningTable th.col-sticky-sem, #planningTable td.col-sticky-sem { box-sizing: border-box !important; left: 25px !important; /* Doit être rigoureusement égal au width du Mois ! */ width: 20px !important; /* 10px + marges */ min-width: 20px !important; max-width: 20px !important; padding: 2px !important; font-size: 0.8rem !important; overflow: hidden; } /* 4. Sécurité Anti-Trous pour les headers collants du haut (Empêche de voir à travers lors du scroll) */ #planningTable thead tr { height: 32px !important; } #planningTable thead th { height: 32px !important; box-sizing: border-box !important; } #planningTable thead tr:nth-child(1) th { top: 0 !important; } #planningTable thead tr:nth-child(2) th { top: 32px !important; } #planningTable thead tr:nth-child(3) th { top: 64px !important; }