/* La charte d'ecran de la plateforme - version 1 (16/08/2026 au soir).
 *
 * La condition de Fredo : beau et perenne. Un seul fichier de styles,
 * partage par tous les ecrans et, demain, par tout ce que les kits de
 * fabrication produisent. Il se lit tel qu'il est servi - pas d'usine.
 *
 * Les couleurs de la maison :
 *   nuit    #1d2a4d   le fond profond
 *   ciel    #30549b   le fond qui respire
 *   craie   #f4f6fb   le texte sur fond sombre
 *   encre   #22283a   le texte sur fond clair
 *   accent  #ffb454   le geste qu'on invite a faire
 *   alerte  #e4572e   ce qui refuse
 */

:root {
  --nuit:   #1d2a4d;
  --ciel:   #30549b;
  --craie:  #f4f6fb;
  --encre:  #22283a;
  --accent: #ffb454;
  --alerte: #e4572e;
}

html, body { height: 100%; margin: 0; }

body {
  font-family: system-ui, sans-serif;
  background: linear-gradient(160deg, var(--nuit) 0%, var(--ciel) 100%);
  color: var(--craie);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* La carte : le rectangle clair au centre, commun a tous les petits ecrans. */
.carte {
  background: var(--craie);
  color: var(--encre);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(10, 16, 35, .45);
  padding: 2.4rem 2.6rem;
  width: min(92vw, 22rem);
}

.carte h1 {
  margin: 0 0 .3rem;
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: .01em;
}

.carte .sous-titre {
  margin: 0 0 1.6rem;
  font-size: .95rem;
  opacity: .65;
}

.champ { display: block; margin-bottom: 1.1rem; }

.champ span {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: .35rem;
  opacity: .8;
}

.champ input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: .6rem .75rem;
  border: 1.5px solid #c7cede;
  border-radius: 8px;
  background: #fff;
  color: var(--encre);
}

.champ input:focus {
  outline: none;
  border-color: var(--ciel);
  box-shadow: 0 0 0 3px rgba(48, 84, 155, .18);
}

.bouton {
  width: 100%;
  font: inherit;
  font-weight: 650;
  padding: .7rem;
  border: none;
  border-radius: 8px;
  background: var(--nuit);
  color: var(--craie);
  cursor: pointer;
}

.bouton:hover { background: var(--ciel); }

.bouton-discret {
  background: none;
  border: none;
  font: inherit;
  color: var(--ciel);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* Le refus : sobre, clair, sans drame. */
.refus {
  background: #fdeae3;
  border: 1.5px solid var(--alerte);
  color: #8a2f14;
  border-radius: 8px;
  padding: .65rem .8rem;
  font-size: .92rem;
  margin-bottom: 1.1rem;
}

.refus:empty { display: none; }

/* L'invitation : la meme boite, en accueillant. */
.invitation {
  background: #fff7ea;
  border: 1.5px solid var(--accent);
  color: #7a5410;
  border-radius: 8px;
  padding: .65rem .8rem;
  font-size: .92rem;
  margin-bottom: 1.1rem;
}

/* ---- La navigation a tuiles (seance du squelette, 16/08 au soir) ---- */

body.page {
  display: block;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.entete {
  max-width: 60rem;
  margin: 0 auto 1.6rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.entete h1 { flex: 1; margin: 0; font-size: 1.5rem; font-weight: 650; }

.fil a, .fil { color: var(--craie); opacity: .75; text-decoration: none; }
.fil a:hover { opacity: 1; text-decoration: underline; }

.sortie button { color: var(--craie); opacity: .75; }
.sortie button:hover { opacity: 1; }

.tuiles {
  max-width: 60rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 1rem;
}

.tuile {
  display: block;
  background: var(--craie);
  color: var(--encre);
  border-radius: 12px;
  padding: 1.2rem 1.3rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(10, 16, 35, .35);
  transition: transform .08s ease;
}

.tuile:hover { transform: translateY(-2px); }

.tuile .tuile-sorte {
  display: block;
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .5;
  margin-bottom: .3rem;
}

.tuile .tuile-nom { font-size: 1.08rem; font-weight: 650; }

.tuiles .vide {
  grid-column: 1 / -1;
  opacity: .8;
  font-size: .95rem;
}

/* ---- Les panneaux des rubriques-outils (16/08 tard le soir) ---- */

.panneau {
  max-width: 60rem;
  margin: 0 auto;
  background: var(--craie);
  color: var(--encre);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(10, 16, 35, .45);
  padding: 1.6rem 2rem;
}

.panneau h2 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; }

.tableau { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tableau th {
  text-align: left; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .05em; opacity: .55; padding: .4rem .6rem;
}
.tableau td { padding: .55rem .6rem; border-top: 1px solid #e3e7f0; vertical-align: top; }

.actions { text-align: right; white-space: nowrap; }
.actions form { display: inline-block; margin-left: .8rem; }
.en-ligne { display: inline-block; }
.en-ligne .valeur { font: inherit; padding: .25rem .4rem; border: 1.5px solid #c7cede; border-radius: 6px; width: 9rem; margin-right: .4rem; }

.discret { opacity: .6; font-size: .88rem; }

.formulaire { max-width: 24rem; margin-top: .6rem; }
.formulaire.en-ligne-large { max-width: none; display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.formulaire.en-ligne-large .champ { margin-bottom: 0; min-width: 12rem; }
.formulaire.en-ligne-large .bouton { width: auto; padding: .6rem 1.1rem; }

.champ select {
  width: 100%; box-sizing: border-box; font: inherit;
  padding: .55rem .6rem; border: 1.5px solid #c7cede; border-radius: 8px;
  background: #fff; color: var(--encre);
}

.panneau .invitation code { font-size: 1.05rem; }

/* Un lien qui se presente comme un bouton (confirmation de creation) */
a.bouton { display: inline-block; text-decoration: none; text-align: center; width: auto; padding: .7rem 1.4rem; box-sizing: border-box; }
