/* ═══════════════════════════════════════════════════
   RÉPIT EMERGO — Mode Pictogrammes (ARASAAC)
   Accessibility layer for visual communication
   Pictogrammes agrandis pour meilleure lisibilité
   ═══════════════════════════════════════════════════ */

/* ═══ PICTO TOGGLE BUTTON (navbar) ═══ */
.picto-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}
.picto-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid rgba(0,30,85,.12);
  border-radius: 6px;
  cursor: pointer;
  transition: all .25s ease;
}
.picto-toggle-btn:hover {
  background: var(--blue-pale);
  transform: scale(1.08);
  border-color: var(--blue);
}
.picto-toggle-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,168,67,.3);
}
.picto-toggle-btn img {
  width: 30px;
  height: 30px;
  border-radius: 2px;
  object-fit: contain;
}
[data-theme="dark"] .picto-toggle-btn {
  background: transparent;
  border-color: rgba(255,255,255,.15);
}
[data-theme="dark"] .picto-toggle-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.25);
}
[data-theme="dark"] .picto-toggle-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

/* ═══ VISIBILITY TOGGLING ═══ */
.picto-content {
  display: none !important;
}
body.picto-active .picto-content {
  display: block !important;
}
body.picto-active .text-content {
  display: none !important;
}

/* ═══ PICTO STORY SECTION ═══ */
.picto-story-section {
  padding: 40px 0 32px;
  border-bottom: 2px solid var(--blue-pale);
}
.picto-story-section:last-child {
  border-bottom: none;
}
.picto-story-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  margin-bottom: 20px;
}
.picto-story-text {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-mid);
  text-align: center;
  margin-bottom: 24px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
[data-theme="dark"] .picto-story-title {
  color: rgba(255,255,255,.95) !important;
}
[data-theme="dark"] .picto-story-text {
  color: rgba(255,255,255,.75) !important;
}
[data-theme="dark"] .picto-story-section {
  border-bottom-color: rgba(91,155,213,.15);
}

/* ═══ PICTO GRID ═══ */
.picto-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  padding: 16px 0;
}

/* ═══ PICTO CARD (LARGE) ═══ */
.picto-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  min-width: 150px;
  max-width: 190px;
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  transition: all .3s ease;
  text-align: center;
}
.picto-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-light);
  box-shadow: var(--shadow-lg);
}
.picto-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}
.picto-card .picto-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
[data-theme="dark"] .picto-card {
  background: var(--navy);
  border-color: rgba(91,155,213,.1);
}
[data-theme="dark"] .picto-card:hover {
  border-color: var(--blue);
}
[data-theme="dark"] .picto-card .picto-label {
  color: var(--sky);
}

/* ═══ PICTO SENTENCE (horizontal flow) ═══ */
.picto-sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px;
  padding: 16px 0;
  justify-content: center;
}
.picto-word {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform .2s ease;
}
.picto-word:hover { transform: scale(1.06); }
.picto-word img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  background: var(--white);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow-sm);
}
.picto-word span {
  font-size: .9rem;
  color: var(--text-mid);
  font-weight: 600;
}
[data-theme="dark"] .picto-word img {
  background: rgba(255,255,255,.08);
}
[data-theme="dark"] .picto-word span {
  color: rgba(255,255,255,.6);
}

/* ═══ PICTO SECTION HEADER ═══ */
.picto-section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 16px 0;
}
.picto-section-header img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.picto-section-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
}
[data-theme="dark"] .picto-section-header h2 {
  color: #E8EDF4 !important;
}

/* ═══ PICTO SCHEDULE ═══ */
.picto-schedule-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 28px;
  margin-bottom: 12px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--blue);
  transition: all .2s ease;
}
.picto-schedule-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}
.picto-schedule-item .time-picto {
  min-width: 72px;
  text-align: center;
}
.picto-schedule-item .time-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--blue);
}
.picto-schedule-item .activity-picto {
  display: flex;
  align-items: center;
  gap: 12px;
}
.picto-schedule-item .activity-picto img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--blue-pale);
  border-radius: var(--radius);
  padding: 6px;
}
.picto-schedule-item .activity-label {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
}
[data-theme="dark"] .picto-schedule-item {
  background: var(--navy);
  border-left-color: var(--blue);
}
[data-theme="dark"] .picto-schedule-item .activity-picto img {
  background: rgba(91,155,213,.15);
}
[data-theme="dark"] .picto-schedule-item .activity-label {
  color: var(--sky);
}

/* ═══ PICTO RULES ═══ */
.picto-rule {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  margin-bottom: 12px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.picto-rule img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}
.picto-rule .rule-text {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
}
.picto-rule.rule-good { border-left: 5px solid var(--green); }
.picto-rule.rule-bad { border-left: 5px solid var(--red-soft); }
.picto-rule .rule-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  font-weight: 700;
}
.picto-rule .rule-icon.yes { background: var(--green-light); color: var(--green); }
.picto-rule .rule-icon.no { background: #F5E0DF; color: var(--red-soft); }
[data-theme="dark"] .picto-rule {
  background: var(--navy);
}
[data-theme="dark"] .picto-rule .rule-text {
  color: var(--sky);
}

/* ═══ EMOTION BAR ═══ */
.picto-emotion-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 32px;
  background: var(--blue-pale);
  border-radius: var(--radius-lg);
  margin: 24px 0;
  flex-wrap: wrap;
}
.picto-emotion-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform .2s ease;
}
.picto-emotion-item:hover { transform: scale(1.08); }
.picto-emotion-item img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  background: white;
  border-radius: 50%;
  padding: 10px;
  box-shadow: var(--shadow-sm);
}
.picto-emotion-item span {
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy);
}
[data-theme="dark"] .picto-emotion-bar {
  background: rgba(91,155,213,.1);
}
[data-theme="dark"] .picto-emotion-item img {
  background: rgba(255,255,255,.08);
}
[data-theme="dark"] .picto-emotion-item span {
  color: var(--sky);
}

/* ═══ PICTO PROGRAM CARD ═══ */
.picto-program-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.picto-program-card h3 {
  font-size: 1.2rem;
  margin: 0;
}
.picto-program-card .ratio-badge {
  font-size: .85rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 100px;
  background: var(--blue-pale);
  color: var(--blue);
}
[data-theme="dark"] .picto-program-card {
  background: var(--navy);
}

/* ═══ PICTO INFO BANNER ═══ */
.picto-info-banner {
  background: var(--gold-light);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 28px auto;
  max-width: 650px;
}
.picto-info-banner img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  flex-shrink: 0;
}
.picto-info-banner p {
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  font-size: 1.05rem;
}

/* ═══ PICTO HERO OVERRIDES ═══ */
.hero .picto-content .picto-sentence .picto-word img {
  background: rgba(255,255,255,.85);
  border: 2px solid rgba(255,255,255,.4);
}
.hero .picto-content .picto-sentence .picto-word span {
  color: var(--navy);
}
.hero .picto-content h2 {
  color: var(--navy);
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 20px;
}
[data-theme="dark"] .hero .picto-content h2 {
  color: rgba(255,255,255,.95) !important;
}
[data-theme="dark"] .hero .picto-content .picto-sentence .picto-word span {
  color: rgba(255,255,255,.9) !important;
}
[data-theme="dark"] .hero .picto-content .picto-story-text {
  color: rgba(255,255,255,.8) !important;
}

/* ═══ CREDIT ARASAAC ═══ */
.arasaac-credit {
  text-align: center;
  padding: 20px;
  color: var(--text-light);
  font-size: .72rem;
  display: none;
}
body.picto-active .arasaac-credit {
  display: block;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .picto-card {
    min-width: 120px;
    max-width: 150px;
    padding: 16px 12px;
  }
  .picto-card img {
    width: 90px;
    height: 90px;
  }
  .picto-word img {
    width: 76px;
    height: 76px;
  }
  .picto-schedule-item {
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 18px;
  }
  .picto-schedule-item .activity-picto img {
    width: 60px;
    height: 60px;
  }
  .picto-emotion-bar {
    gap: 20px;
    padding: 24px;
  }
  .picto-emotion-item img {
    width: 72px;
    height: 72px;
  }
  .picto-grid {
    gap: 14px;
  }
  .picto-story-title {
    font-size: 1.3rem;
  }
  .picto-story-text {
    font-size: 1rem;
  }
  .picto-section-header h2 {
    font-size: 1.4rem;
  }
}
