/* Couleurs de G.E.R.C (Odoo 1003) : rouge #E10600, jaune, noir #111111 ; titres en Anton, texte en Barlow.
   Sur téléphone : fond clair, gros textes, un seul bouton important par écran. */

@font-face { font-family: 'Anton'; src: url('/fonts/anton-latin-400-normal.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/fonts/barlow-latin-400-normal.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/fonts/barlow-latin-600-normal.woff') format('woff'); font-weight: 600; font-display: swap; }

:root {
  --fond: #f4f4f4;
  --surface: #ffffff;
  --surface-2: #e9e9e9;
  --noir: #111111;
  --texte: #111111;
  --texte-2: #555555;
  --trait: #d6d6d6;
  --rouge: #E10600;
  --rouge-appui: #b30500;
  --jaune: #FFD400;
  --anneau: #111111;
  --succes: #1d7a3e;
  --erreur: #b30500;
  --erreur-pale: #fde3e2;
  --ombre: 0 1px 2px rgb(0 0 0 / 0.05), 0 6px 18px rgb(0 0 0 / 0.07);
  --r: 8px;
  --barre-h: 88px;
  --titre: Anton, Impact, 'Arial Narrow', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 400 18px/1.45 Barlow, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.entete { background: var(--noir); padding: 8px 16px; border-bottom: 5px solid var(--jaune); }
.marque {
  display: flex; align-items: center; gap: 10px; max-width: 520px; margin: 0 auto;
  color: #fff; text-decoration: none; font: 400 18px/1 var(--titre); letter-spacing: 0.04em; text-transform: uppercase;
}
.marque img { display: block; width: auto; }

main { max-width: 520px; margin: 0 auto; padding: 20px 16px calc(var(--barre-h) + 90px); }
.chargement { color: var(--texte-2); text-align: center; margin-top: 40px; }

h1 { font: 400 36px/1.08 var(--titre); text-transform: uppercase; letter-spacing: 0.01em; margin: 4px 0 8px; }
h2 { font-size: 20px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
h2 em { font-style: normal; font-weight: 400; color: var(--texte-2); font-size: 16px; }
.intro { color: var(--texte-2); margin: 0 0 20px; }
.aide { color: var(--texte-2); margin: 8px 0 0; font-size: 16px; }
.alerte {
  display: inline-block; margin: 0 0 6px; padding: 4px 10px; background: var(--rouge); color: #fff;
  font: 400 15px/1.2 var(--titre); text-transform: uppercase; letter-spacing: 0.08em; transform: rotate(-2deg);
}

.num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--noir); color: var(--jaune); font-size: 16px; font-weight: 600; flex: none;
}

/* Champs */
.champ { display: block; margin: 0 0 16px; }
.champ span { display: block; font-weight: 600; margin-bottom: 6px; font-size: 17px; }
input[type=password], .saisie {
  width: 100%; min-height: 54px; padding: 12px 14px; font: inherit; color: inherit;
  background: var(--surface); border: 1.5px solid var(--trait); border-radius: var(--r);
}
input:focus-visible, button:focus-visible, a:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--anneau); outline-offset: 2px;
}

/* Boutons : rouge cerclé de noir, comme le bouton S'abonner du site */
.bouton-rouge {
  display: block; width: 100%; min-height: 58px; border: 3px solid var(--noir); border-radius: var(--r);
  background: var(--rouge); color: #fff; font: 400 23px/1.05 var(--titre); letter-spacing: 0.03em;
  text-transform: uppercase; cursor: pointer; padding: 8px 12px;
}
.bouton-rouge:active { background: var(--rouge-appui); }
.bouton-rouge[disabled] { opacity: .6; cursor: default; }
.bouton-trait {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 20px;
  border: 1.5px solid var(--noir); border-radius: var(--r); background: var(--surface);
  font: inherit; font-weight: 600; color: var(--texte); cursor: pointer; text-align: center;
}
a.bouton-trait { text-decoration: none; }
.lien { background: none; border: 0; padding: 8px 0; font: inherit; color: var(--texte-2); text-decoration: underline; cursor: pointer; }
.erreur { background: var(--erreur-pale); color: var(--erreur); padding: 12px 14px; border-radius: var(--r); font-weight: 600; margin: 0 0 16px; }
.connexion form { margin-top: 8px; }

/* Accueil : une carte par nouvelle vidéo */
.outils { display: grid; gap: 10px; }
.outil {
  display: block; border-radius: var(--r); background: var(--surface); box-shadow: var(--ombre);
  color: inherit; text-decoration: none; border-left: 6px solid var(--rouge); overflow: hidden;
}
.outil img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--noir); }
.outil div { padding: 12px 16px 14px; }
.outil strong { display: block; font-size: 19px; line-height: 1.25; }
.outil span { display: block; color: var(--texte-2); font-size: 16px; margin-top: 4px; }
.outil .suite { color: var(--rouge); font-weight: 600; }
.outil:active { background: var(--surface-2); }

.titre-liste { margin: 28px 0 12px; font: 400 24px/1.1 var(--titre); text-transform: uppercase; }
.liste-posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.liste-posts a {
  display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit;
  background: var(--surface); border-radius: var(--r); box-shadow: var(--ombre); padding: 10px;
}
.liste-posts img { width: 96px; height: 54px; object-fit: cover; border-radius: 4px; flex: none; background: var(--noir); }
.liste-posts strong { display: block; font-size: 17px; line-height: 1.3; }
.liste-posts span { display: block; color: var(--texte-2); font-size: 15px; margin-top: 2px; }
.liste-posts .en-cours { color: var(--rouge); font-weight: 600; }
.vide { color: var(--texte-2); }

/* Encart des notifications (accueil), affiché tant qu'elles ne sont pas actives sur ce téléphone */
.encart-notif { margin: 16px 0 0; padding: 16px; border: 1px solid var(--trait); border-radius: var(--r); background: var(--surface); }
.encart-notif p { margin: 0 0 12px; color: var(--texte-2); }
.encart-notif p strong { color: var(--texte); }
.encart-notif .bouton-trait { width: 100%; }
.encart-notif .encart-message { margin: 12px 0 0; font-weight: 600; color: var(--texte); }
.encart-notif .encart-message.ko { color: var(--erreur); }

/* Écrans de saisie */
.retour { margin: 0 0 8px; }
.retour a { color: var(--texte-2); font-weight: 600; text-decoration: none; display: inline-block; padding: 6px 0; }
.etape { background: var(--surface); border-radius: var(--r); box-shadow: var(--ombre); padding: 20px 16px; margin: 0 0 16px; }
.zone { min-height: 110px; resize: vertical; line-height: 1.4; }
.video-choisie { padding: 0 0 16px; overflow: hidden; }
.video-choisie img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--noir); margin: 0 0 14px; }
.video-choisie .theme, .video-choisie strong { padding: 0 16px; }
.video-choisie strong { display: block; font-size: 20px; line-height: 1.25; }
.theme { margin: 0 0 4px; color: var(--rouge); font: 400 15px/1.2 var(--titre); text-transform: uppercase; letter-spacing: 0.06em; }

/* Attente */
.attente { text-align: center; padding: 40px 0; }
.attente .bouton-rouge { margin-top: 20px; }
.roue {
  width: 56px; height: 56px; margin: 0 auto 24px; border-radius: 50%;
  border: 6px solid var(--surface-2); border-top-color: var(--rouge); animation: tourne 1s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .roue { animation-duration: 3s; } }

/* Relecture : comme sur le site, la miniature en haut */
.titre-legende { display: block; font-size: 18px; font-weight: 600; margin: 4px 0 8px; }
.note-erreur { background: var(--erreur-pale); color: var(--erreur); padding: 12px 14px; border-radius: var(--r); font-weight: 600; }
.bouton-large { width: 100%; margin: 0 0 16px; }
.annuler { text-align: center; margin: 12px 0 0; }
.relecture { background: var(--surface); border-radius: var(--r); box-shadow: var(--ombre); overflow: hidden; margin: 0 0 16px; }
.relecture img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--noir); }
.relecture > h2 { display: block; font: 400 30px/1.1 var(--titre); text-transform: uppercase; margin: 16px 16px 4px; }
.sous-titre { margin: 0 16px 12px; color: var(--rouge); font-weight: 600; }
#article-contenu { padding: 0 16px 4px; overflow-wrap: anywhere; }
#article-contenu p { margin: 0 0 14px; }
#article-contenu p.lead { font-size: 20px; font-weight: 600; }
#article-contenu h2 { display: block; font: 400 22px/1.15 var(--titre); text-transform: uppercase; margin: 20px 0 8px; }
#article-contenu ul { margin: 0 0 14px; padding-left: 22px; }
.ajouts { margin: 0; padding: 12px 16px; background: var(--jaune); font-size: 15px; font-weight: 600; }
#article-pret .note-erreur, #article-modifier .note-erreur { margin: 0 0 16px; }
#article-modifier .zone { margin: 4px 0 16px; }
#article-publie .intro { margin-top: 8px; }
.espace-haut { margin-top: 16px; }
.enregistrer-image { text-align: center; }

/* Barre du bas : le seul bouton important de l'écran */
.barre {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: var(--surface); box-shadow: 0 -8px 24px rgb(0 0 0 / 0.08);
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
}
.barre .bouton-rouge { max-width: 488px; margin: 0 auto; }
.barre-message { max-width: 488px; margin: 0 auto 8px; font-weight: 600; text-align: center; font-size: 16px; }
.barre-message:empty { display: none; }
.barre-message.ok { color: var(--succes); }
.barre-message.ko { color: var(--erreur); }
.rappel { max-width: 488px; margin: 0 auto 8px; color: var(--texte-2); font-size: 15px; text-align: center; line-height: 1.35; }

[hidden] { display: none !important; }
