/*
 * Page de maintenance Watiqa.ma : mise en page.
 * Couleurs reprises du site (thème citoyen) et du logo Watiqa.
 */
:root {
  color-scheme: light;
  --green: #008344;
  --green-dark: #026033;
  --green-soft: #e7f3ec;
  --red: #c4202b;
  --red-soft: #fbeaeb;
  --ink: #1d2a24;
  --text: #55625c;
  --line: #e3ebe6;
  --bg: #f4f7f5;
  --card: #ffffff;
  --latin: "Rubik", "Segoe UI", Roboto, Arial, sans-serif;
  --arabic: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(0, 131, 68, .10), transparent 60%),
    radial-gradient(800px 480px at 100% 100%, rgba(196, 32, 43, .08), transparent 60%),
    var(--bg);
  font-family: var(--latin);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Motif zellige discret en fond */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("../images/zellige.svg") repeat;
  background-size: 56px 56px;
  opacity: .07;
}

/* Bandeau supérieur */
.topbar {
  position: relative;
  z-index: 1;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbar::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0 50%, var(--green) 50% 100%);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo-watiqa { height: 64px; width: auto; display: block; }
.logo-royaume { height: 56px; width: auto; display: block; }

/* Contenu principal */
main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 64px;
}
.card {
  width: 100%;
  max-width: 960px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(16, 40, 28, .04), 0 24px 60px -20px rgba(16, 40, 28, .18);
  overflow: hidden;
  text-align: center;
}
.card-body { padding: 48px 48px 40px; }

.illustration {
  width: 132px;
  height: 132px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--green-soft);
  display: grid;
  place-items: center;
}
.illustration svg { width: 104px; height: 104px; overflow: visible; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 14px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
}
.badge .dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}
.badge .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--red);
}

/* Messages FR / AR côte à côte */
.messages {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 40px;
  margin-top: 32px;
  text-align: start;
}
.divider { background: var(--line); }
.msg h1, .msg h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -.01em;
}
.msg p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
}
.msg p + p { margin-top: 12px; }
.msg .thanks { color: var(--green-dark); font-weight: 500; }
.msg[lang="ar"] { font-family: var(--arabic); }
.msg[lang="ar"] h2 { font-weight: 700; font-size: 29px; line-height: 1.5; letter-spacing: 0; }
.msg[lang="ar"] p { font-size: 18px; line-height: 1.9; }
.msg[lang="ar"] .thanks { font-weight: 600; }

/* Barre de statut */
.status {
  border-top: 1px solid var(--line);
  background: #fafcfb;
  padding: 20px 48px 24px;
}
.status-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-size: 15px;
  font-weight: 500;
}
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0, 131, 68, .2);
  border-top-color: var(--green);
}
.progress {
  position: relative;
  height: 6px;
  margin: 14px auto 0;
  max-width: 420px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.progress::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #2fa86b);
}

/* Mobile */
@media (max-width: 760px) {
  .topbar-inner { padding: 8px 16px; }
  .logo-watiqa { height: 48px; }
  .logo-royaume { height: 40px; }
  main { padding: 24px 16px 40px; }
  .card { border-radius: 20px; }
  .card-body { padding: 32px 22px 28px; }
  .status { padding: 18px 22px 22px; }
  .illustration { width: 108px; height: 108px; margin-bottom: 20px; }
  .illustration svg { width: 84px; height: 84px; }
  .messages { grid-template-columns: 1fr; gap: 24px; margin-top: 24px; text-align: center; }
  .divider { height: 1px; width: 64px; margin: 0 auto; }
  .msg h1, .msg h2 { font-size: 23px; }
  .msg[lang="ar"] h2 { font-size: 24px; }
  .msg p { font-size: 16px; }
  .msg[lang="ar"] p { font-size: 17px; }
}
