/* iamhoveh.com — style rétro façon vieux bureau d'ordinateur */
:root {
  --gris: #c0c0c0;
  --gris-fonce: #808080;
  --noir: #000;
  --blanc: #fff;
  --titre1: #000080;
  --titre2: #1084d0;
  --bureau: #008080;
  --police: "Tahoma", "MS Sans Serif", "Verdana", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--police);
  font-size: 12px;
  color: var(--noir);
  -webkit-font-smoothing: none;
}
html { background: var(--bureau); }

a { color: inherit; }

/* ---------- Fond d'écran (web : image large / mobile : image en hauteur) ----------
   L'illustration est TOUJOURS affichée en entier (jamais rognée).
   Si l'écran n'a pas le même format, les bords sont complétés par
   une copie floutée de la même image. */
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("images/fond-web.jpg") center / cover no-repeat;
}
body::before { filter: blur(28px) brightness(.85); transform: scale(1.15); }
body::after { background-size: contain; }
@media (orientation: portrait) {
  body::before, body::after { background-image: url("images/fond-mobile.jpg"); }
}

/* ---------- Bureau ---------- */
.bureau {
  min-height: 100%;
  padding: 16px 16px 56px;
  position: relative;
}

.icones {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
}

.icone {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--blanc);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.icone svg { width: 40px; height: 40px; image-rendering: pixelated; }
.icone span { padding: 1px 3px; text-shadow: 1px 1px 0 #000; }
.icone:hover span, .icone:focus span { background: var(--titre1); outline: 1px dotted #fff; text-shadow: none; }

/* ---------- Fenêtres ---------- */
.fenetre {
  background: var(--gris);
  border: 2px solid;
  border-color: var(--blanc) var(--noir) var(--noir) var(--blanc);
  box-shadow: inset -1px -1px 0 var(--gris-fonce), inset 1px 1px 0 #dfdfdf;
  padding: 3px;
  margin: 0 auto;
  max-width: 100%;
}

.barre-titre {
  background: linear-gradient(90deg, var(--titre1), var(--titre2));
  color: var(--blanc);
  font-weight: bold;
  padding: 3px 4px 3px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}
.barre-titre .nom { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.boutons-titre { display: flex; gap: 2px; }
.btn-titre {
  width: 18px; height: 16px;
  background: var(--gris);
  border: 1px solid;
  border-color: var(--blanc) var(--noir) var(--noir) var(--blanc);
  font: bold 10px/12px var(--police);
  color: var(--noir);
  text-decoration: none;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.menu-fenetre {
  display: flex;
  gap: 2px;
  padding: 2px 0;
}
.menu-fenetre a {
  padding: 2px 8px;
  text-decoration: none;
}
.menu-fenetre a:hover, .menu-fenetre a.actif { background: var(--titre1); color: var(--blanc); }

.contenu { padding: 8px; }

.creux {
  background: var(--blanc);
  border: 2px solid;
  border-color: var(--gris-fonce) var(--blanc) var(--blanc) var(--gris-fonce);
  box-shadow: inset 1px 1px 0 var(--noir);
}

/* ---------- Boutons ---------- */
.bouton {
  background: var(--gris);
  border: 2px solid;
  border-color: var(--blanc) var(--noir) var(--noir) var(--blanc);
  box-shadow: inset -1px -1px 0 var(--gris-fonce), inset 1px 1px 0 #dfdfdf;
  font: 12px var(--police);
  color: var(--noir);
  padding: 4px 12px;
  min-height: 24px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.bouton:active, .bouton.enfonce {
  border-color: var(--noir) var(--blanc) var(--blanc) var(--noir);
  box-shadow: inset 1px 1px 0 var(--gris-fonce);
  background: #d4d4d4;
}
.bouton:disabled { color: var(--gris-fonce); text-shadow: 1px 1px 0 #fff; cursor: default; }
.bouton:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }

input[type="text"], textarea {
  font: 12px var(--police);
  padding: 4px;
  width: 100%;
  background: var(--blanc);
  border: 2px solid;
  border-color: var(--gris-fonce) var(--blanc) var(--blanc) var(--gris-fonce);
  box-shadow: inset 1px 1px 0 var(--noir);
  outline: none;
}

/* ---------- Page d'accueil : dossiers ---------- */
.fenetre-accueil { width: 760px; margin-top: 40px; }
.accueil-zone {
  background: #e4e4e4;
  padding: 18px 20px 22px;
  border: 2px solid;
  border-color: var(--gris-fonce) var(--blanc) var(--blanc) var(--gris-fonce);
}
.signature {
  text-align: center;
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 54px;
  margin: 4px 0 6px;
  letter-spacing: 1px;
}
.signature .logo { display: block; width: 150px; max-width: 80%; height: auto; margin: 0 auto; }
.sous-titre { text-align: center; margin: 6px 0 16px; color: #333; }

.dossiers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto;
}
.dossier {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: bold;
  padding: 6px;
}
.dossier svg { width: 84px; height: 68px; }
.dossier:hover span, .dossier:focus span { background: var(--titre1); color: #fff; }
.dossier span { padding: 1px 4px; overflow-wrap: anywhere; }

/* ---------- Barre des tâches ---------- */
.barre-taches {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 36px;
  background: var(--gris);
  border-top: 2px solid var(--blanc);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px;
  z-index: 10;
}
.barre-taches .bouton { font-weight: bold; }
.barre-taches .onglets { display: flex; gap: 4px; flex: 1; overflow: hidden; }
.barre-taches .onglets .bouton { font-weight: normal; min-width: 110px; justify-content: flex-start; }
.horloge {
  padding: 4px 10px;
  border: 1px solid;
  border-color: var(--gris-fonce) var(--blanc) var(--blanc) var(--gris-fonce);
  min-width: 64px;
  text-align: center;
}

/* ---------- Boîte de dialogue ---------- */
.voile {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.25);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.voile.ouvert { display: flex; }
.dialogue { width: 380px; }
.dialogue label { display: block; margin: 8px 0 3px; }
.dialogue .actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.dialogue .apercu { width: 100%; display: block; margin-bottom: 4px; }
.message { margin-top: 8px; min-height: 16px; }
.message.erreur { color: #a00000; }

/* ---------- Fenêtre réduite (bouton _) : on voit toute l'illustration ---------- */
body.reduite .bureau > .fenetre { display: none; }
.btn-titre[data-action] { cursor: pointer; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .bureau { padding: 10px 8px 52px; }
  .icones {
    position: static;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 10px;
  }
  .icone { width: auto; gap: 2px; font-size: 11px; }
  .icone svg { width: 30px; height: 30px; }
  .signature { font-size: 36px; }
  .barre-taches .onglets .bouton { min-width: 0; }
}

/* Téléphone tenu droit : fenêtre d'accueil compacte, collée en bas,
   pour laisser le haut de l'illustration bien visible */
@media (max-width: 820px) and (orientation: portrait) {
  .fenetre-accueil {
    position: fixed;
    left: 8px; right: 8px; bottom: 44px;
    width: auto;
    margin: 0;
  }
  .accueil-zone { padding: 10px 8px 12px; }
  .signature .logo { width: 110px; }
  .sous-titre { margin: 4px 0 10px; font-size: 11px; }
  .dossiers { gap: 4px; }
  .dossier { padding: 2px; gap: 3px; font-size: 11px; text-align: center; }
  .dossier svg { width: 56px; height: 46px; }
}
