Annuaire › Code ouvert
Code publié par son auteur, en lecture seule. « Copier dans mon espace » crée un nouveau site à vous (non publié) que vous pouvez modifier librement.
css/style.css · 3.7 Ko
/* ==========================================================================
* css/style.css — Mise en page « Maison 3D » (mobile d'abord)
* ========================================================================== */
:root {
--fond: #fdf8ee;
--carte: #ffffff;
--texte: #2b2118; /* texte brun très foncé : contraste élevé */
--accent: #8a3b1f; /* couleur du toit en tôle */
--bordure: #e3d3b4;
--ciel: #dff3f5;
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
line-height: 1.5;
color: var(--texte);
background: var(--fond);
overflow-x: hidden; /* jamais de défilement horizontal */
}
.noscript { margin: 0; padding: 12px 16px; background: #fff3cd; color: #5c4400; }
.entete {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
background: var(--accent);
color: #fff;
}
.entete h1 { margin: 0; font-size: 1.25rem; }
.entete .sous-titre { margin: 0; font-size: 0.9rem; opacity: 0.95; }
/* L'icône est noire : on l'inverse pour la rendre blanche sur fond brun. */
.entete img { filter: invert(1); flex: 0 0 auto; }
main { max-width: 860px; margin: 0 auto; padding: 12px 16px 24px; }
/* ---- LE CANEVAS ----
.scene fixe la taille ; le canevas la remplit (100 % × 100 %).
Hauteur adaptative : entre 280 px et 520 px, environ 75 % de la largeur. */
.scene {
position: relative;
width: 100%;
height: clamp(280px, 75vw, 520px);
background: linear-gradient(var(--ciel), #fdfbf2);
border: 1px solid var(--bordure);
border-radius: 14px;
overflow: hidden;
}
/* touch-action: none UNIQUEMENT sur le canevas : le doigt tourne la maison
au lieu de faire défiler la page. */
.zdog-canvas {
display: block;
width: 100%;
height: 100%;
touch-action: none;
cursor: grab;
}
.zdog-canvas:active { cursor: grabbing; }
.info { margin: 8px 0; font-size: 0.9rem; }
/* ---- COMMANDES ---- */
.commandes { display: grid; gap: 12px; margin-top: 8px; }
@media (min-width: 720px) {
.commandes { grid-template-columns: 1fr 1fr; }
.commandes fieldset:last-child { grid-column: 1 / -1; }
}
fieldset {
margin: 0;
padding: 10px 12px 12px;
background: var(--carte);
border: 1px solid var(--bordure);
border-radius: 12px;
}
legend { font-weight: 700; color: var(--accent); padding: 0 6px; }
.rangee { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rangee input[type="range"] { flex: 1 1 160px; min-width: 0; }
.bouton, .pastille {
font: inherit;
min-height: 44px; /* cible tactile confortable */
padding: 8px 14px;
border-radius: 10px;
border: 2px solid var(--accent);
background: var(--carte);
color: var(--accent);
cursor: pointer;
}
.bouton:hover { background: #f8e8dc; }
.bouton[aria-pressed="true"] { background: var(--accent); color: #fff; }
/* Les pastilles de couleur : une bande de couleur à gauche du texte. */
.pastille {
border-left: 14px solid var(--pastille, #ccc);
color: var(--texte);
border-color: var(--texte);
border-left-color: var(--pastille, #ccc);
border-left-width: 14px;
}
.pastille[aria-pressed="true"] { background: #2b2118; color: #fff; }
button:focus-visible, input:focus-visible {
outline: 3px solid #1b6ca8;
outline-offset: 2px;
}
/* Texte lisible uniquement par les lecteurs d'écran (étiquette du curseur). */
.visuel-cache {
position: absolute;
width: 1px; height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
}
.pied { padding: 16px; text-align: center; font-size: 0.9rem; border-top: 1px solid var(--bordure); }
.pied p { margin: 0 auto; max-width: 640px; }
code { background: #f1e6cf; padding: 1px 5px; border-radius: 4px; }