:root {
  /* --- PANNEAU DE CONTRÔLE DES COULEURS --- */
  --color-primary: #6366f1;
  --color-primary-light: #e0e7ff;
  --color-primary-dark: #4f46e5;

  --color-secondary: #333;
  --color-secondary-light: #f4f4f4;

  --color-danger: #d93344;
  --color-danger-light: #cb2b2b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, sans-serif;
  background-color: #f0f2f5;
  color: #1c1c1c;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ================================================= */
/* HEADER (AMÉLIORÉ)
/* ================================================= */

header {
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  padding: 0 24px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 299; /* Au-dessus de l'overlay, en dessous du menu */
}

.header-content {
  display: flex;
  align-items: center;
  height: 52px;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-weight: 800;
  color: var(--color-primary);
  font-size: 24px;
  text-decoration: none;
  margin-right: 16px;
}

.partner-logo {
  margin-left: 16px;
  height: 32px;
  border-left: 1px solid #eee;
  padding-left: 16px;
}

.partner-logo img {
  height: 100%;
  width: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

#mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  margin-right: 10px;
  /* On supprime 'line-height: 1;' */
}

#user-email-display {
  color: #555;
  font-size: 14px;
  font-weight: 600;
  margin-right: 10px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

.btn a {
  color: inherit;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  border: 1px solid var(--color-primary);
  transition: background-color 0.2s, color 0.2s;
}
.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-banger {
  background-color: var(--color-danger);
  color: white;
  border: 1px solid var(--color-danger);
  transition: background-color 0.2s, color 0.2s;
}
.btn-banger:hover {
  background-color: var(--color-danger-light);
  border-color: var(--color-danger-light);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  transition: background-color 0.2s, color 0.2s;
}
.btn-secondary:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.center-content {
  grid-column: 2; /* Centre fixe */
  display: block; /* Stack vertical */
}

.logged-in {
  display: none;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 72px auto 20px auto;
  display: grid;
  grid-template-columns: 200px 1fr 312px;
  gap: 24px;
  padding: 0 20px;
  flex-grow: 1;
  width: 100%;
}

/* ================================================= */
/* SIDEBAR GAUCHE (NAV) (AMÉLIORÉE)
/* ================================================= */
.sidebar-left {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 12px;
  position: sticky;
  top: 72px; /* Header (52px) + Marge (20px) */
  align-self: start;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
}

.main-nav ul {
  list-style: none;
}

.main-nav li {
  margin-bottom: 4px;
}

.main-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: #444;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
  font-weight: 600;
  font-size: 15px;
}

.main-nav a:hover {
  background-color: #f4f4f4;
  color: #1c1c1c;
}

.main-nav a.active {
  background-color: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

/* Cache le placeholder mobile par défaut (sur PC) */
.mobile-only-sidebar {
  display: none;
}


.main-nav a i {
    /* 1. On force une largeur fixe pour que le texte commence toujours au même endroit */
    width: 26px; 
    
    /* 2. On utilise Flexbox SUR l'icône elle-même pour centrer le dessin */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* 3. On réinitialise la hauteur de ligne qui crée souvent le décalage */
    line-height: 1;
    font-size: 1.1rem; /* Ajuste la taille si besoin */
    
    /* 4. (Optionnel) Si l'icône semble trop haute, on peut la descendre d'1 pixel */
    /* transform: translateY(1px); */
}

/* ================================================= */
/* SÉLECTEUR DE LANGUE (MINIMALISTE)
/* ================================================= */

.language-selector-wrapper {
    padding: 0 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start; /* Aligné à gauche comme les liens du menu */
}

.language-selector {
    display: flex;
    background-color: #f0f2f5; /* Fond gris très doux */
    padding: 4px;
    border-radius: 50px; /* Forme de pilule parfaite */
    border: 1px solid #e4e6eb;
    margin: 0 auto;
}

.lang-option {
    padding: 6px 20px; /* Espace autour du texte */
    font-size: 14px;
    font-weight: 600;
    color: #777; /* Gris moyen pour l'inactif */
    cursor: pointer;
    border-radius: 50px; /* Arrondi interne */
    transition: all 0.2s ease-in-out;
    user-select: none;
    text-align: center;
    min-width: 50px; /* Largeur minimale pour l'équilibre */
}

.lang-option:hover {
    color: #333;
}

/* L'état ACTIF (Langue sélectionnée) */
.lang-option.active {
    background-color: #ffffff; /* Fond blanc qui "pop" */
    color: var(--color-primary); /* Texte couleur Indigo */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* Ombre portée subtile */
    font-weight: 700;
    cursor: default;
}

/* Ajustement Mobile */
@media (max-width: 960px) {
    .language-selector-wrapper {
        margin-top: 15px;
        padding-left: 0;
    }
    
    /* Sur mobile, on peut vouloir le centrer ou l'agrandir un peu */
    .lang-option {
        padding: 10px 25px;
        font-size: 1rem;
    }
}

/* ================================================= */
/* PAGE D'ACCUEIL (FEATURED)
/* ================================================= */

.featured-title {
  text-align: center;
  margin-bottom: 16px;
  color: var(--color-secondary);
  font-size: 24px;
}

.featured-content {
  display: flex;
  gap: 20px;
  align-items: center;
}

.featured-image {
  width: 300px;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

.featured-text h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.featured-text p {
  margin-bottom: 16px;
  line-height: 1.5;
}

.featured-actions {
  display: flex;
  gap: 12px;
}

/* ================================================= */
/* BLOC LAURÉAT (ACCUEIL)
/* ================================================= */

.winner-block {
  /* Fond subtil qui va du blanc au bleu très clair */
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 1) 0%,
    rgba(224, 231, 255, 0.5) 100%
  );

  /* Bordure et ombre colorées */
  border: 2px solid var(--color-primary);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2); /* Ombre indigo */

  padding: 30px 40px;
  margin-bottom: 24px;
  overflow: hidden; /* Pour les coins arrondis */
}

.winner-block-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  text-align: center;
  margin-bottom: 30px;
}

.winner-block-content {
  display: flex;
  gap: 30px; /* Plus d'espace */
  align-items: center;
}

.winner-block-image {
  width: 400px; /* Image plus grande (avant 300px) */
  height: 280px; /* Image plus haute (avant 200px) */
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.winner-block-text {
  flex: 1;
}

.winner-block-text h3 {
  font-size: 1.8rem; /* Titre de l'article plus grand */
  font-weight: 700;
  margin-bottom: 15px;
  color: #222;
}

.winner-block-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 10px;
}

/* La ligne qui annonce le prix */
.winner-prize {
  margin-top: 20px;
  border-top: 1px solid var(--color-primary-light);
  padding-top: 20px;
  font-weight: 600;
  color: var(--color-primary-dark);
}



/* ================================================= */
/* PAGE INFORMATIONS (STYLES AMÉLIORÉS)
/* ================================================= */

.info-section h3 i {
    margin-right: 10px;
    color: var(--color-primary);
    width: 30px; /* Pour aligner les textes même si les icônes ont des largeurs différentes */
    text-align: center;
}

/* --- LA TIMELINE DU CYCLE --- */
.cycle-steps {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.cycle-step {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    transition: transform 0.2s;
}

.cycle-step:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary-light);
}

.step-icon {
    background: var(--color-primary-light);
    color: var(--color-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto 15px auto;
    font-size: 1.2rem;
    
    /* --- CORRECTION DU CENTRAGE (FLEXBOX) --- */
    display: flex;              /* On active Flexbox */
    justify-content: center;    /* Centre horizontalement */
    align-items: center;        /* Centre verticalement */
    line-height: normal;        /* On annule l'ancien line-height */
}

.cycle-step h4 {
    color: var(--color-primary-dark);
    margin-bottom: 5px;
    font-weight: 800;
}

.step-time {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #777;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    display: inline-block;
}

/* --- LA BOÎTE DE RÉCOMPENSE --- */
.reward-highlight {
    text-align: center;
}

.reward-box {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.big-percent {
    font-size: 4rem;
    font-weight: 900;
    display: block;
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.reward-box p {
    font-size: 1.1rem;
}

.reward-box strong {
    color: #fff;
}

/* --- LISTE DES RÈGLES --- */
.rules-list {
    list-style: none;
    padding: 0;
}

.rules-list li {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 10px;
    font-size: 1rem;
}

.rules-list li i {
    color: #28a745; /* Vert pour les coches */
    margin-right: 10px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .cycle-steps {
        flex-direction: column;
        gap: 15px;
    }
    
    .cycle-step {
        display: flex; 
        align-items: flex-start; /* Aligne en haut */
        text-align: left;
        padding: 15px;
        gap: 15px;
        background: #fff; /* Fond blanc propre */
        border: 1px solid #eee;
    }
    
    .step-icon {
        margin: 0; /* Plus de marge auto */
        flex-shrink: 0; /* Empêche l'icône de s'écraser */
        /* Le centrage flexbox que nous avons ajouté avant reste ici */
    }

    /* NOUVEAU : Gère le bloc de texte à droite */
    .step-content {
        display: flex;
        flex-direction: column; /* Empile Titre, Date, Texte verticalement */
        gap: 5px;
        width: 100%;
    }

    /* Ajustements pour que ce soit joli */
    .cycle-step h4 {
        margin: 0;
        font-size: 1.1rem;
    }

    .step-time {
        display: inline-block;
        background: #f0f2f5;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.8rem;
        align-self: flex-start; /* Colle le badge à gauche */
        margin-bottom: 5px;
    }

    .cycle-step p {
        color: #666; /* Force la couleur grise lisible */
        margin: 0;
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .big-percent {
        font-size: 3rem;
    }
}

/* Responsive pour mobile */
@media (max-width: 960px) {
  .winner-block-content {
    flex-direction: column;
  }
  .winner-block-image {
    width: 100%; /* Pleine largeur sur mobile */
    height: auto;
    max-height: 300px;
  }
  .winner-block-title {
    font-size: 1.8rem;
  }
  .winner-block {
    padding: 25px 20px;
  }
}

/* ================================================= */
/* BLOC "PAS DE LAURÉAT" (ACCUEIL)
/* ================================================= */

.no-winner-block {
  /* Un style "placeholder" avec une bordure en pointillés */
  border: 3px dashed var(--color-primary-light);
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  margin-bottom: 24px;
}

.no-winner-icon {
  font-size: 3.5rem;
  color: var(--color-primary);
  margin-bottom: 20px;
  /* Petite animation */
  animation: bounce 2s infinite;
}

.no-winner-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  margin-bottom: 15px;
}

.no-winner-text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #444;
  max-width: 500px; /* Pour que le texte ne soit pas trop large */
  margin: 0 auto 30px auto;
}

.no-winner-cta .btn-primary {
  padding: 12px 28px; /* Un bouton plus gros */
  font-size: 1.1rem;
  border-radius: 30px;
  /* Animation pour attirer le clic */
  animation: pulse 1.5s infinite;
}

/* Animations */
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-15px);
  }
  60% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(99, 102, 241, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

/* ================================================= */
/* SECTION HÉRO (ACCUEIL)
/* ================================================= */

.hero-section {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 30px 40px;
  text-align: center;
  margin-bottom: 24px; /* Espace avant le lauréat */
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 30px;
}

.hero-steps {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  border-top: 1px solid #f0f0f0;
  padding-top: 30px;
}

.hero-step {
  flex: 1; /* Chaque étape prend 1/3 de la place */
  max-width: 250px;
}

.hero-step i {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 15px;
}

.hero-step h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #333;
}

.hero-step p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #666;
}

/* Responsive pour le Héro */
@media (max-width: 960px) {
  .hero-steps {
    flex-direction: column; /* Passe en vertical sur mobile */
    gap: 30px;
    align-items: center;
  }

  .hero-section {
    padding: 25px 20px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }
}

/* ================================================= */
/* SIDEBAR DROITE (AMÉLIORÉE)
/* ================================================= */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;

  /* Positionnement sticky (identique à gauche) */
  position: sticky;
  top: 72px;
  align-self: start;
}

.sidebar-card {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 16px;
  overflow: hidden;
}

.sidebar-title {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 15px;
  color: #333;
  text-align: center;
}

.sidebar-item {
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}
.sidebar-item span:last-child {
  font-weight: 600;
  color: #1c1c1c;
}

.sidebar-item:last-child {
  border-bottom: none;
}

/* Le bouton Publier */
.create-post {
  background-color: var(--color-primary);
  text-align: center;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s;

  display: flex;
  justify-content: center;
  align-items: center;
}
.create-post:hover {
  background-color: var(--color-primary-dark);
}

.create-post a {
  color: white;
  text-decoration: none;
}

.sidebar-login-link {
  text-decoration: underline;
  color: var(--color-primary);
  font-weight: bold;
  transition: color 0.2s;
}
.sidebar-login-link:hover {
  color: var(--color-primary-dark);
}

.sidebar-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

/* ================================================= */
/* TOGGLE SWITCH (POUR PREVIEW)
/* ================================================= */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  vertical-align: middle;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
}
input:checked + .slider {
  background-color: var(--color-primary);
}
input:checked + .slider:before {
  transform: translateX(26px);
}
.slider.round {
  border-radius: 34px;
}
.slider.round:before {
  border-radius: 50%;
}

/* Carte Cagnotte */
#prize-pool-card {
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary);
  text-align: center;
}

.prize-pool-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  margin: 10px 0;
}

.prize-pool-note {
  font-size: 12px;
  color: var(--color-primary-dark);
  opacity: 0.8;
}

#current-phase-card {
  background: var(--color-primary-light); /* Fond Indigo très clair */
  border-color: var(--color-primary); /* Bordure Indigo */
}

.phase-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary-dark); /* Indigo foncé */
  text-align: center;
  margin-bottom: 5px;
  text-transform: uppercase; /* En majuscules */
}

.phase-timer {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-secondary); /* Gris foncé */
  text-align: center;
}

/* ================================================= */
/* FORMULAIRES (PUBLISH, LOGIN, REGISTER)
/* ================================================= */
.submission-form {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 30px 40px;
  max-width: 700px;
  margin: 0 auto;
}

.form-title {
  text-align: center;
  margin-bottom: 30px;
  color: var(--color-primary-dark);
  font-size: 1.8rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #f9f9f9;
  font-size: 1rem;
  color: #222;
  transition: all 0.2s ease-in-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: #fff;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
  border-top: 1px solid #f0f0f0;
  padding-top: 30px;
  align-items: center;
}

.form-actions button[type="submit"] {
  padding: 12px 28px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  transition: background-color 0.2s;
}
.form-actions button[type="submit"]:hover {
  background: var(--color-primary-dark);
}

.form-group * {
  margin: 5px 0;
}

/* Conteneur pour le switch de preview */
.preview-toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
}

#previewBtn {
  padding: 12px 28px;
  background: var(--color-secondary-light);
  color: var(--color-secondary);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  transition: background-color 0.2s;
}
#previewBtn:hover {
  background: var(--color-primary-light);
}

#addSection {
  background: var(--color-primary);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 20px;
  font-weight: 600;
  transition: background-color 0.2s;
}
#addSection:hover {
  background: var(--color-primary-dark);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 400; /* Au-dessus de tout */
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
}

.section-group {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  margin: 15px 0;
}

.remove-img {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-danger);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 12px;
  z-index: 1;
}

input[type="file"] {
  color: transparent;
}

.img-wrapper {
  position: relative;
  display: inline-block;
  margin: 5px;
}

.section-group h4 {
  margin-bottom: 10px;
  color: var(--color-secondary);
}

/* ================================================= */
/* STYLE POUR LA LISTE DES VOTES (VOTES.HTML) - Style "Feed"
/* ================================================= */

.votes-title {
  text-align: center;
  margin-bottom: 20px;
  color: var(--color-secondary);
  font-size: 24px;
}

.votes-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
}

.vote-article {
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
  transition: all 0.2s ease-in-out;
}

.vote-article:hover {
  border-color: var(--color-primary); /* Bordure plus visible */
  transform: translateY(-4px); /* Léger soulèvement */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Ombre douce */
}

.article-carousel {
  position: relative;
  width: 100%;
  max-height: 350px;
  background: #f0f0f0;
  overflow: hidden;
  margin: 0;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
}

.carousel-img {
  width: 100%;
  height: 100%;
  max-height: 350px;
  object-fit: contain;
  min-width: 100%;
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 18px;
  z-index: 10;
}
.carousel-prev {
  left: 0;
}
.carousel-next {
  right: 0;
}

.article-content {
  padding: 20px;
}

.article-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  margin: 0 0 8px 0;
}

.article-meta {
  font-size: 0.9rem;
  color: #7c7c7c;
  margin-bottom: 16px;
}
.article-meta span {
  color: var(--color-primary);
  margin: 0 5px;
}

.article-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 20px;
}

.btn-see-more {
  display: inline-block;
  background: #f0f0f0;
  color: #333;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-see-more:hover {
  background: var(--color-primary);
  color: white;
}

.vote-buttons {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
  background: #fdfdfd;
  gap: 15px;
}

.vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #878a8c;
  font-size: 24px;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s, transform 0.1s ease-in-out;
}

.vote-btn:hover {
  background-color: #e1e3e5;
}

.vote-btn.up:hover {
  color: var(--color-primary);
  background-color: var(--color-primary-light);
}
.vote-btn.down:hover {
  color: var(--color-secondary);
  background-color: var(--color-secondary-light);
}

.vote-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  min-width: 40px;
  text-align: center;
}

.vote-btn.voted-up {
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  transform: scale(1.1);
}

.vote-btn.voted-down {
  color: var(--color-secondary);
  background-color: var(--color-secondary-light);
  transform: scale(1.1);
}


/* ================================================= */
/* NOUVEAU BOUTON DE SOUTIEN
/* ================================================= */

.btn-soutien {
    background: var(--color-secondary-light);
    color: var(--color-secondary);
    border: 1px solid #ccc;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-soutien i {
    margin-right: 8px;
}

.btn-soutien:hover {
    background: #e0e0e0;
    border-color: #bbb;
}

/* L'état "cliqué" */
.btn-soutien.voted-active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-soutien.voted-active i {
    /* (Optionnel) Icône "coeur plein" quand on a voté */
    font-weight: 900; 
}


/* ================================================= */
/* PAGE VOTES / POSTS (DESIGN PREMIUM)
/* ================================================= */

/* 1. LE BANDEAU DU HAUT (Status Header) */
.status-header {
    background: #fff;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    
    /* CORRECTION LARGEUR : On aligne avec la liste en dessous */
    max-width: 700px; 
    margin: 0 auto 30px auto; /* Centré horizontalement */
    
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1); 
    position: relative;
    overflow: hidden;
}

/* Petite barre décorative en haut */
.status-header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
}

.status-header i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    
    /* Monochrome couleur site (Indigo) */
    color: var(--color-primary);
    
    /* Ou Option Dégradé (comme la fusée) - Décommente si tu préfères : */
    /* background: -webkit-linear-gradient(45deg, var(--color-primary), #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    */
}

.status-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    /* Petit fond rond derrière l'icône */
    background: var(--color-primary-light);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
}

.status-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1c1c1c;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.status-desc {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Le Timer Design */
.big-timer {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    background: #f0f2ff;
    padding: 12px 25px;
    border-radius: 50px;
    display: inline-block;
    font-feature-settings: "tnum"; /* Chiffres tabulaires (ne bougent pas) */
    border: 1px solid var(--color-primary-light);
}

/* 2. L'ÉTAT VIDE (Empty State) */
.empty-state-card {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    /* Mêmes ombres que les articles pour la cohérence */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state-icon {
    font-size: 4rem;
    /* Dégradé de couleur sur l'icône (Webkit pour Chrome/Safari) */
    background: -webkit-linear-gradient(45deg, var(--color-primary), #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.empty-state-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.empty-state-card p {
    color: #777;
    font-size: 1.1rem;
    margin-bottom: 25px;
}


/* ================================================= */
/* PAGE PARTENAIRE (AMÉLIORÉE)
/* ================================================= */
.partner-page {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
}

.partner-banner {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  margin: 0;
  border-bottom: 1px solid #eee;
}

.partner-content-wrapper {
  padding: 40px;
}

.partner-content-wrapper h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: #222;
}

.partner-content-wrapper p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
  max-width: 800px;
  margin-bottom: 30px;
}

.partner-cta {
  display: flex;
  gap: 20px;
  justify-content: flex-start;
  margin-top: 20px;
}

.partner-cta .btn-primary,
.partner-cta .btn-secondary {
  padding: 12px 28px;
  font-size: 1rem;
  border-radius: 30px;
  text-decoration: none;
}

/* ================================================= */
/* MISE EN PAGE SPÉCIFIQUE (PAGE PARTENAIRE)
/* ================================================= */

.container-partner-page {
  grid-template-columns: 200px 1fr;
}

.container-partner-page .sidebar {
  display: none;
}

.container-partner-page .center-content {
  max-width: none;
}

/* Hall of fame */
.winners-title {
  text-align: center;
  margin-bottom: 30px;
  color: var(--color-secondary);
  font-size: 28px;
}

.winners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.winner-card {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.winner-thumb {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 10px;
}

/* ================================================= */
/* PAGE PALMARÈS (MISE À JOUR)
/* ================================================= */

/* Section "Spotlight" du dernier lauréat */
#latest-winner-spotlight {
    margin-bottom: 40px;
}

.spotlight-card {
    display: flex;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    overflow: hidden;
}

.spotlight-image {
    width: 45%;
    min-width: 45%;
    object-fit: cover;
}

.spotlight-content {
    padding: 30px 40px;
}

.spotlight-week-id {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.spotlight-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #222;
    margin-bottom: 15px;
}

.spotlight-meta {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Le sous-titre pour la grille */
.past-winners-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

/* Amélioration des petites cartes de la grille */
.winner-card {
    text-align: left; /* On passe en aligné à gauche */
    display: flex;
    flex-direction: column;
}

.winner-thumb {
    height: 180px; /* Image plus haute */
    margin-bottom: 15px; /* Plus d'espace */
}

.winner-card h3 {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--color-primary);
    font-weight: 700;
}

.winner-card p {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin: 5px 0 15px 0;
    flex-grow: 1; /* Pousse le bouton en bas */
}

/* Meta-info (Auteur, Votes) pour les petites cartes */
.winner-card-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 10px;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

/* Responsive pour le Spotlight */
@media (max-width: 960px) {
    .spotlight-card {
        flex-direction: column;
    }
    .spotlight-image {
        width: 100%;
        max-height: 300px;
    }
    .spotlight-content {
        padding: 25px 20px;
    }
    .spotlight-title {
        font-size: 1.8rem;
    }
}

/* ================================================= */
/* STYLE POUR LA PAGE ARTICLE DÉTAILLÉ
/* ================================================= */

.article-detail {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.article-detail-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #222;
  margin-bottom: 10px;
  line-height: 1.2;
}

.article-detail-meta {
  font-size: 1rem;
  color: #7c7c7c;
  margin-bottom: 30px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 20px;
}
.article-detail-meta span {
  color: var(--color-primary);
  margin: 0 5px;
}

.article-section {
  margin-bottom: 30px;
}

.article-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 15px;
}

.article-section-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 20px;
}

.article-section-images {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.article-section-images img {
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.btn-back-link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  margin-bottom: 20px;
  transition: transform 0.2s;
}

.btn-back-link:hover {
  text-decoration: underline;
  transform: translateX(-3px);
}

.article-detail .vote-buttons {
  padding: 20px 0;
  justify-content: center;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 30px;
}

/* ================================================= */
/* PAGE INFORMATIONS (RULES.HTML)
/* ================================================= */

.info-page {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 30px 40px;
  max-width: 800px;
  margin: 0 auto;
}

.info-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #222;
  margin-bottom: 30px;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}

.info-section {
  margin-bottom: 30px;
}

.info-section h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 15px;
}

.info-section p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 10px;
}

.info-section ul,
.info-section ol {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
  padding-left: 25px;
  margin-left: 10px;
}

.info-section li {
  margin-bottom: 8px;
}

/* ================================================= */
/* PAGE PROFIL ET BADGES
/* ================================================= */

.profile-header {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px 30px;
  margin-bottom: 24px;
}

/* On s'assure que le titre du profil est bien aligné */
.profile-title {
  text-align: left;
  margin-bottom: 20px;
}

.badges-container {
  display: grid;
  /* Crée une grille responsive qui s'adapte */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  border-top: 1px solid #f0f0f0;
  padding-top: 20px;
}

.badge {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: all 0.2s;
}

.badge i {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--color-primary); /* Couleur du badge débloqué */
}

.badge h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
}

.badge p {
  font-size: 0.85rem;
  color: #777;
  line-height: 1.3;
}

/* Style TRES important pour les badges non obtenus */
.badge.locked {
  background: #fdfdfd;
  border-color: #eee;
  filter: grayscale(80%);
  opacity: 0.7;
}

.badge.locked i {
  color: #bbb; /* Couleur du badge bloqué */
}

/* Le nouveau sous-titre "Mes Créations" */
.profile-subtitle {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 20px;
  text-align: center;
}

/* ================================================= */
/* STYLE DU COMPTE À REBOURS
/* ================================================= */
#countdown {
  font-weight: bold;
  color: var(--color-primary);
  text-align: center;
  margin: 10px 0 20px 0;
  font-size: 1.1rem;
}

/* ================================================= */
/* LOGIQUE D'AFFICHAGE DU LIVE PREVIEW (Corrigé)
/* ================================================= */

/* On crée les éléments de preview (cachés par défaut) */
.preview-title,
.preview-category,
.preview-subtitle,
.preview-text {
  display: none;
}

/* Quand on active le mode "Preview"... 
*/

/* 1. On CACHE les champs du formulaire (SAUF LE SWITCH) */
.submission-form.preview-mode-on .form-group label:not(.switch),
.submission-form.preview-mode-on .form-group input:not(#previewToggle),
.submission-form.preview-mode-on .form-group textarea,
.submission-form.preview-mode-on .form-group select {
  display: none;
}

/* 2. On AFFICHE les éléments de preview */
.submission-form.preview-mode-on .preview-title,
.submission-form.preview-mode-on .preview-category,
.submission-form.preview-mode-on .preview-subtitle,
.submission-form.preview-mode-on .preview-text {
  display: block;
}

/* 3. On CACHE les boutons inutiles */
.submission-form.preview-mode-on #addSection {
  display: none;
}

/* Style des éléments de preview (pour ressembler à un article) 
*/
.preview-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #222;
  margin-bottom: 10px;
}
.preview-category {
  font-style: italic;
  color: #777;
  margin-bottom: 30px;
}
.preview-subtitle {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin-top: 20px;
}
.preview-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
  margin-top: 15px;
  white-space: pre-wrap;
}

/* ================================================= */
/* PAGE PARTENAIRE (MISE À JOUR)
/* ================================================= */
.partner-page {
  /* On enlève le padding du conteneur pour que la bannière prenne toute la largeur */
  padding: 0;
}

/* On centre le contenu du "Héro" */
.partner-page .partner-content-wrapper {
  text-align: center;
  padding: 40px;
}

.partner-subtitle {
  font-size: 1.2rem;
  color: #555;
  max-width: 600px;
  margin: 0 auto 30px auto;
  line-height: 1.6;
}

.partner-cta {
  justify-content: center; /* Centre les boutons */
}

/* Titre de section générique */
.partner-section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 30px;
}

/* Section 2 : Les Avantages */
.partner-benefits {
  background: var(--color-secondary-light); /* Fond gris clair */
  padding: 50px 40px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.benefit-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.benefit-card i {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 15px;
}

.benefit-card h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.benefit-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #666;
}

/* Section 3 : Comment ça marche */
.partner-how {
  background: #fff;
  padding: 50px 40px;
}

.how-steps {
  display: flex;
  justify-content: center;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.how-step {
  flex: 1;
  text-align: center;
  max-width: 300px;
  position: relative;
}

/* Les numéros */
.how-step span {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.how-step h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.how-step p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #666;
}

/* Section 4 : Preuve sociale */
.partner-social-proof {
  background: var(--color-secondary-light); /* Fond gris clair */
  padding: 50px 40px;
}

.logo-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.logo-placeholder {
  font-size: 1.2rem;
  font-weight: 600;
  color: #aaa;
  padding: 20px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ================================================= */
/* RESPONSIVE (Tablettes & Mobiles)
/* ================================================= */
@media (max-width: 960px) {
  .featured-content {
    flex-direction: column;
    text-align: center;
  }
  .featured-image {
    width: 100%;
    height: auto;
  }
  .container {
    grid-template-columns: 1fr; /* 1 seule colonne */
  }
  #sidebar-placeholder {
    display: none;
  }

  .sidebar-left {
    position: fixed;
    top: 52px;
    left: 0;
    height: calc(100% - 52px);
    width: 250px;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    border-right: 1px solid #ccc;
    background: #fff;
    border-radius: 0;
    box-shadow: #1c1c1c33 2px 0 8px;
    max-height: 100%;
    overflow-y: auto;
  }

  .center-content {
    grid-column: 1; /* Reste dans la seule colonne */
  }

  #mobile-nav-toggle {
    display: block; /* On le MONTRE sur mobile */
  }

  /* On réduit les boutons du header */
  .header-actions .btn {
    font-size: 12px; /* Police plus petite */
    padding: 6px 12px; /* Padding réduit */
    font-weight: 600; /* Un peu moins "bold" */
  }

  /* On le MONTRE sur mobile */
  .mobile-only-sidebar {
    display: block;
    padding: 12px; /* Assorti au padding de la nav */
    border-top: 1px solid #eee; /* Petite séparation */
    margin-top: 10px;
  }

  #card-create-post {
    border: none !important;
  }

  .mobile-only-sidebar .sidebar-card:not([id]) {
    /* C'est ça qui enlève la bordure blanche */
    border: none;

    /* Ça enlève le fond blanc */
    background: none;

    /* Ça enlève l'espace blanc autour du bouton */
    padding: 0;
  }

  /* On en profite pour agrandir le bouton "Publier" */
  .mobile-only-sidebar .create-post {
    padding: 16px;
    font-size: 1.1rem;
  }

  /* Et on fait pareil pour le bloc "Connectez-vous" */
  .mobile-only-sidebar .logged-out {
    padding: 16px;
    background: var(--color-secondary-light);
    border-radius: 8px;
  }

  .mobile-only-sidebar .phase-name {
    font-size: 1.5rem; /* On réduit de 1.8rem à 1.5rem */
  }

  .partner-how-steps,
  .partner-cta {
    flex-direction: column;
    align-items: center;
  }

  .how-step {
    margin-bottom: 20px;
  }

  .partner-benefits,
  .partner-how,
  .partner-social-proof,
  .partner-page .partner-content-wrapper {
    padding: 40px 20px; /* Moins de padding sur mobile */
  }

  /* 1. On corrige la grille principale pour qu'elle prenne toute la largeur */
    .container-partner-page {
        display: block; /* Enlève la grille "sidebar + contenu" */
    }
    
    /* 2. On empile les étapes "Comment ça marche" (qui sont en ligne sur PC) */
    .how-steps {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .how-step {
        max-width: 100%; /* Prend toute la largeur disponible */
        margin-bottom: 20px;
    }

    /* 3. On adapte la grille des avantages */
    .benefits-grid {
        grid-template-columns: 1fr; /* Une seule colonne */
        gap: 20px;
    }

    /* 4. On empile les boutons d'action s'il n'y a pas assez de place */
    .partner-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .partner-cta .btn {
        width: 100%; /* Boutons pleine largeur */
        text-align: center;
        margin-bottom: 10px;
    }

    /* 5. Ajustements visuels (Textes et Marges) */
    .partner-page .partner-content-wrapper {
        padding: 30px 20px; /* Moins de marge sur les côtés */
    }

    .partner-content-wrapper h2 {
        font-size: 1.8rem; /* Titre plus petit */
    }

    .partner-banner {
        height: 200px; /* Bannière moins haute sur mobile */
    }

    .partner-section-title {
        font-size: 1.6rem;
    }
    
    /* On s'assure que les logos ne débordent pas */
    .logo-grid {
        gap: 20px;
    }
    
    .logo-placeholder {
        width: 100%; /* Logos pleine largeur sur mobile */
        justify-content: center;
    }
}


/* ================================================= */
/* RÉGLAGES SPÉCIFIQUES POUR TÉLÉPHONES
/* (Moins de 480px)
/* ================================================= */
@media (max-width: 480px) {
  /* 1. On réduit les marges générales */
  .container {
    padding: 0 10px;
    margin: 62px auto 20px auto;
  }

  /* 2. On simplifie le Header */
  header {
    padding: 0 10px;
  }
  .header-content .partner-logo,
  #user-email-display {
    display: none;
  }
  .logo {
    font-size: 22px;
  }

  /* 3. On réduit les marges intérieures des cartes */
  .submission-form,
  .info-page,
  .article-detail,
  .partner-content-wrapper {
    padding: 20px 15px;
  }

  /* 4. On réduit la taille des gros titres */
  .article-detail-title,
  .partner-content-wrapper h2,
  .info-title {
    font-size: 1.8rem;
  }

  /* 5. On réduit les titres des cartes de vote */
  .article-title {
    font-size: 1.3rem;
  }

  /* 7. On réduit les boutons du header */
  .header-actions .btn {
    font-size: 12px; /* Police plus petite */
    padding: 6px 12px; /* Padding réduit */
    font-weight: 600; /* Un peu moins "bold" */
  }
}

/* ================================================= */
/* STYLES POUR LE MENU HAMBURGER (MOBILE)
/* ================================================= */

/* 2. L'overlay (fond sombre) */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 298; /* En dessous du header et du menu */

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s;
}

/* 3. L'état "OUVERT" (quand on clique) */
.nav-open .sidebar-left {
  transform: translateX(0); /* Fait glisser le menu */
}

.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible; /* Affiche l'overlay */
}

/* Modal pour agrandir les images */
.enlarge-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 500;
}
.enlarge-content {
  max-width: 90%;
  max-height: 90%;
}
.enlarge-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ================================================= */
/* FOOTER (Bas de page)
/* ================================================= */

#footer-placeholder {
  width: 100%;
  background-color: #222; /* Fond sombre */
  color: #aaa;
  margin-top: 40px; /* Espace au-dessus du footer */
  padding: 30px 24px;
  flex-shrink: 0;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-weight: 800;
  color: var(--color-primary-light); /* Ton Indigo clair */
  font-size: 20px;
}

.footer-logo span {
  color: #777;
  font-size: 14px;
  margin-left: 10px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Version mobile du footer */
@media (max-width: 480px) {
  .footer-content {
    flex-direction: column;
    gap: 20px;
  }
}

/* ================================================= */
/* STYLE POUR LES NOTIFICATIONS "TOAST"
/* ================================================= */

#toast-notification {
  position: fixed;
  top: 72px; /* Juste sous le header (52px + 20px) */
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  z-index: 1001; /* Au-dessus de tout (sauf le modal) */

  /* Animation */
  transform: translateX(120%); /* Caché sur la droite */
  transition: transform 0.3s ease-in-out;
}

/* Style "Affiché" */
#toast-notification.show {
  transform: translateX(0); /* Glisse en place */
}

/* Style "Succès" (Vert) */
#toast-notification.toast-success {
  background: #28a745; /* Un beau vert */
  color: white;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Style "Erreur" (Rouge) */
#toast-notification.toast-error {
  background: var(--color-danger); /* Ton rouge */
  color: white;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ================================================= */
/* STYLE POUR LA PAGE 404 (ERREUR)
/* ================================================= */

.error-page-container {
  /* Utilise Flexbox pour centrer le contenu verticalement et horizontalement */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* Prend tout l'espace restant après le header et avant le footer */
  flex-grow: 1;
  padding: 20px;
  margin-top: 52px; /* Pour passer sous le header fixe */
}

.error-code {
  font-size: 8rem; /* Grand nombre */
  font-weight: 900;
  color: var(--color-primary-light); /* Couleur de fond pour le grand nombre */
  margin: 0;
  line-height: 1;
  position: relative;
}

.error-message {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-top: 15px;
  margin-bottom: 25px;
}

.error-detail {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 30px;
  max-width: 450px;
}

/* Style spécifique pour le bouton de retour à l'accueil */
.error-page-container .btn-primary {
  padding: 12px 28px;
  font-size: 1rem;
}

/* Amélioration de la lisibilité sur le code d'erreur */
@media (max-width: 480px) {
  .error-code {
    font-size: 5rem;
  }
  .error-message {
    font-size: 1.5rem;
  }
}

/* ================================================= */
/* PAGE PROFIL (PROFIL.HTML)
/* ================================================= */

/* Rend le nom dans le header cliquable */
.user-profile-link {
  color: #555;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background-color 0.2s;
}
.user-profile-link:hover {
  background-color: #f4f4f4;
  color: var(--color-primary);
}

.profile-title {
  text-align: center;
  margin-bottom: 30px;
  color: var(--color-secondary);
  font-size: 28px;
}

/* ================================================= */
/* CORRECTION POUR SIDEBAR DANS MENU MOBILE
/* ================================================= */
.mobile-only-sidebar .sidebar {
  /* On annule le positionnement "sticky" du bureau */
  position: static;

  /* On annule l'alignement "sticky" du bureau */
  align-self: auto;
}

/* ================================================= */
/* LOADING SKELETONS (AMÉLIORÉS)
/* ================================================= */

/* 1. Animation de brillance (Shimmer) */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.skeleton-anim {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(to right, #f0f0f0 4%, #e0e0e0 25%, #f0f0f0 36%);
  background-size: 1000px 100%;
}

/* 2. Squelette Carte Verticale (Votes, Profil, Grille) */
.skeleton-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.skeleton-image {
  height: 220px;
  width: 100%;
  background: #f0f0f0; /* Couleur de fond si animation marche pas */
}

.skeleton-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: #f0f0f0;
}

/* 3. Squelette Lauréat Horizontal (Accueil & Palmarès) */
.skeleton-winner {
    display: flex;
    gap: 30px;
    padding: 30px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    align-items: center;
    margin-bottom: 30px;
}

.skeleton-winner-img {
    width: 400px;
    height: 280px;
    border-radius: 8px;
    flex-shrink: 0;
}

.skeleton-winner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Mobile : On passe en vertical */
@media (max-width: 960px) {
    .skeleton-winner { flex-direction: column; }
    .skeleton-winner-img { width: 100%; height: 200px; }
}

/* ================================================= */
/* BANNIÈRE GAGNANT (PROFIL)
/* ================================================= */
.winner-claim-banner {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); /* Or et Orange */
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
    animation: slideIn 0.5s ease-out;
}

.winner-claim-content h3 {
    margin: 0 0 5px 0;
    font-size: 1.4rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.winner-claim-content p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.winner-claim-btn {
    background: #fff;
    color: #e67e22;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s;
    white-space: nowrap;
    margin-left: 15px;
}

.winner-claim-btn:hover {
    transform: scale(1.05);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile : Bannière en colonne */
@media (max-width: 600px) {
    .winner-claim-banner {
        flex-direction: column;
        text-align: center;
    }
    .winner-claim-btn {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
    }
}


/* ================================================= */
/* BADGE DE CERTIFICATION "40" (STYLE LOGO MINIMALISTE)
/* ================================================= */

.badge-certified-custom {
    /* S'affiche comme du texte normal à côté du nom */
    display: inline;

    /* Couleur et Typographie */
    color: var(--color-primary); /* Ta couleur Indigo */
    font-weight: 900; /* Très gras pour l'effet "Logo" */
    font-size: 1.1em; /* Un tout petit peu plus grand que le texte autour */
    
    /* On force une police sans-serif propre si jamais ta police de base est avec empattement */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Positionnement et comportement */
    margin-left: 5px;
    vertical-align: baseline; /* S'aligne parfaitement sur la ligne du texte */
    cursor: help; /* Curseur point d'interrogation au survol */
    user-select: none;

    /* Réinitialisation des anciens styles (au cas où) */
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    width: auto;
    height: auto;
    border-radius: 0;
}

/* Effet subtil au survol */
.badge-certified-custom:hover {
    color: var(--color-primary-dark); /* Devient légèrement plus foncé */
}

/* ================================================= */
/* STYLE DU BADGE 40 DANS LA GRILLE PROFIL
/* ================================================= */

/* Le conteneur de la carte (Optionnel : fond un peu bleuté pour le distinguer) */
.badge-card-certified {
    background-color: #f5f7ff; /* Très léger indigo */
    border-color: var(--color-primary-light);
    order: -1; /* LE PLACE TOUJOURS EN PREMIER */
}

/* Le texte "40" en gros au centre */
.profile-badge-40 {
    display: block;
    font-size: 2.5rem; /* Même taille que les icônes */
    font-weight: 900;  /* Très gras */
    color: var(--color-primary); /* Indigo */
    line-height: 1;
    margin-bottom: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}


/* ================================================= */
/* BADGE "ANCIEN GAGNANT" (COUPE DORÉE)
/* ================================================= */

.badge-winner-icon {
    color: #FFD700; /* Or brillant */
    margin-left: 5px;
    font-size: 0.9em;
    vertical-align: baseline;
    cursor: help;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1)); /* Petite ombre pour ressortir sur le blanc */
}

.badge-winner-icon:hover {
    transform: scale(1.2);
    transition: transform 0.2s;
}


/* ================================================= */
/* ANIMATION ROUE DE CHARGEMENT (SPINNER)
/* ================================================= */

.fa-spin {
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


