/* global.css */ :root { /* Couleurs de base */ --primary: #3b82f6; --primary-dark: #1d4ed8; --success: #10b981; --warning: #f59e0b; --danger: #ef4444; /* Textes & Fonds */ --text-main: #0f172a; --text-muted: #64748b; --bg-page: #f8fafc; --bg-panel: #ffffff; --bg-subtle: #f1f5f9; --bg-soft: #eff6ff; --bg-danger-soft: #fef2f2; --bg-overlay: rgba(15, 23, 42, 0.6); --text-on-primary: #ffffff; --text-danger-soft: #f87171; --border-strong: #cbd5e1; --border-danger-soft: #fecaca; --focus-ring: rgba(37, 99, 235, 0.1); /* Bordures, Arrondis & Ombres */ --border-light: #e2e8f0; --radius: 12px; --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); } /* πŸ›‘οΈ RESET MOBILE UNIVERSEL */ *, *::before, *::after { box-sizing: border-box; } html, body { margin: 0; padding: 0; max-width: 100vw; overflow-x: hidden; } body { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background-color: var(--bg-page); color: var(--text-main); min-height: 100vh; display: flex; flex-direction: column; } img, svg, video { max-width: 100%; height: auto; } body.no-scroll { overflow: hidden !important; height: 100vh !important; } /* === HEADER & NAVIGATION === */ .pf-header { background: var(--bg-panel); border-bottom: 1px solid var(--border-light); padding: 0 20px; height: 64px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; } .pf-logo { font-weight: 800; font-size: 1.25rem; color: var(--primary); text-decoration: none; letter-spacing: -0.03em; } .pf-nav { display: flex; gap: 8px; } .pf-nav-link { text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: 0.9rem; padding: 8px 12px; border-radius: 8px; transition: all 0.2s; } .pf-nav-link:hover { background: var(--bg-subtle); color: var(--text-main); } .pf-nav-link--active { background: var(--bg-soft); color: var(--primary); } .pf-header-actions { display: flex; align-items: center; gap: 16px; } .pf-user-badge { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; } .pf-logout-btn { color: var(--danger); font-weight: 600; font-size: 0.85rem; text-decoration: none; padding: 6px 12px; border-radius: 6px; border: 1px solid transparent; } .pf-logout-btn:hover { background: var(--bg-danger-soft); border-color: var(--border-danger-soft); } .pf-burger-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-main); } /* === MENU MOBILE (Sidebar "Off-Canvas") === */ .pf-mobile-overlay { display: none; position: fixed; inset: 0; background: var(--bg-overlay); backdrop-filter: blur(4px); z-index: 998; opacity: 0; transition: opacity 0.3s ease; } .pf-mobile-overlay.is-visible { display: block; opacity: 1; } .pf-mobile-menu { position: fixed; top: 0; right: -300px; width: 280px; height: 100vh; /* Fallback (sΓ©curitΓ©) */ height: 100dvh; background: var(--bg-panel); box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15); z-index: 999; transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; padding: 0; color: var(--text-main); } .pf-mobile-menu.is-open { right: 0; /* Le menu glisse dans l'Γ©cran */ } .pf-mobile-menu-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-light); background: var(--bg-page); } .pf-mobile-close-btn { background: none; border: none; font-size: 2rem; line-height: 1; color: var(--text-muted); cursor: pointer; } .pf-mobile-menu-body { padding: 20px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 12px; flex: 1; overflow-y: auto; } .pf-mobile-nav-link { font-size: 1.1rem; font-weight: 600; text-decoration: none; color: var(--text-main); padding: 14px 16px; /* Plus large pour le tactile */ border-radius: 12px; display: flex; align-items: center; gap: 12px; transition: background 0.2s; } .pf-mobile-nav-link:active { background: var(--bg-subtle); } .pf-mobile-logout { color: var(--danger); background: var(--bg-danger-soft); margin-top: 10px; } .pf-mobile-menu-header .pf-logo, body.pf-home .pf-mobile-menu-header .pf-logo { color: var(--primary); } /* Force la croix en gris, MÊME sur la page d'accueil */ .pf-mobile-close-btn, body.pf-home .pf-mobile-close-btn { color: var(--text-muted); } .pf-mobile-close-btn:hover { color: var(--danger); /* Touche de rouge au survol */ } /* === MAIN CONTENT & TYPOGRAPHY === */ .pf-main { flex: 1; width: 100%; max-width: 1400px; margin: 0 auto; padding: 32px 20px; } .pf-container { width: 100%; max-width: 1200px; margin: 0 auto; } h1 { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; color: var(--text-main); line-height: 1.2; } p { color: var(--text-muted); line-height: 1.6; margin-bottom: 1.5rem; } /* === COMPOSANTS GLOBAUX === */ .pf-modules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 32px; } .pf-module-card { background: var(--bg-panel); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 24px; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; gap: 12px; } .pf-module-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); } .pf-card-icon { font-size: 2rem; margin-bottom: 4px; } .pf-card-title { font-size: 1.25rem; font-weight: 700; color: var(--text-main); margin: 0; } .pf-card-desc { font-size: 0.95rem; color: var(--text-muted); flex: 1; } .pf-card-cta { font-size: 0.9rem; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 4px; } /* Boutons Standards */ .pf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--primary); color: var(--text-on-primary); border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; padding: 12px 24px; text-decoration: none; } .pf-btn:hover { background: var(--primary-dark); } .pf-btn.btn-secondary { background: var(--bg-panel); color: var(--text-muted); border: 1px solid var(--border-light); } .pf-btn.btn-secondary:hover { background: var(--bg-page); color: var(--text-main); border-color: var(--border-strong); } /* Formulaires & Inputs Standards */ .pf-form-group { margin-bottom: 20px; } .pf-label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); } .pf-input { width: 100%; padding: 12px; border: 1px solid var(--border-light); border-radius: 8px; font-size: 1rem; background: var(--bg-page); color: var(--text-main); transition: all 0.2s; font-family: inherit; box-sizing: border-box; } .pf-input:focus { background: var(--bg-panel); border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); } /* Tableaux Standards */ .pf-table { width: 100%; background: var(--bg-panel); border-radius: var(--radius); box-shadow: var(--shadow); border-collapse: separate; border-spacing: 0; overflow: hidden; } .pf-table th { background: var(--bg-page); padding: 16px; text-align: left; font-weight: 600; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; border-bottom: 1px solid var(--border-light); white-space: nowrap; } .pf-table td { padding: 10px 16px; border-bottom: 1px solid var(--bg-page); vertical-align: middle; font-size: 0.95rem; } .pf-table tbody tr:last-child td { border-bottom: none; } .pf-table tbody tr:hover { background-color: var(--bg-page); } /* === πŸͺŸ LE DESIGN SYSTEM DES MODALES (Applicable partout) === */ .pf-modal { display: none; position: fixed; inset: 0; z-index: 9999; background: var(--bg-overlay); backdrop-filter: blur(4px); align-items: center; justify-content: center; padding: 20px; } .pf-modal.is-active, .pf-modal.open { display: flex; } /* Supporte tes deux syntaxes JS */ .pf-modal-content { background: var(--bg-panel); width: 100%; max-width: 500px; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 32px; position: relative; display: flex; flex-direction: column; gap: 10px; animation: pfModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1); margin: auto; } .pf-modal-title { margin-top: 0; font-size: 1.5rem; font-weight: 800; color: var(--text-main); border-bottom: 1px solid var(--border-light); padding-bottom: 15px; margin-bottom: 8px; } .modal-footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-light); width: 100%; box-sizing: border-box; } .modal-footer .pf-btn { width: auto; min-width: 100px; padding: 10px 20px; } /* Ajustement pour modale */ @keyframes pfModalPop { from { transform: scale(0.95) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } } /* === FOOTER & TOASTS === */ .pf-footer { border-top: 1px solid var(--border-light); background: var(--bg-panel); padding: 24px; text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: auto; } .pf-toast { position: fixed; bottom: 20px; right: 20px; padding: 12px 24px; background: var(--bg-panel); border-radius: 12px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); border-left: 5px solid var(--primary); z-index: 10000; transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); font-weight: 600; color: var(--text-main); } .pf-toast.is-visible { transform: translateX(0); } /* === RESPONSIVE MOBILE === */ @media (max-width: 768px) { .pf-header { padding: 0 16px; } .pf-nav, .pf-header-actions { display: none; } .pf-burger-btn { display: block; } .pf-main { padding: 16px 10px; } .pf-mobile-nav-link { font-size: 1.2rem; font-weight: 600; text-decoration: none; color: var(--text-main); padding: 12px 0; border-bottom: 1px solid var(--border-light); } /* πŸ“± BOTTOM SHEET MODALES MOBILE */ .pf-modal { align-items: center !important; /* On remet au centre */ padding: 20px; } .pf-modal-content { width: 100% !important; max-width: none !important; border-radius: 20px !important; /* On garde les arrondis partout */ transform: none !important; animation: pfModalPop 0.3s ease !important; /* On remet l'animation desktop */ margin: auto !important; } .pf-modal-content::before { content: ""; display: block; width: 40px; height: 5px; background: var(--border-strong); border-radius: 10px; margin: -10px auto 20px auto; } .modal-footer { flex-direction: column-reverse; } .modal-footer .pf-btn { width: 100%; margin-top: 8px; } @keyframes slideUpSheet { to { transform: translateY(0); } } } /* === BOUTONS D'ACTION ICΓ”NES UNIVERSELS (Γ‰dition / Suppression) === */ .btn-icon-action { border: none; background: transparent; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 6px; border-radius: 6px; transition: all 0.2s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; } .btn-icon-action.edit { color: var(--primary); } .btn-icon-action.edit:hover { background: var(--bg-soft); /* Fond bleu trΓ¨s clair au survol */ } .btn-icon-action.delete { color: var(--danger); } .btn-icon-action.delete:hover { background: var(--bg-danger-soft); /* Fond rouge trΓ¨s clair au survol */ } /* === 13. PAGE DE CONNEXION (LOGIN) === */ .pf-login-wrapper { display: flex; justify-content: center; align-items: center; min-height: calc(100vh - 200px); padding: 20px; } .pf-login-card { width: 100%; max-width: 400px; padding: 32px; background: var(--bg-panel); border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--border-light); } .pf-login-header { text-align: center; margin-bottom: 24px; } .pf-login-header .pf-login-icon { width: 60px; /* Tu peux ajuster cette valeur selon le rendu voulu */ height: auto; margin-bottom: 15px; border-radius: 12px; /* Optionnel : ajoute un lΓ©ger arrondi si ton favicon est carrΓ© */ } .pf-login-header h1 { font-size: 1.8rem; margin: 0; color: var(--text-main); } .pf-login-header p { color: var(--text-muted); margin-top: 8px; font-size: 0.95rem; } .pf-login-error { background: var(--bg-danger-soft); color: var(--danger); padding: 12px; border-radius: 8px; border: 1px solid var(--border-danger-soft); margin-bottom: 20px; font-size: 0.9rem; text-align: center; font-weight: 600; } .pf-btn-block { width: 100%; justify-content: center; margin-top: 10px; padding: 14px; font-size: 1.05rem; } /* --- Optimisation Login Mobile --- */ @media (max-width: 480px) { .pf-login-wrapper { padding: 0; align-items: flex-start; /* AlignΓ© en haut pour laisser de la place au clavier */ background: var(--bg-panel); } .pf-login-card { border-radius: 0; /* Supprime les arrondis pour un look plein Γ©cran */ border: none; box-shadow: none; padding: 60px 24px; min-height: 100vh; } } /* ⚠️ IMPORTANT : Γ‰viter le zoom auto sur iOS */ .pf-login-card .pf-input { font-size: 16px; /* En dessous de 16px, Safari iOS zoome automatiquement sur le champ */ padding: 14px; /* Zone de clic plus large pour les doigts */ } .pf-btn-block { padding: 16px; /* Bouton plus haut pour un appui facile au pouce */ font-size: 1.1rem; } /* ══════════════════════════════════════════════════════════════ DARK MODE β€” [data-theme="dark"] sur ══════════════════════════════════════════════════════════════ */ [data-theme="dark"] { --text-main: #e6edf3; --text-muted: #8b949e; --bg-page: #0d1117; --bg-panel: #161b22; --border-light: #30363d; --shadow: 0 4px 6px -1px rgba(0,0,0,.4), 0 2px 4px -2px rgba(0,0,0,.3); --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -4px rgba(0,0,0,.4); --bg-subtle: rgba(255,255,255,.06); --bg-soft: rgba(59,130,246,.15); --bg-danger-soft: rgba(239,68,68,.1); --bg-overlay: rgba(0, 0, 0, 0.55); --text-danger-soft: #f87171; --border-strong: #484f58; --border-danger-soft: rgba(239,68,68,.3); --focus-ring: rgba(59,130,246,.25); } [data-theme="dark"] body { background: var(--bg-page); color: var(--text-main); } [data-theme="dark"] .pf-header { background: var(--bg-panel); border-color: var(--border-light); } [data-theme="dark"] .pf-logo { color: var(--primary); } [data-theme="dark"] .pf-nav-link { color: var(--text-muted); } [data-theme="dark"] .pf-nav-link:hover { background: rgba(255,255,255,.06); color: var(--text-main); } [data-theme="dark"] .pf-nav-link--active { background: rgba(59,130,246,.15); color: var(--primary); } [data-theme="dark"] .pf-user-badge { color: var(--text-muted); } [data-theme="dark"] .pf-logout-btn { color: #f87171; } [data-theme="dark"] .pf-logout-btn:hover { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); } [data-theme="dark"] .pf-burger-btn { color: var(--text-main); } [data-theme="dark"] .pf-mobile-menu { background: var(--bg-panel); color: var(--text-main); } [data-theme="dark"] .pf-mobile-menu-header { background: var(--bg-page); border-color: var(--border-light); } [data-theme="dark"] .pf-mobile-nav-link { color: var(--text-main); border-color: var(--border-light); } [data-theme="dark"] .pf-mobile-nav-link:active { background: rgba(255,255,255,.06); } [data-theme="dark"] .pf-module-card { background: var(--bg-panel); border-color: var(--border-light); } [data-theme="dark"] .pf-module-card:hover { border-color: #484f58; box-shadow: var(--shadow); } [data-theme="dark"] .pf-card-title { color: var(--text-main); } [data-theme="dark"] .pf-card-desc { color: var(--text-muted); } [data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 { color: var(--text-main); } [data-theme="dark"] p { color: var(--text-muted); } [data-theme="dark"] .pf-btn.btn-secondary { background: var(--bg-panel); color: var(--text-muted); border-color: var(--border-light); } [data-theme="dark"] .pf-btn.btn-secondary:hover { background: rgba(255,255,255,.05); color: var(--text-main); border-color: #484f58; } [data-theme="dark"] .pf-input { background: #1c2128; border-color: var(--border-light); color: var(--text-main); } [data-theme="dark"] .pf-input::placeholder { color: #484f58; } [data-theme="dark"] .pf-input:focus { background: #1c2128; border-color: var(--primary); } [data-theme="dark"] .pf-table { background: var(--bg-panel); } [data-theme="dark"] .pf-table th { background: #1c2128; color: var(--text-muted); border-color: var(--border-light); } [data-theme="dark"] .pf-table td { border-color: rgba(48,54,61,.5); color: var(--text-main); } [data-theme="dark"] .pf-table tbody tr:hover { background: rgba(255,255,255,.03); } [data-theme="dark"] .pf-modal-content { background: var(--bg-panel); border: 1px solid var(--border-light); } [data-theme="dark"] .pf-modal-title { border-color: var(--border-light); color: var(--text-main); } [data-theme="dark"] .modal-footer { border-color: var(--border-light); } [data-theme="dark"] .pf-footer { background: var(--bg-panel); border-color: var(--border-light); } [data-theme="dark"] .pf-toast { background: var(--bg-panel); color: var(--text-main); box-shadow: 0 10px 25px rgba(0,0,0,.4); } [data-theme="dark"] .pf-login-card { background: var(--bg-panel); border-color: var(--border-light); } [data-theme="dark"] .pf-login-error { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); } [data-theme="dark"] .btn-icon-action.edit:hover { background: rgba(59,130,246,.15); } [data-theme="dark"] .btn-icon-action.delete:hover { background: rgba(239,68,68,.1); } /* ─── Pill toggle thΓ¨me ────────────────────────────────────── */ .theme-switch { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 3px 5px; border-radius: 8px; transition: background .15s; } .theme-switch:hover { background: #f1f5f9; } [data-theme="dark"] .theme-switch:hover { background: rgba(255,255,255,.08); } .ts-sun, .ts-moon { font-size: .85rem; line-height: 1; transition: opacity .2s; user-select: none; } [data-theme="dark"] .ts-sun { opacity: .3; } .ts-moon { opacity: .3; } [data-theme="dark"] .ts-moon { opacity: 1; } .ts-track { position: relative; width: 36px; height: 20px; background: #cbd5e1; border-radius: 999px; flex-shrink: 0; transition: background .25s; } [data-theme="dark"] .ts-track { background: #2563eb; } .ts-thumb { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s cubic-bezier(.4,0,.2,1); } [data-theme="dark"] .ts-thumb { transform: translateX(16px); }