/* ============ INTRO : ECRAN DE BOOT ============ */

html, body {
  margin: 0;
  padding: 0;
}

#intro {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 100;
}

#boot-screen {
  position: absolute;
  inset: 0;
  padding: 28px 32px;
  overflow: hidden;
  font-family: "Courier New", monospace;
  font-size: 19px;
  font-weight: bold;
  line-height: 1.45;
  color: #66ff99;
  text-shadow: 0 0 6px rgba(102, 255, 153, 0.55);
}

#boot-text {
  display: inline;
  margin: 0;
  font: inherit;
  white-space: pre-wrap;
}

#boot-cursor {
  display: inline-block;
  background: #66ff99;
  color: #66ff99;
  box-shadow: 0 0 6px rgba(102, 255, 153, 0.55);
}

.intro-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.22) 0px,
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 3px
  );
}

#intro-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (max-width: 700px) {
  #boot-screen {
    font-size: 14px;
    padding: 16px 12px;
  }
}

#skip-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  pointer-events: auto;
  background: transparent;
  color: #6f6f6f;
  font-family: "Courier New", monospace;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid #444;
  cursor: pointer;
}

#skip-btn:hover {
  color: #cfcfcf;
  border-color: #888;
}

#fade {
  position: absolute;
  inset: 0;
  background: #dff5df;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

/* ============ THEMES DE COULEURS ============
   Modeles facon "Proprietes d'affichage" de Windows 95. Le theme change la
   teinte des bandeaux, des titres et du fond etoile. */

body.theme-prairie #oldsite { background-color: #0a2a12; }
body.theme-prairie .banner,
body.theme-prairie .menu-title,
body.theme-prairie #v95-taskbar .v95-start { background: #205020; }
body.theme-prairie .banner { color: #d8ff90; }
body.theme-prairie .content h2 { color: #205020; }
body.theme-prairie .v95-menu a:hover { background: #205020; }

body.theme-prune #oldsite { background-color: #24102e; }
body.theme-prune .banner,
body.theme-prune .menu-title { background: #4a1d5c; }
body.theme-prune .banner { color: #ffd0ff; }
body.theme-prune .content h2 { color: #4a1d5c; }
body.theme-prune .v95-menu a:hover { background: #4a1d5c; }

body.theme-brique #oldsite { background-color: #2e1408; }
body.theme-brique .banner,
body.theme-brique .menu-title { background: #7a2810; }
body.theme-brique .banner { color: #ffe0a0; }
body.theme-brique .content h2 { color: #7a2810; }
body.theme-brique .v95-menu a:hover { background: #7a2810; }

body.theme-ardoise #oldsite { background-color: #14181c; }
body.theme-ardoise .banner,
body.theme-ardoise .menu-title { background: #3a4450; }
body.theme-ardoise .banner { color: #d0e4f0; }
body.theme-ardoise .content h2 { color: #3a4450; }
body.theme-ardoise .v95-menu a:hover { background: #3a4450; }

/* ============ BARRE DES TACHES ============ */

#v95-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: #c0c0c0;
  border-top: 2px outset #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px;
  z-index: 90;
  font-family: Verdana, sans-serif;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.35);
}

body.has-taskbar {
  padding-bottom: 46px !important;
}

body.has-taskbar #intro {
  z-index: 100;
}

.v95-left, .v95-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.v95-start {
  background: #c0c0c0;
  border: 2px outset #e8e8e8;
  font-family: Verdana, sans-serif;
  font-size: 13px;
  font-weight: bold;
  padding: 4px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.v95-start:active {
  border-style: inset;
}

.v95-logo {
  display: inline-block;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(90deg, #ff0000 50%, #00a000 50%) top / 100% 50% no-repeat,
    linear-gradient(90deg, #0000ff 50%, #ffff00 50%) bottom / 100% 50% no-repeat;
  border: 1px solid #404040;
}

.v95-quick {
  font-size: 12px;
  color: #000000;
  text-decoration: none;
  background: #c0c0c0;
  border: 2px outset #e8e8e8;
  padding: 4px 10px;
}

.v95-quick:active {
  border-style: inset;
}

.v95-tray {
  background: #c0c0c0;
  border: 2px inset #a0a0a0;
  font-family: Verdana, sans-serif;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
}

.v95-badge {
  display: inline-block;
  background: #808080;
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  min-width: 14px;
  padding: 1px 3px;
  text-align: center;
}

.v95-badge-alert {
  background: #cc0000;
  animation: blinker 1.2s step-start infinite;
}

.v95-radio-on {
  background: #a8d0a8;
  border-style: inset;
}

.v95-radio-paused {
  background: #d8c890;
  border-style: inset;
  animation: blinker 1.4s step-start infinite;
}

.v95-clock {
  background: #c0c0c0;
  border: 2px inset #a0a0a0;
  font-size: 12px;
  padding: 4px 10px;
}

.v95-menu {
  position: fixed;
  background: #c0c0c0;
  border: 2px outset #e8e8e8;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
  min-width: 180px;
  z-index: 95;
  padding: 2px;
}

.v95-menu a {
  display: block;
  font-family: Verdana, sans-serif;
  font-size: 12px;
  color: #000000;
  text-decoration: none;
  padding: 6px 12px;
}

.v95-menu a:hover {
  background: #000080;
  color: #ffffff;
}

.v95-menu .v95-sep {
  height: 2px;
  background: #808080;
  margin: 2px 6px;
  border-bottom: 1px solid #ffffff;
}

.v95-menu .v95-empty {
  display: block;
  font-size: 12px;
  color: #505050;
  padding: 8px 12px;
}

@media (max-width: 700px) {
  .v95-quick {
    display: none;
  }
}

/* ============ LE VIEUX SITE ============ */

#oldsite {
  min-height: 100vh;
  background-color: #000030;
  background-image:
    radial-gradient(1px 1px at 40px 60px, #ffffff, transparent),
    radial-gradient(1px 1px at 190px 120px, #cccccc, transparent),
    radial-gradient(2px 2px at 320px 40px, #ffffff, transparent),
    radial-gradient(1px 1px at 460px 170px, #aaaaaa, transparent),
    radial-gradient(1px 1px at 90px 200px, #ffffff, transparent),
    radial-gradient(2px 2px at 260px 220px, #dddddd, transparent);
  background-size: 520px 260px;
  font-family: "Times New Roman", Times, serif;
  padding: 12px 0 40px 0;
}

/* Filtre scanlines CRT : desactive par defaut (lisibilite), conserve pour un
   futur reglage utilisateur. Pour l'activer : ajouter la classe crt-enabled
   sur <body> (ce sera le bouton "effet CRT" des parametres). */
.crt-overlay {
  display: none;
}

body.crt-enabled .crt-overlay {
  display: block;
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 50;
}

.frame {
  width: 92%;
  max-width: 1520px;
  margin: 0 auto;
  background: #c0c0c0;
  border: 3px outset #e8e8e8;
}

/* Bandeau */
.banner {
  background: #000080;
  color: #ffff00;
  text-align: center;
  padding: 10px;
  border-bottom: 3px ridge #808080;
}

.banner h1 {
  margin: 4px 0;
  font-size: 42px;
  letter-spacing: 3px;
  text-shadow: 2px 2px 0 #ff00ff;
}

.banner-stars {
  color: #00ffff;
  font-family: "Courier New", monospace;
}

.blink {
  color: #00ff00;
  font-weight: bold;
  animation: blinker 1s step-start infinite;
}

@keyframes blinker {
  50% { opacity: 0; }
}

.marquee {
  margin-top: 8px;
  overflow: hidden;
  position: relative;
  height: 22px;
  background: #000000;
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-size: 15px;
  white-space: nowrap;
  border: 2px inset #808080;
}

.marquee span {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 22px;
  animation: scroll-left 22s linear infinite;
}

@keyframes scroll-left {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

/* Menu */
.sidebar {
  width: 210px;
  background: #a0a0a0;
  padding: 10px;
  border-right: 2px ridge #808080;
  font-size: 16px;
}

.menu-title {
  text-align: center;
  font-weight: bold;
  background: #000080;
  color: #ffffff;
  padding: 3px;
  margin-bottom: 6px;
}

.menu {
  list-style: square;
  padding: 0 0 0 20px;
  margin: 0 0 12px 0;
}

.menu li {
  margin: 6px 0;
}

.menu a {
  color: #0000ee;
}

.menu a:visited {
  color: #551a8b;
}

.new-tag {
  color: #ff0000;
  font-weight: bold;
  font-size: 11px;
  animation: blinker 0.8s step-start infinite;
}

.counter-box {
  background: #000000;
  color: #00ff00;
  text-align: center;
  font-family: "Courier New", monospace;
  font-size: 11px;
  padding: 6px;
  margin: 10px 0;
  border: 2px inset #808080;
}

.counter {
  margin: 4px 0;
}

.counter span {
  display: inline-block;
  background: #003300;
  color: #00ff00;
  font-size: 18px;
  font-weight: bold;
  padding: 2px 4px;
  margin: 0 1px;
  border: 1px solid #006600;
}

.badge {
  background: #ffffff;
  color: #000080;
  text-align: center;
  font-size: 10px;
  font-weight: bold;
  font-family: Verdana, sans-serif;
  padding: 5px 2px;
  margin: 6px 0;
  border: 2px outset #cccccc;
}

.badge-ie {
  color: #006600;
}

.webring {
  text-align: center;
  font-size: 12px;
  margin-top: 12px;
  padding: 6px 0;
  border-top: 1px solid #808080;
}

/* Contenu */
.content {
  padding: 16px 22px;
  background: #c0c0c0;
  font-size: 17px;
}

.content h2 {
  color: #800000;
  font-size: 24px;
  background: #d8d8d8;
  padding: 3px 8px;
  border: 1px solid #808080;
}

.content a {
  color: #0000ee;
}

.content a:visited {
  color: #551a8b;
}

.construction {
  text-align: center;
  background: #ffff00;
  color: #000000;
  font-weight: bold;
  padding: 8px;
  margin: 14px 0;
  border: 3px dashed #ff0000;
}

.cone {
  color: #ff6600;
  font-family: "Courier New", monospace;
}

.news-table {
  width: 100%;
  background: #808080;
}

.news-table th {
  background: #000080;
  color: #ffffff;
  font-size: 15px;
}

.news-table td {
  background: #e8e8e8;
  font-size: 15px;
}

.news-table td:first-child {
  white-space: nowrap;
  font-family: "Courier New", monospace;
}

.photo-row {
  margin: 0 auto;
}

.photo {
  width: 140px;
  height: 100px;
  background: #404040;
  border: 3px outset #a0a0a0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-inner {
  color: #c0c0c0;
  font-family: "Courier New", monospace;
  font-size: 13px;
  text-align: center;
}

.caption {
  text-align: center;
  font-size: 12px;
  font-style: italic;
  margin-top: 4px;
}

.tile-link {
  text-decoration: none;
  color: #000000;
  display: block;
}

.tile-link:hover .photo {
  border-style: inset;
}

.tile-link:hover .photo-inner {
  color: #00ff00;
}

.contact-cta {
  display: inline-block;
  background: #000080;
  color: #ffff00;
  font-family: Verdana, sans-serif;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  padding: 10px 22px;
  border: 3px outset #6060c0;
}

.contact-cta:active {
  border-style: inset;
}

.contact-cta:hover {
  color: #ffffff;
}

.defi-box {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  background: #d8d8d8;
  border: 2px outset #e8e8e8;
  padding: 14px;
  max-width: 680px;
  margin: 0 auto;
}

.defi-box img {
  width: 240px;
  max-width: 100%;
  border: 3px inset #606080;
  background: #000;
  image-rendering: pixelated;
  align-self: flex-start;
}

.defi-infos {
  flex: 1;
  min-width: 220px;
}

.defi-title {
  font-size: 22px;
  font-weight: bold;
  color: #000080;
}

.hero-actions {
  text-align: center;
  margin: 22px 0 28px 0;
}

.hero-main,
.content a.hero-main,
.content a.hero-main:visited {
  display: inline-block;
  background: #c0c0c0;
  color: #000080;
  font-family: Verdana, sans-serif;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 1px;
  text-decoration: none;
  padding: 16px 38px;
  border: 4px outset #e8e8e8;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  transition: background 0.1s;
}

.hero-main:hover {
  background: #d4d4d4;
}

.hero-main:active {
  border-style: inset;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
  transform: translate(2px, 2px);
}

@media (max-width: 700px) {
  .hero-main {
    font-size: 15px;
    padding: 12px 18px;
  }
}

.hero-secondary {
  display: block;
  margin-top: 14px;
  font-size: 15px;
  color: #0000ee;
}

.contact-form {
  max-width: 520px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.ct-trap {
  position: absolute;
  left: -6000px;
  top: -6000px;
}

/* ============ JEUX EN LIGNE (salon commun) ============ */

.chess-wrap {
  max-width: 460px;
  margin: 0 auto 18px auto;
  background: #d8d8d8;
  border: 2px outset #e8e8e8;
  padding: 14px 18px;
}

.chess-wrap h3 {
  background: #000080;
  color: #ffffff;
  font-size: 14px;
  padding: 4px 8px;
  margin: -14px -18px 12px -18px;
}

.chess-wrap label {
  display: block;
  margin: 8px 0 2px 0;
  font-size: 13px;
}

.chess-wrap input[type="text"], .chess-wrap select {
  width: 100%;
  box-sizing: border-box;
  font-family: "Courier New", monospace;
  font-size: 14px;
  padding: 4px 8px;
  background: #ffffff;
  border: 2px inset #808080;
}

.chess-wrap button, .board-side button {
  background: #c0c0c0;
  font-family: Verdana, sans-serif;
  font-size: 12px;
  font-weight: bold;
  padding: 5px 14px;
  margin-top: 10px;
  border: 2px outset #e0e0e0;
  cursor: pointer;
}

.chess-wrap button:active, .board-side button:active {
  border-style: inset;
}

.games-table {
  width: 100%;
  background: #808080;
}

.games-table th {
  background: #000080;
  color: #ffffff;
  font-size: 12px;
  padding: 3px;
}

.games-table td {
  background: #e8e8e8;
  font-size: 13px;
  padding: 4px 6px;
}

.games-table .your-turn {
  color: #008000;
  font-weight: bold;
}

.board-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
}

.board-side {
  width: 240px;
  background: #d8d8d8;
  border: 2px outset #e8e8e8;
  padding: 10px 12px;
  font-size: 13px;
}

.board-side h4 {
  background: #000080;
  color: #ffffff;
  font-size: 12px;
  padding: 3px 6px;
  margin: -10px -12px 8px -12px;
}

/* ============ PROFILS ============ */

.profile-card {
  position: relative;
  background: #d8d8d8;
  border: 2px outset #e8e8e8;
  padding: 18px 150px 18px 22px;
  min-height: 120px;
  margin-bottom: 8px;
}

.profile-card .pc-avatar {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 110px;
  height: 110px;
  border: 4px inset #808080;
  background: #000030;
  image-rendering: pixelated;
}

.pc-name {
  font-size: 28px;
  font-weight: bold;
  color: #000080;
}

.pc-badge {
  display: inline-block;
  background: #aa0000;
  color: #ffffff;
  font-family: Verdana, sans-serif;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  vertical-align: middle;
  margin-bottom: 4px;
}

.pc-username, .pc-since {
  font-size: 14px;
  color: #404040;
}

.pc-bio {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.pc-stats {
  width: 100%;
  max-width: 640px;
  background: #808080;
  text-align: center;
}

.pc-stats th {
  background: #000080;
  color: #ffffff;
  font-size: 13px;
  padding: 4px;
}

.pc-stats td {
  background: #e8e8e8;
  font-size: 20px;
  font-weight: bold;
  color: #000080;
  padding: 8px;
}

.activity-list {
  max-width: 760px;
}

.activity-item {
  background: #e8e8e8;
  border: 1px solid #a0a0a0;
  padding: 7px 10px;
  margin-bottom: 5px;
  font-size: 14px;
}

.activity-item .act-date {
  display: inline-block;
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #505050;
  margin-right: 8px;
}

.activity-item a {
  color: #000080;
}

@media (max-width: 700px) {
  .profile-card {
    padding: 14px;
  }

  .profile-card .pc-avatar {
    position: static;
    display: block;
    margin-bottom: 10px;
    width: 80px;
    height: 80px;
  }
}

.links {
  list-style: none;
  padding-left: 8px;
}

.links li:before {
  content: "* ";
  color: #ff00ff;
  font-weight: bold;
}

.links li {
  margin: 6px 0;
}

.guestbook {
  background: #ffffee;
  padding: 8px 12px;
  border: 2px inset #808080;
  font-size: 14px;
}

.gb-form {
  margin-top: 10px;
  font-size: 14px;
}

.gb-form div {
  margin: 6px 0;
}

.gb-form input, .gb-form textarea {
  font-family: "Courier New", monospace;
  font-size: 13px;
  background: #ffffff;
  border: 2px inset #808080;
}

.gb-form input[type="submit"], .gb-form input[type="reset"] {
  background: #c0c0c0;
  border: 2px outset #e0e0e0;
  cursor: pointer;
  padding: 2px 10px;
}

.footer {
  text-align: center;
  font-size: 14px;
  color: #404040;
  margin-top: 10px;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 700px) {
  /* Intro */
  #intro-hint {
    font-size: 14px;
    letter-spacing: 1px;
    bottom: 16%;
    padding: 0 16px;
    box-sizing: border-box;
  }

  #skip-btn {
    font-size: 14px;
    padding: 10px 16px;
  }

  /* Le tableau devient une pile verticale */
  .frame,
  .frame tbody,
  .frame tr,
  .frame td {
    display: block;
    width: auto;
    box-sizing: border-box;
  }

  .frame {
    max-width: 100%;
    margin: 0 6px;
  }

  .banner h1 {
    font-size: 22px;
    letter-spacing: 2px;
  }

  .banner {
    padding: 8px 4px;
  }

  .marquee {
    font-size: 11px;
  }

  /* Le menu passe au-dessus du contenu */
  .sidebar {
    width: auto;
    border-right: none;
    border-bottom: 2px ridge #808080;
  }

  .menu {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    list-style: none;
    padding-left: 4px;
  }

  .menu li {
    margin: 4px 0;
  }

  .counter-box,
  .badge,
  .webring {
    display: inline-block;
    vertical-align: top;
    margin: 6px 4px;
  }

  .counter-box {
    min-width: 150px;
  }

  .webring {
    border-top: none;
    padding: 6px;
  }

  .content {
    padding: 10px;
    font-size: 14px;
  }

  .content h2 {
    font-size: 17px;
  }

  /* Photos empilees */
  .photo-row,
  .photo-row tbody,
  .photo-row tr {
    display: block;
  }

  .photo-row td {
    display: inline-block;
    vertical-align: top;
  }

  .photo {
    width: 128px;
    height: 92px;
  }

  .news-table td,
  .news-table th {
    font-size: 12px;
  }

  .gb-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .gb-form input[type="text"] {
    width: 60%;
  }

  .gb-form input[type="submit"],
  .gb-form input[type="reset"] {
    padding: 6px 12px;
  }
}

@media (max-width: 380px) {
  .banner h1 {
    font-size: 18px;
  }

  .photo-row td {
    display: block;
    text-align: center;
  }

  .photo {
    margin: 0 auto;
  }
}
