/* ==========================================================================
   GOBCard 2026 - System Design (Vanilla CSS & Adaptive Design System)
   ========================================================================== */

:root {
  /* Brand Palette (GOBELINS & CCI Paris) */
  --gob-blue: #1d4ed8;
  --gob-blue-dark: #1e40af;
  --gob-blue-light: #eff6ff;
  --gob-primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  --cci-dark: #0f172a;
  
  /* Status Colors */
  --status-pending: #f59e0b;
  --status-approved: #10b981;
  --status-rejected: #ef4444;
  --offline-banner: #ea580c;

  /* Fonts */
  --font-base: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Platform Tokens - Default (iOS Style) */
  --bg-app: #f2f2f7;
  --bg-card: #ffffff;
  --text-main: #1c1c1e;
  --text-muted: #8e8e93;
  --border-color: #e5e5ea;
  --radius-card: 16px;
  --radius-btn: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --header-bg: rgba(255, 255, 255, 0.85);
  --header-blur: blur(20px);
  --nav-active: #007aff;
}

/* Material Design 3 Theme (Android) */
body.platform-android {
  --font-base: "Roboto", -apple-system, sans-serif;
  --bg-app: #f7f9fc;
  --bg-card: #ffffff;
  --text-main: #191c1e;
  --text-muted: #70777c;
  --border-color: #dde3ea;
  --radius-card: 24px;
  --radius-btn: 100px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --header-bg: #ffffff;
  --header-blur: none;
  --nav-active: #1d4ed8;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-app: #000000;
    --bg-card: #1c1c1e;
    --text-main: #ffffff;
    --text-muted: #8e8e93;
    --border-color: #2c2c2e;
    --header-bg: rgba(28, 28, 30, 0.85);
  }

  body.platform-android {
    --bg-app: #111315;
    --bg-card: #1d2024;
    --text-main: #e2e2e6;
    --text-muted: #8c9197;
    --border-color: #2e353b;
    --header-bg: #1d2024;
  }
}

/* ==========================================================================
   Global Reset & Layout Constraints
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-base);
  background-color: #e2e8f0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Simulated Mobile Container (Centered & Responsive) */
#app, #app-shell {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  max-height: 932px;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border-radius: 0;
}

@media (min-width: 450px) {
  #app, #app-shell {
    border-radius: 40px;
    height: 92vh;
    border: 8px solid #000000;
  }
}

/* Top App Header & Burger Trigger - Base & Adaptive */
.app-top-header {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 0 16px;
  z-index: 90;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

/* iOS HIG Style (Translucent Blur & Seamless Header) */
body.platform-ios .app-top-header {
  background-color: rgba(242, 242, 247, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  body.platform-ios .app-top-header {
    background-color: rgba(0, 0, 0, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

.top-header-brand {
  font-size: 16px;
  font-weight: 800;
  color: var(--gob-blue);
  letter-spacing: -0.3px;
}

.btn-burger-trigger {
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-main);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.btn-burger-trigger:hover {
  background-color: #ffffff;
  transform: scale(1.05);
}

/* Android Material Design 3 Style (Flat Top App Bar) */
body.platform-android .app-top-header {
  background-color: var(--bg-app);
  border-bottom: none;
  height: 56px;
}

body.platform-android .btn-burger-trigger {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: transparent;
}

body.platform-android .btn-burger-trigger:hover {
  background-color: rgba(29, 78, 216, 0.08);
}

/* Offline Indicator Banner */
#offline-banner {
  background-color: var(--offline-banner);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 6px 12px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 1000;
  animation: slideDown 0.3s ease;
}

#offline-banner.active {
  display: flex;
}

/* Main Scrollable View Area */
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 95px 16px;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   PWA Installation Banner
   ========================================================================== */

.pwa-banner {
  position: sticky;
  top: 56px;
  z-index: 90;
  background: var(--gob-primary-gradient);
  color: #ffffff;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.pwa-banner-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.pwa-banner-text {
  flex: 1;
}

.pwa-banner-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.pwa-banner-instructions {
  font-size: 12px;
  opacity: 0.95;
  margin-top: 2px;
  line-height: 1.35;
}

.pwa-banner-instructions svg {
  vertical-align: middle;
  display: inline-block;
  margin: 0 2px;
}

.pwa-btn-guide {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.pwa-btn-guide:hover {
  background: rgba(255, 255, 255, 0.4);
}

.pwa-banner-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* PWA Guide Modal Styles */
.pwa-guide-tabs {
  display: flex;
  gap: 8px;
  background-color: var(--bg-app);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
}

.pwa-tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.tab-icon-apple,
.tab-icon-svg {
  color: #64748b;
  fill: #64748b;
  font-size: 15px;
  transition: color 0.2s ease, fill 0.2s ease;
}

.pwa-tab-btn.active {
  background-color: var(--bg-card);
  color: var(--gob-blue);
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.pwa-tab-btn.active .tab-icon-apple,
.pwa-tab-btn.active .tab-icon-svg {
  color: var(--gob-blue);
  fill: var(--gob-blue);
}

.pwa-req-note {
  font-size: 13px;
  color: var(--gob-blue);
  background: rgba(29, 78, 216, 0.06);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px solid rgba(29, 78, 216, 0.12);
}

.pwa-steps-list {
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.6;
}

.pwa-steps-list li {
  margin-bottom: 10px;
}

/* Navigation Bar (Bottom) */
.app-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  min-height: 65px;
  padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
  background: var(--header-bg);
  backdrop-filter: var(--header-blur);
  -webkit-backdrop-filter: var(--header-blur);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid var(--border-color);
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  width: 25%;
  height: 100%;
  transition: color 0.2s;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.nav-item.active {
  color: var(--nav-active);
  font-weight: 700;
}

/* Views Management */
.view {
  display: none !important;
}

.view.active {
  display: block !important;
  animation: fadeIn 0.25s ease-in-out;
}

#view-login {
  display: none !important;
}

#view-login.active {
  display: flex !important;
  flex-direction: column;
}

/* ==========================================================================
   Screen 1: Identification / Login View
   ========================================================================== */

#view-login {
  min-height: 100%;
  padding: 30px 24px;
  background-color: #ffffff;
  text-align: center;
}

.login-lang-header {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 5px;
}

.btn-icon-lang {
  background: rgba(29, 78, 216, 0.08);
  border: none;
  color: var(--gob-blue);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
}

.login-brand-top {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.brand-logo-main {
  width: 240px;
  max-width: 85%;
  height: auto;
  object-fit: contain;
  margin-bottom: 25px;
}

.wheel-graphic {
  width: 100px;
  height: 100px;
  margin: 0 auto 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-wheel-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-title-login {
  font-size: 15px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 25px;
  letter-spacing: -0.2px;
}

.login-form {
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-bottom: 0;
}

.form-group {
  text-align: left;
  margin-bottom: 14px;
  width: 100%;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gob-blue);
  margin-bottom: 8px;
}

.form-input,
input[type="date"],
input[type="time"],
select.form-input,
textarea.form-input {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px 12px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-app);
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}

.form-input:focus {
  border-color: var(--gob-blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.login-btn-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.btn-primary-right {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background-color: var(--gob-blue);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.login-footer-cci {
  margin-bottom: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-cci-img {
  width: 260px;
  max-width: 85%;
  height: auto;
  object-fit: contain;
}

/* ==========================================================================
   Screen 2: Home View (Hero Cover & Contacts)
   ========================================================================== */

.home-hero-cover {
  position: relative;
  width: calc(100% + 32px);
  margin: -16px -16px 50px -16px;
  height: 185px;
  overflow: visible;
}

.hero-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-logo-badge {
  position: absolute;
  bottom: -45px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: var(--bg-app);
  border: 4px solid var(--bg-app);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 10;
}

.hero-badge-logo {
  width: 52%;
  height: auto;
  object-fit: contain;
}

.home-brand-text-block {
  text-align: center;
  margin-bottom: 24px;
}

.home-brand-title {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin: 0;
  text-transform: uppercase;
}

.home-brand-sub {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  margin-top: 2px;
}

.home-welcome-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.greeting-text {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.formation-text,
.welcome-desc-text {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.55;
}

.welcome-desc-text {
  margin-top: 12px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 20px 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Interlocuteur Cards List */
.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
  cursor: pointer;
}

.contact-card:hover {
  transform: translateY(-2px);
}

.contact-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #cbd5e1;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.contact-info {
  flex: 1;
}

.contact-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.contact-role {
  font-size: 13px;
  color: var(--gob-blue);
  font-weight: 600;
  margin-top: 2px;
}

.contact-actions {
  display: flex;
  gap: 8px;
}

.action-btn-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--gob-blue-light);
  color: var(--gob-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid rgba(37, 99, 235, 0.15);
  transition: all 0.2s ease;
}

.action-btn-circle:hover {
  background-color: rgba(37, 99, 235, 0.18);
  transform: scale(1.05);
}

.action-btn-circle svg {
  width: 18px;
  height: 18px;
  stroke: var(--gob-blue);
}

.telework-badge-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.4;
}

.telework-highlight {
  font-weight: 700;
  color: #0f172a;
}

/* ==========================================================================
   Screen 3: Pages & Tools View
   ========================================================================== */

.tools-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.domain-group {
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.domain-title {
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gob-blue);
  background-color: rgba(29, 78, 216, 0.04);
  border-bottom: 1px solid var(--border-color);
}

.tool-item {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s;
}

.tool-item:last-child {
  border-bottom: none;
}

.tool-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.tool-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.arrow-icon {
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   Screen 4: Retards / Claims View
   ========================================================================== */

.lateness-form-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

body.platform-android .lateness-form-card {
  border-radius: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.file-input-hidden {
  display: none !important;
}

.file-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background-color: var(--bg-app);
  border: 1.5px dashed var(--border-color);
  border-radius: 12px;
  color: var(--gob-blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

#attachment-preview-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-top: 12px;
  background-color: #f8fafc;
  border-radius: 12px;
  padding: 8px;
  border: 1px solid var(--border-color);
}

.preview-attachment {
  width: 100% !important;
  max-width: 100% !important;
  height: 140px !important;
  max-height: 140px !important;
  object-fit: contain !important;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  background-color: #ffffff;
}

.attachment-actions-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.btn-att-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-att-action.edit {
  background-color: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.btn-att-action.edit:hover {
  background-color: rgba(37, 99, 235, 0.18);
}

.btn-att-action.remove {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.btn-att-action.remove:hover {
  background-color: rgba(239, 68, 68, 0.18);
}

.btn-primary-form {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: var(--gob-primary-gradient);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  margin-top: 10px;
}

body.platform-android .btn-primary-form {
  border-radius: 100px;
}

.lateness-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lateness-item {
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.lateness-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.lateness-reason {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-status.reported {
  background-color: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

/* Profile Header Card */
.profile-header-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gob-primary-gradient);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-user-details {
  flex: 1;
}

.profile-name-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.profile-email-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.profile-formation-badge {
  font-size: 12px;
  color: var(--text-main);
  background-color: var(--bg-app);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  line-height: 1.3;
}

/* Color Picker Palette (7 Accent Colors) */
.setting-card.theme-color-card {
  flex-direction: column;
  align-items: flex-start;
}

.color-picker-palette {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 0;
}

.color-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.color-dot.active {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--gob-blue), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.setting-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setting-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setting-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.setting-value {
  font-size: 13px;
  color: var(--gob-blue);
  font-weight: 600;
}

/* Segmented Control for Language Switch */
.btn-segmented-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.btn-segmented-lang:hover {
  border-color: var(--gob-blue);
}

.lang-opt {
  color: #94a3b8;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.lang-opt.active {
  color: var(--gob-blue);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lang-divider {
  color: #cbd5e1;
  font-weight: 400;
}

/* Danger Logout Button */
.setting-card.danger-zone {
  padding: 8px;
  background-color: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-logout-danger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background-color: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
  transition: all 0.2s ease;
}

body.platform-android .btn-logout-danger {
  border-radius: 100px;
}

/* ==========================================================================
   Left Sliding Drawer (Style X / Gmail)
   ========================================================================== */

.drawer-overlay {
  align-items: stretch !important;
  justify-content: flex-start !important;
}

.burger-drawer-card {
  width: 82%;
  max-width: 320px;
  height: 100%;
  max-height: 100%;
  background-color: var(--bg-card);
  border-top-right-radius: 24px;
  border-bottom-right-radius: 24px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.active .burger-drawer-card {
  transform: translateX(0);
}

.drawer-header-user {
  padding: 24px 20px 18px 20px;
  background: var(--gob-primary-gradient);
  color: #ffffff;
  position: relative;
}

.drawer-user-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.drawer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #ffffff;
  color: var(--gob-blue-dark);
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.drawer-close-btn {
  position: static;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
}

.drawer-user-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.drawer-user-email {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 2px;
}

.drawer-user-formation {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1.3;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.burger-drawer-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 18px;
}

.burger-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.burger-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.2s ease;
}

.burger-menu-item:hover {
  background-color: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.2);
}

.burger-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--gob-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.burger-item-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--gob-blue);
}

.burger-item-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
}

/* Modals & Drawers */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  width: 100%;
  max-width: 430px;
  max-height: 85vh;
  background-color: var(--bg-card);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  padding: 24px 24px calc(28px + env(safe-area-inset-bottom, 12px)) 24px;
  overflow-y: auto;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #cbd5e1;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.giant-lateness-modal {
  text-align: center;
}

.giant-date-box {
  background: var(--gob-primary-gradient);
  color: #ffffff;
  padding: 24px;
  border-radius: 20px;
  margin: 16px 0;
}

.giant-day-name {
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
}

.giant-date-num {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.1;
  margin: 6px 0;
}

.giant-time {
  font-size: 22px;
  font-weight: 700;
  opacity: 0.9;
}

#giant-attachment-box {
  width: 100%;
  max-width: 100%;
  max-height: 220px;
  overflow: hidden;
  border-radius: 12px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  margin-top: 10px;
}

#giant-attachment-box img {
  width: 100% !important;
  max-width: 100% !important;
  height: 200px !important;
  max-height: 200px !important;
  object-fit: contain !important;
  display: block;
  margin: 0 auto;
}

.tool-detail-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
}

.tool-detail-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-main);
}

.tool-detail-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Admin Preview Mode Styles */
.admin-banner {
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  color: #ffffff;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.25);
  position: relative;
  z-index: 95;
}

.admin-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-btn-reset {
  background: #ffffff;
  color: #1e3a8a;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.admin-btn-reset:hover {
  opacity: 0.9;
}

.admin-switch-card {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px;
}

.admin-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-badge-icon {
  font-size: 22px;
}

.admin-subtext {
  font-size: 12px;
  color: var(--text-muted);
}

/* Carte Message de l'École (Annonce dynamique Back-Office) */
.school-announcement-card {
  margin-top: 16px;
  background-color: var(--bg-card);
  border: 1px solid rgba(13, 148, 136, 0.3);
  border-radius: var(--border-radius-card);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  animation: fadeIn 0.3s ease;
}

.announcement-header {
  margin-bottom: 8px;
}

.announcement-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  background-color: var(--gob-blue-light);
  color: var(--gob-blue-dark);
}

.announcement-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.announcement-body {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.admin-select-dropdown {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--border-radius-btn);
  border: 1px solid var(--gob-blue-light);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* Verrouillage de la rotation paysage sur téléphone mobile (Force mode portrait) */
@media screen and (orientation: landscape) and (max-width: 900px) {
  body::before {
    content: "📱 Merci de remettre votre téléphone en mode Portrait pour utiliser GOBCard.";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gob-blue-dark);
    color: #ffffff;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
  }
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
