:root{
  --bg-blur: 3px;
  --brand-1: #7C9E4E; /* vert plus clair et vif */
  --brand-1-border:#7C9E4E;
  --brand-1-hover-text:black; /* texte lisible au survol */
  --brand-2a:#ff8c00; /* orange vif */
  --brand-2b:#ffb84d;
  --ink: #1f2937;
  --ink-soft:#334155;
  --paper:#ffffff;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; height:100%; font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, 'Helvetica Neue', Arial, 'Apple Color Emoji','Segoe UI Emoji', 'Segoe UI Symbol', sans-serif; color:var(--ink); background:#fafafa; }

a { color: var(--brand-1); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  background:#fff; box-shadow: 0 2px 6px rgba(0,0,0,.05);
  position:sticky; top:0; z-index:50;
}
.nav-container{
  display:flex; align-items:center; justify-content:space-between;
  max-width:1100px; margin:0 auto; padding:.75rem 1rem;
  gap:.75rem;
}
.nav-left{
  display:flex; align-items:center; gap:.5rem;
}
.nav-left strong{ font-size:1.05rem; }

/* Desktop nav */
nav.primary{
  display:flex; align-items:center; gap:.5rem;
}
nav.primary a{
  margin:0 .25rem;
  font-weight:500;
  color:var(--ink-soft);
  padding:.4rem .5rem;
  border-radius:10px;
}
nav.primary a:hover{ color:var(--brand-1); }

/* bouton Se connecter vert (uni, plus clair) */
/* bouton Se connecter vert (corrigé et contrasté) */
.cta-login {
  display: inline-block;
  background: var(--brand-1);
  border: 1px solid var(--brand-1-border);
  color: #fff; /* texte bien blanc */
  font-weight: 700;
  border-radius: 14px;
  padding: .8rem 1.2rem;
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
  transition: transform .08s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, text-shadow .2s ease;
  text-decoration: none !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35); /* renforce la lisibilité du blanc */
}

.cta-login:hover {
  transform: translateY(-1px);
  background-color: #5e8038; /* vert plus foncé au survol */
  color: #ffffff; /* blanc franc */
  text-shadow: 0 1px 4px rgba(0,0,0,0.45); /* léger halo sombre pour contraste */
  box-shadow: 0 8px 18px rgba(0,0,0,.15);
  text-decoration: none;
}



/* Mobile menu button */
.menu-btn{
  display:none;
  background:transparent;
  border:none;
  padding:.5rem;
  margin-left:auto;
  border-radius:10px;
  cursor:pointer;
}
.menu-btn:focus-visible{ outline: 3px solid #1d4ed8; outline-offset: 3px; }

.menu-icon{
  width:26px; height:2px; background:#0f172a; position:relative; display:block;
}
.menu-icon::before, .menu-icon::after{
  content:""; position:absolute; left:0; right:0; height:2px; background:#0f172a;
}
.menu-icon::before{ top:-7px; }
.menu-icon::after{ top:7px; }

/* Mobile panel (hidden by default) */
.mobile-panel{
  display:none;
  position: absolute;
  top:100%; left:0; right:0;
  background:#ffffff;
  border-bottom:1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}
.mobile-panel.open{ display:block; }
.mobile-panel-inner{
  max-width:1100px; margin:0 auto; padding:.75rem 1rem 1rem;
  display:grid; gap:.5rem;
}
.mobile-panel a{
  padding:.7rem .5rem;
  border-radius:12px;
  color:#334155;
  font-weight:500;
}
.mobile-panel a:hover{ background:#f1f5f9; color:#0f172a; text-decoration:none; }
.mobile-panel .cta-login{ display:block; text-align:center; }

/* Responsive rules */
@media (max-width: 768px){
  nav.primary{ display:none; }
  .menu-btn{ display:inline-block; }
}

.hero {
  min-height: 78vh;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  position:relative;
  overflow:hidden;
  color:#0b1a26;
}
.hero::before,
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none; /* ne bloque pas les clics */
}
.hero::before {
  background: url('images/fond.jpg') center/cover no-repeat;
  filter: saturate(106%) contrast(1.03) blur(1.5px);
  transform: scale(1.03);
}

.hero::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.65),
    rgba(255, 255, 255, 0.55) 35%,
    rgba(255, 255, 255, 0.75)
  );
}

.hero-inner{
  position:relative;
  z-index:2; /* garantit la cliquabilité */
  padding: clamp(1rem, 2vw, 2rem);
  max-width: 1100px;
  width:100%;
}

.brand-logos{
  display:flex; gap:1rem; align-items:center; justify-content:center;
  flex-wrap:wrap; margin: 0 auto 1.25rem;
}
.brand-logos img{ display:block; height:auto; filter: drop-shadow(0 6px 12px rgba(0,0,0,.08)); }
.brand-logos img.logo-main { width: clamp(140px, 22vw, 240px); }
.brand-logos img.logo-small { width: 120px; opacity:.95 }
.brand-logos img.logo-mid   { width: 120px; opacity:.95 }

h1{
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  margin:.25rem 0 .5rem; letter-spacing:.2px;
  text-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.tagline{
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  color:var(--ink-soft); margin:0 auto 1.25rem; max-width: 60ch;
  text-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* bouton Voir vos résultats orange */
.cta{
  display:inline-block;
  background: linear-gradient(135deg, var(--brand-2a), var(--brand-2b));
  color:#1b130a; font-weight:800; border-radius:14px;
  padding:1rem 1.35rem; box-shadow: 0 10px 24px rgba(0,0,0,.14);
  transition: transform .08s ease, box-shadow .2s ease, filter .2s ease;
  font-size: 1.05rem;
  line-height: 1;
  text-decoration:none !important;
  cursor:pointer;
}
.cta:hover{
  transform: translateY(-1px);
  filter: saturate(112%);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
  text-decoration:none;
}

.container{ max-width:1100px; padding: 2rem clamp(1rem, 3vw, 2rem); margin:0 auto; }

.features{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap:1rem;
}
.card{
  background: var(--paper);
  padding: 1.25rem;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.card h3{ margin:.2rem 0 .35rem; font-size:1.05rem; }
.card p{ margin:0; color:var(--ink-soft); font-size:.975rem; line-height:1.5; }

footer{
  margin-top: 2rem;
  padding: 1rem; text-align:center; color:#475569;
}
footer small a{ color: inherit; text-decoration: underline; }
footer small a:hover{ text-decoration: none; }
footer p{ margin:.35rem 0 0; color:#64748b; font-size:.95rem; }

/* Tablettes: conserver les 3 logos sur une ligne, tailles réduites */
@media (max-width: 768px){
  .brand-logos{ flex-wrap: nowrap; gap:.75rem; }
  .brand-logos img.logo-small { width: 48px; }
  .brand-logos img.logo-main  { width: clamp(120px, 34vw, 180px); }
  .brand-logos img.logo-mid   { width: 90px; }
}

/* Petits mobiles: ne garder que le logo principal, bien centré */
@media (max-width: 480px){
  .brand-logos{ flex-wrap: nowrap; gap:.5rem; }
  .brand-logos img.logo-small,
  .brand-logos img.logo-mid { display:none; }
  .brand-logos img.logo-main { width: clamp(150px, 58vw, 220px); }
  .hero{ min-height: 88vh; }
  .hero-inner{ padding-top: 10vh; padding-bottom: 12vh; }
}
.card {
  position: relative;
  padding: 1.75rem 1.25rem 1.25rem 1.25rem;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  background: var(--paper);
  overflow: visible; /* permet au logo de dépasser le bord */
}

.animal-logo {
  position: absolute;
  top: -22px;   /* sort davantage du cadre */
  left: -22px;  /* déborde du coin gauche */
  width: 70px;  /* taille confortable */
  height: auto;
  opacity: 0.95;
  z-index: 3;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.12));
}

.card h3 {
  position: relative;
  z-index: 2;
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.card p {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--ink-soft);
  font-size: .975rem;
  line-height: 1.5;
}
/* --- Correctifs prioritaires (logos à cheval + texte vertical) --- */
.features .card{
  display: block !important;     /* annule tout flex résiduel */
  position: relative !important;
  padding: 1.75rem 1.25rem 1.25rem 1.25rem !important;
  overflow: visible !important;  /* autorise le débordement du logo */
}

.features .card .animal-logo{
  position: absolute !important;
  top: -25px !important;
  left: -25px !important;
  width: 70px !important;
  height: auto !important;
  z-index: 3 !important;
  pointer-events: none;          /* évite de gêner les clics */
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.12));
}

.features .card h3,
.features .card p{
  position: relative !important;
  z-index: 2 !important;
  margin-top: 0;
}
.features .card h3{ margin-bottom: .4rem; }
/* --------------------------------------------------------------- */
/* --------- Login (auth) additions --------- */
.auth-wrap{ min-height:70vh; display:flex; align-items:center; justify-content:center; }
.auth-card{
  position:relative;
  width:100%; max-width:460px;
  background:var(--paper); border-radius:16px;
  padding:2rem 1.5rem 1.5rem 1.5rem;
  box-shadow:0 8px 22px rgba(0,0,0,.08);
  overflow:visible;
}
.auth-logo{
  position:absolute; top:-26px; left:-26px;
  width:70px; height:auto; opacity:.95; z-index:3; pointer-events:none;
  filter:drop-shadow(0 3px 6px rgba(0,0,0,.12));
}
/* ----------------------------------------- */

/* ---- Amélioration du formulaire de connexion ---- */
.auth-card h2 {
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.auth-field label {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

/* Uniformisation des champs de saisie (login + contest_vote) */
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #d6d9df;
  border-radius: 12px;            /* coins arrondis comme sur le login */
  background: #f9fafb;            /* fond doux identique au login */
  outline: none;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-field input:focus {
  border-color: var(--brand-1);
  box-shadow: 0 0 0 4px rgba(124, 158, 78, 0.18);
  background: #fff;               /* éclaircir au focus, comme sur le login */
}


.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  gap: 0.75rem;
}

.cta-login {
  border-radius: 12px;
  font-size: 1rem;
  padding: 0.9rem 1.2rem;
}

.auth-card p.muted {
  margin-top: 1.2rem;
  line-height: 1.4;
  font-size: 0.9rem;
  color: #6b7280;
}
/* ----------------------------------------------- */
/* ---- Forcer le look "login" pour le champ Code d'accès ---- */
.auth-card .auth-field input[type="text"]{
  width: 100%;
  padding: 0.8rem 1rem !important;
  border: 1px solid #d6d9df !important;
  border-radius: 12px !important;        /* coins arrondis */
  background: #f9fafb !important;        /* fond gris doux */
  outline: none;
  font-size: 1rem;
  appearance: none;                       /* cross-browser */
  -webkit-appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.auth-card .auth-field input[type="text"]:focus{
  border-color: var(--brand-1) !important;
  box-shadow: 0 0 0 4px rgba(124,158,78,.18) !important;
  background: #fff !important;
}
.auth-card .auth-field input::placeholder{
  color:#94a3b8;                          /* ton/placeholder comme login */
}
/* ---- Titre avec logo dans auth-card ---- */
.auth-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
  flex-wrap: nowrap;               /* empêche le retour à la ligne */
}

.auth-title h2 {
  font-size: 1.4rem;
  margin: 0;
  flex: 1;                         /* permet au titre de prendre l’espace restant */
}

.auth-title-logo {
  max-width: 48px;                 /* taille plus petite du logo */
  height: auto;
  display: block;
  border-radius: 8px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.08));
  opacity: .95;
  flex-shrink: 0;                  /* évite que le logo soit écrasé */
}
/* Centrer la carte sans toucher au PHP ni aux balises existantes */
.auth-wrap{
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card.no-logo{ 
  margin: 0 auto; 
  max-width: 520px;
}

/* Titre + logo à droite, sans retour à la ligne */
.auth-title{
  display:flex; align-items:center; justify-content:space-between;
  gap:.75rem; margin-bottom:1rem; flex-wrap:nowrap;
}
.auth-title h2{ margin:0; font-size:1.35rem; flex:1; }
.auth-title-logo{ max-width:48px; height:auto; flex-shrink:0; border-radius:8px; }

/* Champ "Code d'accès" même look que login */
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"]{
  width:100%;
  padding:.8rem 1rem;
  border:1px solid #d6d9df;
  border-radius:12px;
  background:#f9fafb;
  font-size:1rem;
  transition:border-color .2s, box-shadow .2s, background-color .2s;
}
.auth-field input:focus{
  border-color: var(--brand-1);
  box-shadow: 0 0 0 4px rgba(124,158,78,.18);
  background:#fff;
}

/* Message d'erreur "doux" optionnel — sinon garde .error */
.alert.error{
  background:#fef2f2; color:#991b1b; border:1px solid #fecaca;
  padding:.6rem .75rem; border-radius:10px; margin:.5rem 0 1rem;
}
/* ---- Alertes d'accès au concours ---- */
.alert {
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  border-left: 5px solid transparent;
}

.alert-info {
  background: #f1f8ec;
  color: #3a4d27;
  border-left-color: var(--brand-1);
}

.alert-warning {
  background: #fff8e5;
  color: #7a4b00;
  border-left-color: var(--brand-2a);
}

.alert-danger {
  background: #fef2f2;
  color: #8a1c1c;
  border-left-color: #dc2626;
}

.alert-secondary {
  background: #f4f4f5;
  color: #3f3f46;
  border-left-color: #9ca3af;
}

.alert {
  animation: fadeInUp 0.35s ease-out both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Bouton Exporter en PDF (style cohérent avec .cta-login) */
.cta-pdf{
  display:inline-flex; align-items:center; gap:.5rem;
  background:#fff; color:#111827; text-decoration:none; font-weight:600;
  border:1px solid var(--brand-1-border, #d1d5db);
  padding:.55rem .9rem; border-radius:12px;
  box-shadow:0 4px 10px rgba(0,0,0,.08);
  transition:transform .06s ease, box-shadow .2s ease, filter .2s ease;
}
.cta-pdf:hover{
  box-shadow:0 8px 18px rgba(0,0,0,.12);
  transform:translateY(-1px);
}
.auth-actions .btn-back{ margin-top:0; }
.btn-back, .cta-pdf{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  line-height:1;
  padding:.55rem .9rem;
  border-radius:12px;
}
.cta-pdf img{ height:18px; display:block; }
.cta-pdf.disabled{
  opacity:.55;
  pointer-events:none;
}
.title{ font-size:1.25rem; font-weight:800; }
.subtitle{ color:#6b7280; margin-top:.25rem; }

/* ==== Contact form (look carte comme le login) ==== */
.contact-card{
  position:relative;
  width:100%;
  max-width:820px;
  margin: 0 auto 1.5rem;
  background: var(--paper);
  border-radius: 16px;
  padding: 1.5rem 1.25rem 1.25rem;
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
}

.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-top: .5rem;
}

.contact-field{
  display:flex;
  flex-direction:column;
}
.contact-field label{
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .35rem;
}
.contact-field input[type="text"],
.contact-field input[type="email"],
.contact-field input[type="number"],
.contact-field textarea{
  width:100%;
  padding:.8rem 1rem;
  border:1px solid #d6d9df;
  border-radius:12px;
  background:#f9fafb;
  font-size:1rem;
  transition:border-color .2s, box-shadow .2s, background-color .2s;
}
.contact-field input:focus,
.contact-field textarea:focus{
  border-color: var(--brand-1);
  box-shadow: 0 0 0 4px rgba(124,158,78,.18);
  background:#fff;
}

.contact-span-2{ grid-column: 1 / -1; }

.contact-help{ color:#6b7280; font-size:.9rem; }

.contact-actions{
  display:flex;
  gap: .75rem;
  justify-content: flex-end;
  align-items:center;
  margin-top: .25rem;
}

/* bouton Annuler en style "outline orange" */
.btn-cancel{
  display:inline-flex; align-items:center; gap:.5rem;
  background:#fff; color:#7a4b00; font-weight:700;
  border:1px solid var(--brand-2a);
  border-radius:12px; padding:.8rem 1.2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
  text-decoration:none !important;
}
.btn-cancel:hover{
  text-decoration:none;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
  transform: translateY(-1px);
}

/* petit bloc captcha aligné sur une seule colonne */
.captcha-row{
  display:flex; align-items:center; gap:.5rem;
  font-weight:600;
}

@media (max-width: 720px){
  .contact-grid{ grid-template-columns: 1fr; }
  .contact-actions{ justify-content: stretch; }
  .contact-actions .cta, .contact-actions .btn-cancel{ width:100%; text-align:center; }
}


