:root{--navy:#123654;--blue:#176ca3;--border:#e0e8ef}body{background:#f4f7fb;line-height:1.5}header{gap:12px}main{margin-top:22px}.card{box-shadow:0 3px 18px rgba(20,54,84,.045)}nav button{transition:background .15s}nav button.active{background:#d9ebfa;color:#103b61;font-weight:700}.avatar{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;width:34px;height:34px;min-width:34px;border-radius:50%;background:#dbeaf6;color:#12466c;font-weight:700;font-size:12px}.avatar-large{width:66px;height:66px;font-size:20px}.profile-hero{display:flex;align-items:center;gap:16px;padding:16px;background:#f4f8fc;border-radius:12px;margin-bottom:16px}.profile-hero p{margin:3px 0}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #1475b6;outline-offset:2px}#notice p{padding:10px 12px;border-radius:8px;background:#edf7f0}#notice .error{background:#fff0f0}a{color:#075b99;overflow-wrap:anywhere}.item p{overflow-wrap:anywhere}@media(max-width:680px){header{padding:14px 16px;align-items:flex-start}header small{font-size:11px}main{margin:12px auto;padding:0 10px}.card{padding:15px;border-radius:12px}.grid{display:block}nav.card{position:sticky;top:0;z-index:5;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;overflow:visible;padding:9px;margin-bottom:12px}nav button{white-space:normal;text-align:center;padding:10px 5px;font-size:12px;margin:0;border-radius:8px}#logout{padding:9px;font-size:12px}h2{font-size:21px}input,textarea,select{font-size:16px}.row button{flex:1 1 auto}}

/* PASTEURS CONNECT - DESIGN MODERNE */

:root {
  --pc-primary: #173d70;
  --pc-primary-hover: #24558d;
  --pc-background: #f3f6fb;
  --pc-surface: #ffffff;
  --pc-text: #1d2d42;
  --pc-muted: #65758b;
  --pc-border: #e2e8f0;
  --pc-radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--pc-background);
  color: var(--pc-text);
  font-family: -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

/* CARTES */

.item,
.card {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 3px 14px rgba(22, 48, 80, .04);
}

/* TITRES */

h1, h2, h3 {
  color: var(--pc-primary);
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

h3 {
  font-size: 1.1rem;
}

/* BOUTONS */

button {
  background: var(--pc-primary);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

button:hover {
  background: var(--pc-primary-hover);
}

button:active {
  transform: scale(.98);
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

button.secondary {
  background: #edf2f9;
  color: var(--pc-primary);
  border-color: #dce5f1;
}

button.secondary:hover {
  background: #dfe9f6;
}

/* FORMULAIRES */

input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  padding: 12px 13px;
  border: 1px solid #d8e0eb;
  border-radius: 10px;
  background: #fff;
  color: var(--pc-text);
  font: inherit;
  font-size: 15px;
  margin-bottom: 12px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #a6c3e9;
  border-color: var(--pc-primary);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* PHOTOS DE PROFIL */

.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* TEXTE */

.muted,
small {
  color: var(--pc-muted);
}

a {
  color: var(--pc-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ACCESSIBILITÉ */

:focus-visible {
  outline: 3px solid #5b9be5;
  outline-offset: 3px;
}

/* MOBILE */

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  h2 {
    font-size: 1.3rem;
  }

  .item,
  .card {
    padding: 14px;
    border-radius: 12px;
  }

  button {
    min-height: 42px;
  }

  #content {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #pastoral-calendar {
    overflow-x: auto;
  }
}

/* CORRECTION DE L'EN-TÊTE PASTEURS CONNECT */

header,
.header,
.topbar,
.app-header {
  background: #173d70;
  color: #ffffff;
  border-bottom: 1px solid #315985;
}

/* NOM DE LA PLATEFORME */

header h1,
header h2,
header .brand,
header .logo,
.header h1,
.topbar h1,
.app-header h1 {
  color: #ffffff !important;
  font-weight: 800;
  opacity: 1;
  text-shadow: none;
}

/* TEXTES DE L'EN-TÊTE */

header p,
header small,
header span,
.header p,
.topbar p,
.app-header p {
  color: #ffffff;
}

/* BOUTONS DE NAVIGATION */

header button,
.header button,
.topbar button,
.app-header button {
  color: #ffffff;
  background: #24558d;
  border: 1px solid #52749d;
}

header button:hover,
.header button:hover,
.topbar button:hover,
.app-header button:hover {
  background: #356ba5;
}

/* ADAPTATION MOBILE */

@media (max-width: 600px) {
  header h1,
  .header h1,
  .topbar h1,
  .app-header h1 {
    font-size: 20px;
    line-height: 1.3;
  }

  header,
  .header,
  .topbar,
  .app-header {
    padding: 12px;
  }
}

/* BARRE DE NAVIGATION MOBILE */

#pc-mobile-nav {
  display: none;
}

@media (max-width: 767px) {
  body:has(#pc-mobile-nav) {
    padding-bottom: calc(85px + env(safe-area-inset-bottom));
  }

  #pc-mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    border-top: 1px solid #dce5f0;
    padding: 7px 5px calc(7px + env(safe-area-inset-bottom));
    box-shadow: 0 -3px 15px rgba(0, 0, 0, .07);
    justify-content: space-around;
    align-items: center;
  }

  #pc-mobile-nav .pc-mobile-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding: 5px 2px;
    gap: 3px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #65758b;
    font-size: 10px;
    font-weight: 600;
    box-shadow: none;
  }

  #pc-mobile-nav .pc-mobile-icon {
    font-size: 23px;
    line-height: 1;
  }

  #pc-mobile-nav .pc-mobile-link.active {
    background: #eaf1fb;
    color: #173d70;
  }

  #pc-mobile-nav .pc-mobile-link:hover {
    background: #edf2f9;
    color: #173d70;
  }
}

/* FIL D'ACTUALITÉ PASTEURS CONNECT */

.pc-feed {
  max-width: 760px;
  margin: 0 auto;
}

.pc-feed-heading {
  margin-bottom: 20px;
}

.pc-feed-heading h2 {
  margin-bottom: 5px;
}

.pc-composer,
.pc-post-card,
.pc-empty-feed {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(20,45,75,.05);
}

.pc-post-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.pc-post-author .avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pc-post-author strong {
  display: block;
  color: #173d70;
  font-size: 15px;
}

.pc-post-author small {
  display: block;
  color: #65758b;
  font-size: 12px;
}

.pc-composer textarea {
  min-height: 105px;
  background: #f7f9fc;
}

.pc-post-body {
  font-size: 15px;
  line-height: 1.75;
  color: #26364a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 15px 0 20px;
}

.pc-post-divider {
  height: 1px;
  background: #e8edf4;
  margin: 16px 0;
}

.pc-post-card h4 {
  color: #173d70;
  margin-bottom: 12px;
}

.pc-comment {
  background: #f3f6fb;
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 10px;
}

.pc-comment strong {
  font-size: 13px;
  color: #173d70;
}

.pc-comment p {
  margin: 5px 0 0;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pc-comment-form {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 15px;
}

.pc-comment-form input {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.pc-comment-form button {
  flex-shrink: 0;
}

.pc-empty-feed {
  text-align: center;
  color: #65758b;
}

@media (max-width: 600px) {
  .pc-composer,
  .pc-post-card,
  .pc-empty-feed {
    padding: 15px;
    border-radius: 13px;
  }

  .pc-post-author .avatar {
    width: 42px;
    height: 42px;
  }

  .pc-comment-form button {
    padding: 12px 10px;
  }
}

/* BOUTONS J'AIME */

.pc-like-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.pc-like-button {
  background: #f1f5fb;
  color: #173d70;
  border: 1px solid #dce5f0;
  border-radius: 25px;
  padding: 9px 16px;
}

.pc-like-button:hover {
  background: #e5edf8;
  color: #173d70;
}

.pc-like-button[aria-pressed="true"] {
  background: #fff0f2;
  color: #c62845;
  border-color: #f5c7d0;
}

.pc-like-count {
  color: #65758b;
  font-size: 13px;
}

/* PHOTOS DES PUBLICATIONS */

.pc-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.pc-photo-grid img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.pc-photo-grid img:only-child {
  grid-column: 1 / -1;
  height: auto;
  max-height: 450px;
  object-fit: contain;
}

#post-photos {
  margin: 8px 0;
}

#post-photo-status {
  font-size: 13px;
  color: #65758b;
}

@media (max-width: 600px) {
  .pc-photo-grid img {
    height: 135px;
  }
}

/* PHOTOS EN PLEIN ÉCRAN */

.pc-post-photos img {
  cursor: zoom-in;
}

#pc-photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, .96);
  display: flex;
  align-items: center;
  justify-content: center;
}

#pc-photo-viewer.hide {
  display: none !important;
}

#pc-photo-large {
  max-width: 92vw;
  max-height: 85vh;
  object-fit: contain;
}

#pc-photo-viewer button {
  position: absolute;
  z-index: 2;
  background: rgba(255,255,255,.15);
  color: white;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  padding: 0;
}

#pc-photo-close {
  top: 20px;
  right: 20px;
}

#pc-photo-prev {
  left: 12px;
}

#pc-photo-next {
  right: 12px;
}

#pc-photo-counter {
  position: absolute;
  bottom: 28px;
  color: white;
  font-size: 14px;
}

/* BOUTON SUPPRIMER UNE PUBLICATION */

.pc-delete-post {
  margin-left: auto;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid #e5b9b9;
  border-radius: 8px;
  color: #b42318;
  font-size: 12px;
  cursor: pointer;
}

.pc-delete-post:hover {
  background: #fff0f0;
}

.pc-delete-post:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* MODIFICATION DES PUBLICATIONS */

.pc-edit-post {
  padding: 7px 12px;
  background: #eef4ff;
  color: #174a87;
  border: 1px solid #c7d8f4;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

.pc-edit-panel {
  padding: 15px;
  margin: 12px 0;
  border: 1px solid #dce4ef;
  border-radius: 12px;
}

.pc-edit-panel textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.pc-edit-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.pc-edit-photo-item {
  position: relative;
  width: 90px;
  height: 90px;
}

.pc-edit-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.pc-edit-photo-item button {
  position: absolute;
  top: 3px;
  right: 3px;
  border: none;
  border-radius: 50%;
  background: #b42318;
  color: white;
  cursor: pointer;
}

.pc-edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* NOTIFICATIONS */

#pc-notification-bell {
  position: fixed;
  top: 75px;
  right: 18px;
  z-index: 9990;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #dbe3ef;
  background: white;
  font-size: 23px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,.12);
}

#pc-notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  padding: 3px 5px;
  border-radius: 20px;
  background: #d92d20;
  color: white;
  font-size: 11px;
  font-weight: bold;
}

#pc-notification-count[hidden],
#pc-notification-panel[hidden] {
  display: none !important;
}

#pc-notification-panel {
  position: fixed;
  top: 128px;
  right: 12px;
  z-index: 9991;
  width: min(360px, calc(100vw - 24px));
  max-height: 65vh;
  overflow-y: auto;
  background: white;
  color: #172033;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
}

.pc-notification-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #e5e7eb;
}

.pc-notification-heading button {
  border: none;
  background: transparent;
  font-size: 18px;
}

.pc-notification-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  padding: 14px;
  text-align: left;
  border: none;
  border-bottom: 1px solid #edf0f4;
  background: white;
  color: inherit;
  cursor: pointer;
}

.pc-notification-item.unread {
  background: #edf5ff;
}

.pc-notification-item span {
  font-size: 13px;
}

.pc-notification-item small {
  color: #64748b;
  font-size: 11px;
}

/* BADGE PROFIL VÉRIFIÉ */

.pc-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 5px;
  border-radius: 50%;
  background: #1877f2;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  vertical-align: middle;
}

/* PAGE D'ACCUEIL PUBLIQUE PASTEURS CONNECT */

.pc-welcome {
  background: linear-gradient(135deg, #102c46, #176ca3);
  color: #ffffff;
  border-radius: 20px;
  padding: 55px 35px;
  margin-bottom: 22px;
  overflow: hidden;
}

.pc-welcome-content {
  max-width: 920px;
  margin: auto;
}

.pc-eyebrow {
  display: inline-block;
  padding: 8px 14px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 30px;
  font-size: 13px;
  margin-bottom: 22px;
}

.pc-welcome h2 {
  color: #ffffff;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  margin-bottom: 20px;
}

.pc-welcome-content > p {
  color: #e2edf7;
  font-size: 17px;
  line-height: 1.7;
  max-width: 700px;
}

.pc-welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.pc-welcome-actions button {
  background: #ffffff;
  color: #123654;
  font-weight: 700;
  padding: 14px 25px;
  border-radius: 10px;
}

.pc-welcome-actions button.secondary {
  background: transparent;
  color: #ffffff;
  border: 1px solid #ffffff;
}

.pc-welcome-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.pc-welcome-features > div {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  padding: 22px;
  border-radius: 14px;
}

.pc-welcome-features strong {
  color: #ffffff;
  font-size: 16px;
}

.pc-welcome-features p {
  color: #dce9f4;
  line-height: 1.5;
  font-size: 14px;
  margin-bottom: 0;
}

@media (max-width: 680px) {
  .pc-welcome {
    padding: 35px 22px;
    border-radius: 15px;
  }

  .pc-welcome h2 {
    font-size: 32px;
  }

  .pc-welcome-content > p {
    font-size: 15px;
  }

  .pc-welcome-features {
    grid-template-columns: 1fr;
    margin-top: 30px;
  }

  .pc-welcome-actions button {
    flex: 1;
  }
}

/* MENU DÉROULANT PASTEURS CONNECT */

#pc-menu-button {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 13px 18px;
  background: #123654;
  color: white;
  border-radius: 10px;
  font-weight: 600;
  text-align: left;
}

#app {
  display: block;
}

#app.hide {
  display: none;
}

#nav {
  display: none;
  width: 100%;
  margin-bottom: 15px;
}

#nav:not(.hide) {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
}

/* PHOTO DE PROFIL EN HAUT À DROITE */

#pc-profile-avatar {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: #e5e7eb;
}

#pc-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

#pc-profile-avatar.hide {
  display: none !important;
}
