/* ==========================================================
   style.css - mise en page de l'horloge d'Antalaha
   Approche "mobile d'abord" : on écrit pour un petit écran,
   puis on élargit si l'écran est grand.
   ========================================================== */

/* Couleurs réutilisables (variables CSS) */
:root {
  --fond-page: #0f2236;
  --texte: #f4f7fa;
  --texte-doux: #c5d3e0;
  --accent: #ffb703;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 16px 16px;           /* petite marge sur les côtés (mobile) */
  background: var(--fond-page);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.4;
}

header, main, footer {
  max-width: 640px;               /* on ne dépasse pas 640 px de large */
  margin: 0 auto;
}

h1 { font-size: 1.5rem; margin: 16px 0 4px; }
.sous-titre { margin: 0 0 12px; color: var(--texte-doux); }

/* Boîte qui reçoit le canevas p5 */
#conteneur-canvas {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;               /* arrondit aussi les coins du canevas */
  line-height: 0;                 /* évite un petit espace sous le canevas */
}
#conteneur-canvas canvas { display: block; max-width: 100%; }

.texte-heure { font-size: 1.25rem; font-weight: 600; margin: 12px 0 0; }
.texte-date { margin: 2px 0 12px; color: var(--texte-doux); text-transform: capitalize; }

.commandes {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #1a3752;
  border-radius: 12px;
}
.commandes input[type="range"] { width: 100%; }

button {
  font: inherit;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #1b1b1b;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;               /* cible tactile confortable */
}
button:focus-visible, input:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.avertissement { background: #7a2e2e; padding: 12px; border-radius: 8px; }
footer { color: var(--texte-doux); font-size: 0.9rem; margin-top: 16px; }
code { background: #1a3752; padding: 1px 5px; border-radius: 4px; }
